This repository contains samples for the Microsoft Bot Builder V4 SDK - dotnet SDK, JS SDK.
Samples for the Bot Builder V3 SDK are available here.
Bot Builder provides the most comprehensive experience for building conversation applications and includes the following SDKs and tools:
- Bot Builder V4 SDK
- Bot Framework Emulator
- Bot Builder CLI tools (stable release)
- Bot Framework webchat
Please see here for an overview of the end-to-end bot development workflow. To get started, you can create a bot with Azure Bot Service. Click here if you need a trial Azure subscription.
Samples are organized per platform and are numbered to provide a suggested reading order.
To use the samples clone this GitHub repository using Git.
git clone https://github.com/Microsoft/BotBuilder-Samples.git
cd BotBuilder-Samples
🏃 - Indicates planned and work in progress.
Sample Name | Description | .NET CORE | NodeJS | .NET Web API | JS (es6) | Typescript |
---|---|---|---|---|---|---|
1.console-echo | Introduces the concept of adapter and demonstrates a simple echo bot on console adapter and how to send a reply and access the incoming message. | View | View | View | ||
1.a.browser-echo | Introduces browser adapter | View | ||||
2.a.echobot | Demonstrates how to receive and send messages. | View | View | 🏃 | View | |
2.b.echo-with-counter | Demonstrates how to use state. Shows commented out code for all natively supported storage providers. Storage providers should include InMemory and Blob storage. | View | View | View | View | |
3.welcome-user | Introduces activity types and provides a welcome message on conversation update activity. | View | View | |||
4.simple-prompt | Demonstrates prompt pattern by prompting user for a property. Introduces user state .vs. conversation state. Ask for name and prints back that information. Uses sequence dialogs if available or default option is to use waterfall dialogs | View | View | |||
5.multi-turn-prompt | Demonstrates more complex pattern by prompting user for multiple properties. Ask for name, age and prints back that information. Uses sequence dialogs if available or default option is to use waterfall dialogs. | View | View | |||
6.using-cards | Introduces all card types including thumbnail, audio, media etc. Builds on Welcoming user + multi-prompt bot by presenting a card with buttons in welcome message that route to appropriate dialog. | View | View | |||
7.using-adaptive-cards | Introduces adaptive cards - demonstrates how the multi-turn dialog can be augmented to also use a card to get user input for name and age. | View | View | |||
8.suggested-actions | Demonstrates how to use suggested actions | View | View | |||
9.message-routing | Demonstrates the main dialog or root dispatcher paradigm. Needs to show how to handle interruptions like cancel, help. | View | View | |||
10.prompt-validations | Demonstrates how to take advantage of different prompt types and prompt validators. | View | View | |||
11.qnamaker | Demonstrates how to use QnA Maker to have simple single-turn conversations | View | View | View | View | |
12.nlp-with-luis | Demonstrates how to use LUIS to understand natural language | View | View | View | View | |
13.basic-bot | Basic bot template that puts together cards, NLP (LUIS) | View | View | View | View | |
14.nlp-with-dispatch | Demonstrates how to dispatch across LUIS, QnA Maker | View | View | |||
15.handling-attachments | Demonstrates how to listen for/handle user provided attachments | View | View | |||
16.proactive-messages | Demonstrates how to send proactive messages to users | View | View | |||
17.multilingual-bot | Using translate middleware to support a multi-lingual bot. Demonstrates custom middleware. | View | View | |||
18.bot-authentication | Bot that demonstrates how to integration with OAuth providers | View | View | |||
19.custom-dialogs | Demonstrates different ways to model conversations. Waterfall .vs. using your own dialog management | View | View | |||
20.qna-with-appinsights | Demonstrates how to use QnA Maker and Azure Application insights | View | View | |||
21.luis-appinsights | Demonstrates how to use LUIS and Azure Application insights | View | View | |||
22.conversation-history | Demonstrates the use of SendConversationHistoryAsync API to upload conversation history stored in the conversation Transcript. | View | 🏃 | |||
23.facebook-events | Integrate and consume Facebook specific payloads, such as post-backs, quick replies and opt-in events. | View | View | |||
24.bot-auth-msgraph | Demonstrates bot authentication capabilities of Azure Bot Service. Demonstrates utilizing the Microsoft Graph API to retrieve data about the user. | View | View | |||
25.bot-logging | This bot demonstrates the logging middleware in the nodejs SDK | View | ||||
26.bot-transcript-logging | This bot demonstrates the transcript logging middleware in the nodejs SDK | View | ||||
30.asp-mvc-bot | Demonstrates how to build a bot as an ASP.NET MVC Controller | View | ||||
40.timex-resolution | Demonstrates various ways to parse and manipulate the TIMEX expressions you get from LUIS and the DateTimeRecognizer used by the DateTimePrompt. | View | View | |||
42.scaleout | Demonstrates how you can build your own state solution from the ground up that supports scaled out deployment with ETag based optimistic locking. | View | 🏃 | |||
50.diceroller-skill | This sample demonstrates how to implement a Cortana Skill that properly handles EndOfConversation events. | View | ||||
51.cafe-bot | A complete E2E Cafe bot that has all capabilities and includes best practices | View | View | |||
52.enterprise-bot | Enterprise bot that demonstrates use of Dialogs, Template Manager, Dispatch across different services and implementing custom middleware. | View | View | |||
70.styling-webchat | This sample shows how to create a web page with custom Web Chat component. | View |
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) at secure@microsoft.com. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.