These samples demonstrate task-focused bots that show how to take advantage of features in the Bot Builder SDK for Node.js. You can use the samples to help you quickly get started with building great bots with rich capabilities.
Get the samples
To get the samples, clone the BotBuilder-Samples GitHub repository using Git.
git clone https://github.com/Microsoft/BotBuilder-Samples.git cd BotBuilder-Samples
The sample bots built with the Bot Builder SDK for Node.js are organized in the Node directory.
You can also view the samples on GitHub and deploy them to Azure directly.
These samples show the basic techniques for building rich and capable bots.
|Send Attachment||A sample bot that sends simple media attachments (images) to the user.|
|Receive Attachment||A sample bot that receives attachments sent by the user and downloads them.|
|Create New Conversation||A sample bot that starts a new conversation using a previously stored user address.|
|Get Members of a Conversation||A sample bot that retrieves the conversation's members list and detects when it changes.|
|Direct Line||A sample bot and a custom client that communicate with each other using the Direct Line API.|
|Direct Line (WebSockets)||A sample bot and a custom client that communicate with each other using the Direct Line API + WebSockets.|
|Multi Dialogs||A sample bot that shows various kinds of dialogs.|
|State API||A stateless sample bot that tracks the context of a conversation.|
|Custom State API||A stateless sample bot that tracks the context of a conversation using a custom storage provider.|
|ChannelData||A sample bot that sends native metadata to Facebook using ChannelData.|
|AppInsights||A sample bot that logs telemetry to an Application Insights instance.|
This sample shows how to leverage Azure Search in data-driven bots.
|Azure Search||Two sample bots that help the user navigate large amounts of content.|
These samples show how to send rich cards in the Bot Framework.
|Rich Cards||A sample bot that sends several different types of rich cards.|
|Carousel of Cards||A sample bot that sends multiple rich cards within a single message using the Carousel layout.|
These samples show how to add artificial intelligence capabilities to a bot using Bing and Microsoft Cognitive Services APIs.
|LUIS||A sample bot that uses LuisDialog to integrate with a LUIS.ai application.|
|Image Caption||A sample bot that gets an image caption using the Microsoft Cognitive Services Vision API.|
|Speech To Text||A sample bot that gets text from audio using the Bing Speech API.|
|Similar Products||A sample bot that finds visually similar products using the Bing Image Search API.|
|Zummer||A sample bot that finds wikipedia articles using the Bing Search API.|
This sample is designed to showcase an end-to-end scenario. It's a great source of code fragments if you're looking to implement more complex features in your bot.
|Contoso Flowers||A sample bot that uses many features of the Bot Framework.|