Welcome to the Bot Framework samples repository. Here you will find task-focused samples in C#, JavaScript and TypeScript to help you get started with the Bot Framework SDK!
Перейти к файлу
Tracy Boehrer 10b49f1b74 New typescript_nodejs ARM templates 2022-08-08 14:02:25 -05:00
.github Create CI JavaScript Samples pipeline (#3770) 2022-08-08 10:42:11 -05:00
Migration Drop UserSecretsid from .csproj files (#3729) 2022-04-11 14:23:50 -04:00
MigrationV3V4 Re-order migration folder. Create top migration, move migration V3V4 to it. (#3179) 2021-04-19 15:11:32 -07:00
build Make E2E Sample DotNet tests target the latest SDK v4 by default (#3622) 2021-12-13 12:00:48 -08:00
composer-samples [#3740] Update dotnet samples to target Net 6 - Bot essentials samples (#3749) 2022-08-08 10:26:45 -05:00
docs/media Add OutlookLogo.jpg to media folder (#1825) 2019-10-21 16:02:33 -07:00
experimental Expiremental deletions 2022-08-08 12:28:14 -05:00
samples New typescript_nodejs ARM templates 2022-08-08 14:02:25 -05:00
.editorconfig [#3286] Add linting checks to CI - Fix lint errors in .NET samples (#3785) 2022-08-08 10:42:57 -05:00
.gitattributes Added basic config for the repo, using the files from our C# repo (which 2018-09-10 11:14:16 -07:00
.gitignore Composer samples (#3285) 2021-05-24 13:32:46 -05:00
CODE_OF_CONDUCT.md add CODE_OF_CONDUCT.md (#3168) 2021-04-14 22:28:58 -04:00
CONTRIBUTING.md yeoman cse work (#962) 2018-11-25 09:31:17 -08:00
INSTALLING_CLI_TOOLS.md Fixes #3205 - Update CLI Tool instructions (#3206) 2021-04-27 10:43:11 -07:00
LICENSE.md update license information (#565) 2018-09-27 11:02:24 -07:00
README.md [#2980] Port SSO for skills dotnet sample to JS (#3708) 2022-04-21 09:04:01 -05:00
SECURITY.md Microsoft mandatory file (#3746) 2022-05-17 11:10:09 -07:00
SPEC.md samples and generator updates for 4.4 release 2019-05-02 13:51:21 -07:00

README.md

Bot Framework Samples

Click here to find out what's new with Bot Framework

Overview

This branch contains samples for the released version of the Microsoft Bot Framework V4 SDK for .NET, JS and Python. If you need samples for the Bot Framework V3 SDK, go here.

Getting the samples

To use the samples, clone this GitHub repository using Git.

    git clone https://github.com/Microsoft/BotBuilder-Samples.git
    cd BotBuilder-Samples

Sample lists

Samples are designed to illustrate functionality you'll need to implement to build great bots!

Bot essentials

Sample Name Description .NET JavaScript Python Java
2 Echo bot Demonstrates how to receive and send messages. .NET Core JavaScript, TypeScript Python Java
3 Welcome user Introduces activity types and provides a welcome message on conversation update activity. .NET Core JavaScript, TypeScript Python Java
5 Multi turn prompts Demonstrates how to use waterfall dialog, prompts, and component dialog to create a simple interaction that asks the user for name, age, and prints back that information. .NET Core JavaScript, TypeScript Python Java
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. .NET Core JavaScript, TypeScript Python Java
7 Adaptive cards Demonstrates how the multi-turn dialog can use a card to get user input for name and age. .NET Core JavaScript Python Java
8 Suggested actions Demonstrates how to enable your bot to present buttons that the user can tap to provide input. .NET Core JavaScript Python Java
13 Core bot Core bot shows how to use cards, dialog, and Language Understanding (LUIS). .NET Core, .NET Web JavaScript, TypeScript Python Java
14 NLP with dispatch Demonstrates how to dispatch across LUIS and QnA Maker. .NET Core JavaScript Python Java
15 Handling attachments Demonstrates how to listen for/handle user provided attachments. .NET Core JavaScript Python Java
40 TIMEX resolution Demonstrates various ways to parse and manipulate the TIMEX expressions you get from LUIS and the DateTimeRecognizer used by the DateTimePrompt. .NET Core JavaScript Python Java
43 Complex dialogs Demonstrates different ways for composing dialogs. .NET Core JavaScript Python Java
45 State management Demonstrates how to use state management and storage objects to manage and persist state. .NET Core JavaScript Python Java

Advanced bots

Sample Name Description .NET JavaScript Python Java
1 Console echo bot 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. .NET Core JavaScript, TypeScript Python
1 Browser echo bot Demonstrates how to host a bot in the browser using Web Chat and a custom Web Chat Adapter. ECMAScript 6
16 Proactive messages Demonstrates how to send proactive messages to users. .NET Core JavaScript, TypeScript Python Java
17 Multilingual bot Using translate middleware to support a multi-lingual bot. Demonstrates custom middleware. .NET Core JavaScript Python Java
19 Custom dialogs Demonstrates complex conversation flow using the Dialogs library. .NET Core JavaScript Python Java
21 Application Insights Demonstrates how to add telemetry logging to your bot, storing telemetry within Application Insights. .NET Core JavaScript Java
23 Facebook events Integrate and consume Facebook specific payloads, such as post-backs, quick replies and opt-in events. .NET Core JavaScript Python Java
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 Python Java
44 Basic custom prompts Demonstrates how to implement your own basic prompts to ask the user for information. .NET Core JavaScript Python Java
47 Inspection middleware Demonstrates how to use middleware to allow the Bot Framework Emulator to debug traffic into and out of the bot in addition to looking at the current state of the bot. .NET Core JavaScript Python Java
70 Styling webchat This sample shows how to create a web page with custom Web Chat component. ECMAScript 6

Authentication samples

Sample Name Description .NET JavaScript Python Java
18 OAuth authentication Bot that demonstrates how to integrate OAuth providers. .NET Core JavaScript Python Java
24 MSGraph authentication Demonstrates bot authentication capabilities of Azure Bot Service. Demonstrates utilizing the Microsoft Graph API to retrieve data about the user. .NET Core JavaScript Python Java
46 Teams authentication Demonstrates how to use authentication for a bot running in Microsoft Teams. .NET Core JavaScript Python Java

QnA Maker samples

Sample Name Description .NET JavaScript Python Java
11 QnA Maker (simple) Demonstrates how to use QnA Maker to have simple single-turn conversations .NET Core JavaScript Python Java
49 QnA Maker (advanced) Demonstrates how to integrate Multiturn and Active learning in a QnA Maker bot. This also demonstrates the QnAMakerDialog class. .NET Core JavaScript Java

Teams samples

Sample Name Description .NET JavaScript Python Java
25 Message Reactions Demonstrates how to create a simple bot that responds to Message Reactions .NET Core JavaScript Java
46 Authentication Demonstrates how to use authentication for a bot running in Microsoft Teams. .NET Core JavaScript Python Java
50 Messaging extensions - search A Messaging Extension that accepts search requests and returns results. .NET Core JavaScript Python Java
51 Messaging extensions - action A Messaging Extension that accepts parameters and returns a card. Also, how to receive a forwarded message as a parameter in a Messaging Extension. .NET Core JavaScript Python Java
52 Messaging extensions - auth and config A Messaging Extension that has a configuration page, accepts search requests and returns results after the user has signed in. .NET Core JavaScript Java
53 Messaging extensions - action preview Demonstrates how to create a Preview and Edit flow for a Messaging Extension. .NET Core JavaScript Python Java
54 Task module Demonstrates how to retrieve a Task Module, and values from cards in the Task Module, for a Messaging Extension. .NET Core JavaScript Python Java
55 Link unfurling A Messaging Extension that performs link unfurling. .NET Core JavaScript Python Java
56 File upload Demonstrates how to obtain file consent, and upload files to Teams from a bot. Also, how to receive a file sent to a bot. .NET Core JavaScript Python Java
57 Conversation bot Demonstrates various features of bots on Teams: message all members in a Team or Channel, @mention a user from a bot, update previously sent messages, etc. .NET Core JavaScript Python Java
58 Start new thread in a channel Demonstrates creating a new thread in a channel. .NET Core JavaScript Python Java

Custom adapter samples

Important Note: The Bot Framework Adapters and corresponding samples will be deprecated in the next version of the Bot Framework SDK and have been moved to the BotBuilderCommunity repository. Please refer to their new location for all future work.

Sample Name Description .NET JavaScript Python Java
60 Slack Demonstrates the use of the custom adapter for Slack. Python

Skills samples

Sample Name Description .NET JavaScript Python Java
80 Skills - simple bot to bot This sample shows how to connect a skill to a skill consumer. .NET Core JavaScript Python Java
81 Skills - skill dialog This sample shows how to connect a skill to a skill dialog consumer. .NET Core JavaScript Python Java
82 Skills - SSO with CloudAdapter This sample shows how use SSO with skills and CloudAdapter. .NET Core JavaScript NA NA

Experimental / preview samples

A collection of experimental samples 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.

Contributing

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. 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.

Reporting security issues

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.