Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ Samples are designed to illustrate functionality you'll need to implement to bui
|16|Proactive messages | Demonstrates how to send proactive messages to users. |[.NET Core][cs#16]|[JavaScript][js#16], [TypeScript][ts#16]|[Python][py#16]
|17|Multilingual bot | Using translate middleware to support a multi-lingual bot. Demonstrates custom middleware. |[.NET Core][cs#17]|[JavaScript][js#17]|[Python][py#17]
|19|Custom dialogs | Demonstrates complex conversation flow using the Dialogs library. |[.NET Core][cs#19]|[JavaScript][js#19]|[Python][py#19]
|21|Application Insights | Demonstrates how to add telemetry logging to your bot, storing telemetry within Application Insights.|[.NET Core][cs#21] |[JavaScript][js#21] |
|23|Facebook events | Integrate and consume Facebook specific payloads, such as post-backs, quick replies and opt-in events.|[.NET Core][cs#23] |[JavaScript][js#23] |[Python][py#23]
|42|Scale out | Demonstrates how you can build your own state solution from the ground up that supports scaled out deployment with ETag based optimistic locking. |[.NET Core][cs#42] | |[Python][py#42]
|44|Basic custom prompts | Demonstrates how to implement your own _basic_ prompts to ask the user for information. |[.NET Core][cs#44]|[JavaScript][js#44]|[Python][py#44]
Expand Down Expand Up @@ -87,11 +86,11 @@ Samples are designed to illustrate functionality you'll need to implement to bui

### Skills samples

| | Sample Name | Description | .NET | JavaScript | Python | Java
| | Sample Name | Description | .NET | JavaScript | Python |
|:--:|:----------------------|:---------------------------------------------------------------------------------|:--------|:-------------|:--------|
|80|Skills - simple bot to bot | This sample shows how to connect a skill to a skill consumer. | [.NET Core][cs#80] | [JavaScript][js#80] |[Python][py#80]
|81|Skills - skill dialog | This sample shows how to connect a skill to a skill dialog consumer.| [.NET Core][cs#81] | [JavaScript][js#81] |[Python][py#81]
|82|Skills - SSO with CloudAdapter | This sample shows how use SSO with skills and CloudAdapter.| [.NET Core][cs#82] | [JavaScript][js#82] |NA |NA
|82|Skills - SSO with CloudAdapter | This sample shows how use SSO with skills and CloudAdapter.| [.NET Core][cs#82] | [JavaScript][js#82] |NA
### Experimental / preview samples

A [collection of **experimental** samples](./experimental) exist, intended to provide samples for features currently in preview or as a way to solicit feedback on a given design, approach, or technology being considered by the Bot Framework Team.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
node_modules/
.nyc_output/
.vscode/
.env
.vscode/
Original file line number Diff line number Diff line change
@@ -1,85 +1,85 @@
# CoreBot with Application Insights
Bot Framework v4 core bot sample.
This bot has been created using [Bot Framework](https://dev.botframework.com), it shows how to:
- Use [LUIS](https://www.luis.ai) to implement core AI capabilities
- Implement a multi-turn conversation using Dialogs
- Handle user interruptions for such things as `Help` or `Cancel`
- Prompt for and validate requests for information from the user
- Use [Application Insights](https://docs.microsoft.com/azure/azure-monitor/app/cloudservices) to monitor your bot
## Prerequisites
This sample **requires** prerequisites in order to run.
### Overview
This bot uses [LUIS](https://www.luis.ai), an AI based cognitive service, to implement language understanding
and [Application Insights](https://docs.microsoft.com/azure/azure-monitor/app/cloudservices), an extensible Application Performance Management (APM) service for web developers on multiple platforms.
### Create a LUIS Application to enable language understanding
LUIS language model setup, training, and application configuration steps can be found [here](https://docs.microsoft.com/azure/bot-service/bot-builder-howto-v4-luis?view=azure-bot-service-4.0&tabs=cs).
If you wish to create a LUIS application via the CLI, these steps can be found in the [README-LUIS.md](README-LUIS.md).
### Add Application Insights service to enable the bot monitoring
Application Insights resource creation steps can be found [here](https://docs.microsoft.com/azure/azure-monitor/app/create-new-resource).
You must include the instrumentation key in the `config.py` file, as well is in the designated field in your Azure Bot resource.
### Add Activity and Personal Information logging for Application Insights
To log activity and personal information, extra code is needed in `app.py` after the creation of the telemetry client. This code is *already present* in the sample, but must be unconmmented in order to function. It is important to note that due to privacy concerns, in a real-world application you **must** obtain user consent prior to logging this information.
The required code is as follows:
```python
TELEMETRY_LOGGER_MIDDLEWARE = TelemetryLoggerMiddleware(telemetry_client=TELEMETRY_CLIENT, log_personal_information=True)
ADAPTER.use(TELEMETRY_LOGGER_MIDDLEWARE)
```
## To try this sample
- Clone the repository
```bash
git clone https://github.com/Microsoft/botbuilder-samples.git
```
- In a terminal, navigate to `botbuilder-samples\samples\python\21.corebot-app-insights` folder
- Activate your desired virtual environment
- In the terminal, type `pip install -r requirements.txt`
- Run your bot with `python app.py`
## Testing the bot using Bot Framework Emulator
[Bot Framework Emulator](https://github.com/microsoft/botframework-emulator) is a desktop application that allows bot developers to test and debug their bots on localhost or running remotely through a tunnel.
- Install the latest Bot Framework Emulator from [here](https://github.com/Microsoft/BotFramework-Emulator/releases)
### Connect to the bot using Bot Framework Emulator
- Launch Bot Framework Emulator
- File -> Open Bot
- Enter a Bot URL of `http://localhost:3978/api/messages`
## Deploy the bot to Azure
To learn more about deploying a bot to Azure, see [Deploy your bot to Azure](https://aka.ms/azuredeployment) for a complete list of deployment instructions.
## Further reading
- [Bot Framework Documentation](https://docs.botframework.com)
- [Bot Basics](https://docs.microsoft.com/azure/bot-service/bot-builder-basics?view=azure-bot-service-4.0)
- [Dialogs](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-concept-dialog?view=azure-bot-service-4.0)
- [Gathering Input Using Prompts](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-prompts?view=azure-bot-service-4.0&tabs=csharp)
- [Activity processing](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-concept-activity-processing?view=azure-bot-service-4.0)
- [Azure Bot Service Introduction](https://docs.microsoft.com/azure/bot-service/bot-service-overview-introduction?view=azure-bot-service-4.0)
- [Azure Bot Service Documentation](https://docs.microsoft.com/azure/bot-service/?view=azure-bot-service-4.0)
- [Azure CLI](https://docs.microsoft.com/cli/azure/?view=azure-cli-latest)
- [Azure Portal](https://portal.azure.com)
- [Language Understanding using LUIS](https://docs.microsoft.com/en-us/azure/cognitive-services/luis/)
- [Channels and Bot Connector Service](https://docs.microsoft.com/en-us/azure/bot-service/bot-concepts?view=azure-bot-service-4.0)
- [Application insights Overview](https://docs.microsoft.com/azure/azure-monitor/app/app-insights-overview)
- [Getting Started with Application Insights](https://github.com/Microsoft/ApplicationInsights-aspnetcore/wiki/Getting-Started-with-Application-Insights-for-ASP.NET-Core)
- [Filtering and preprocessing telemetry in the Application Insights SDK](https://docs.microsoft.com/azure/azure-monitor/app/api-filtering-sampling)
# CoreBot with Application Insights

Bot Framework v4 core bot sample.

This bot has been created using [Bot Framework](https://dev.botframework.com), it shows how to:

- Use [LUIS](https://www.luis.ai) to implement core AI capabilities
- Implement a multi-turn conversation using Dialogs
- Handle user interruptions for such things as `Help` or `Cancel`
- Prompt for and validate requests for information from the user
- Use [Application Insights](https://docs.microsoft.com/azure/azure-monitor/app/cloudservices) to monitor your bot

## Prerequisites

This sample **requires** prerequisites in order to run.

### Overview

This bot uses [LUIS](https://www.luis.ai), an AI based cognitive service, to implement language understanding
and [Application Insights](https://docs.microsoft.com/azure/azure-monitor/app/cloudservices), an extensible Application Performance Management (APM) service for web developers on multiple platforms.

### Create a LUIS Application to enable language understanding

LUIS language model setup, training, and application configuration steps can be found [here](https://docs.microsoft.com/azure/bot-service/bot-builder-howto-v4-luis?view=azure-bot-service-4.0&tabs=cs).

If you wish to create a LUIS application via the CLI, these steps can be found in the [README-LUIS.md](README-LUIS.md).

### Add Application Insights service to enable the bot monitoring

Application Insights resource creation steps can be found [here](https://docs.microsoft.com/azure/azure-monitor/app/create-new-resource).

You must include the instrumentation key in the `config.py` file, as well is in the designated field in your Azure Bot resource.

### Add Activity and Personal Information logging for Application Insights
To log activity and personal information, extra code is needed in `app.py` after the creation of the telemetry client. This code is *already present* in the sample, but must be unconmmented in order to function. It is important to note that due to privacy concerns, in a real-world application you **must** obtain user consent prior to logging this information.

The required code is as follows:
```python
TELEMETRY_LOGGER_MIDDLEWARE = TelemetryLoggerMiddleware(telemetry_client=TELEMETRY_CLIENT, log_personal_information=True)
ADAPTER.use(TELEMETRY_LOGGER_MIDDLEWARE)
```

## To try this sample

- Clone the repository
```bash
git clone https://github.com/Microsoft/botbuilder-samples.git
```
- In a terminal, navigate to `botbuilder-samples\samples\python\21.corebot-app-insights` folder
- Activate your desired virtual environment
- In the terminal, type `pip install -r requirements.txt`
- Run your bot with `python app.py`

## Testing the bot using Bot Framework Emulator

[Bot Framework Emulator](https://github.com/microsoft/botframework-emulator) is a desktop application that allows bot developers to test and debug their bots on localhost or running remotely through a tunnel.

- Install the latest Bot Framework Emulator from [here](https://github.com/Microsoft/BotFramework-Emulator/releases)

### Connect to the bot using Bot Framework Emulator

- Launch Bot Framework Emulator
- File -> Open Bot
- Enter a Bot URL of `http://localhost:3978/api/messages`

## Deploy the bot to Azure

To learn more about deploying a bot to Azure, see [Deploy your bot to Azure](https://aka.ms/azuredeployment) for a complete list of deployment instructions.

## Further reading

- [Bot Framework Documentation](https://docs.botframework.com)
- [Bot Basics](https://docs.microsoft.com/azure/bot-service/bot-builder-basics?view=azure-bot-service-4.0)
- [Dialogs](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-concept-dialog?view=azure-bot-service-4.0)
- [Gathering Input Using Prompts](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-prompts?view=azure-bot-service-4.0&tabs=csharp)
- [Activity processing](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-concept-activity-processing?view=azure-bot-service-4.0)
- [Azure Bot Service Introduction](https://docs.microsoft.com/azure/bot-service/bot-service-overview-introduction?view=azure-bot-service-4.0)
- [Azure Bot Service Documentation](https://docs.microsoft.com/azure/bot-service/?view=azure-bot-service-4.0)
- [Azure CLI](https://docs.microsoft.com/cli/azure/?view=azure-cli-latest)
- [Azure Portal](https://portal.azure.com)
- [Language Understanding using LUIS](https://docs.microsoft.com/en-us/azure/cognitive-services/luis/)
- [Channels and Bot Connector Service](https://docs.microsoft.com/en-us/azure/bot-service/bot-concepts?view=azure-bot-service-4.0)
- [Application insights Overview](https://docs.microsoft.com/azure/azure-monitor/app/app-insights-overview)
- [Getting Started with Application Insights](https://github.com/Microsoft/ApplicationInsights-aspnetcore/wiki/Getting-Started-with-Application-Insights-for-ASP.NET-Core)
- [Filtering and preprocessing telemetry in the Application Insights SDK](https://docs.microsoft.com/azure/azure-monitor/app/api-filtering-sampling)
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
asyncio>=3.4.3
requests==2.32.2
botbuilder-core>=4.15.0
botframework-connector>=4.15.0
botbuilder-schema>=4.15.0
botbuilder-dialogs>=4.15.0
botbuilder-ai>=4.15.0
botbuilder-applicationinsights>=4.15.0
botbuilder-integration-applicationinsights-aiohttp>=4.15.0
datatypes-date-time>=1.0.0.a1
azure-cognitiveservices-language-luis>=0.2.0
msrest>=0.6.10
asyncio>=3.4.3
requests==2.32.2
botbuilder-core>=4.15.0
botframework-connector>=4.15.0
botbuilder-schema>=4.15.0
botbuilder-dialogs>=4.15.0
botbuilder-ai>=4.15.0
botbuilder-applicationinsights>=4.15.0
botbuilder-integration-applicationinsights-aiohttp>=4.15.0
datatypes-date-time>=1.0.0.a1
azure-cognitiveservices-language-luis>=0.2.0
msrest>=0.6.10

10 changes: 0 additions & 10 deletions samples/csharp_dotnetcore/csharp_dotnetcore.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdaptiveCardsBot", "07.usin
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SuggestedActionsBot", "08.suggested-actions\SuggestedActionsBot.csproj", "{9C70CB81-4403-41B8-ABB8-72497061DDB0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CoreBot", "13.core-bot\CoreBot.csproj", "{8FAE502C-68A1-47E8-9761-BCEA491BA4AA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HandlingAttachmentsBot", "15.handling-attachments\HandlingAttachmentsBot.csproj", "{7E6046AF-DBF2-40E2-8ABA-A0537F76695A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProactiveBot", "16.proactive-messages\ProactiveBot.csproj", "{79D2CAED-880B-4FAE-8777-5A37606E5F48}"
Expand Down Expand Up @@ -144,14 +142,6 @@ Global
{9C70CB81-4403-41B8-ABB8-72497061DDB0}.Release|Any CPU.Build.0 = Release|Any CPU
{9C70CB81-4403-41B8-ABB8-72497061DDB0}.Release|x64.ActiveCfg = Release|Any CPU
{9C70CB81-4403-41B8-ABB8-72497061DDB0}.Release|x64.Build.0 = Release|Any CPU
{8FAE502C-68A1-47E8-9761-BCEA491BA4AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8FAE502C-68A1-47E8-9761-BCEA491BA4AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8FAE502C-68A1-47E8-9761-BCEA491BA4AA}.Debug|x64.ActiveCfg = Debug|Any CPU
{8FAE502C-68A1-47E8-9761-BCEA491BA4AA}.Debug|x64.Build.0 = Debug|Any CPU
{8FAE502C-68A1-47E8-9761-BCEA491BA4AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8FAE502C-68A1-47E8-9761-BCEA491BA4AA}.Release|Any CPU.Build.0 = Release|Any CPU
{8FAE502C-68A1-47E8-9761-BCEA491BA4AA}.Release|x64.ActiveCfg = Release|Any CPU
{8FAE502C-68A1-47E8-9761-BCEA491BA4AA}.Release|x64.Build.0 = Release|Any CPU
{7E6046AF-DBF2-40E2-8ABA-A0537F76695A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7E6046AF-DBF2-40E2-8ABA-A0537F76695A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7E6046AF-DBF2-40E2-8ABA-A0537F76695A}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down
7 changes: 0 additions & 7 deletions samples/typescript_nodejs/13.core-bot/.env

This file was deleted.

Loading