Bot Framework Composer provides example bots designed to illustrate the scenarios you're most likely to encounter when developing your own bots. This article shows you how to use these examples. You'll learn how to create a new bot based on any of the examples, which you can use to learn from or as a starting point when creating your own bot.
Azure QnA Maker will be retired on 31 March 2025.
Beginning 1 October 2022, you won't be able to create new QnA Maker resources or knowledge bases.
A newer version of the question and answering capability is now available as part of Azure AI Language.
Custom question answering, a feature of Azure AI Language, is the updated version of the QnA Maker service.
For more information about question-and-answer support in Composer, see Natural language processing.
Conversational language understanding (CLU), a feature of Azure AI Language, is the updated version of LUIS.
For more information about question-and-answer support in Composer, see Natural language processing.
Composer provides bot and component samples on GitHub at this location: composer samples, where you find C# and JavaScript samples. Specifically, the bot samples are in the projects folder and the component samples are in the packages folder. For more information about components, see Extending your bot with code.
In Composer, open one of the sample bots, such as the echo bot project.
The relative path to the C# sample is BotBuilder-Samples/composer-samples/csharp_dotnetcore/projects/EchoBot/.
The relative path to the JavaScript sample is BotBuilder-Samples/composer-samples/javascript_nodejs/projects/echo-bot/echobot/.
In the left pane, select the Greeting trigger.
In the upper right, select Restart bot.
In the drop-down menu, select Open Web Chat. The bot displays a greeting message.
In the message box, enter hello. The bot will echo it back.
Composer currently provides several bot samples with different specialties. These samples are a good resource to learn how to build your own bot using Composer. You can use the samples and learn how to send text messages, how to ask questions, and how to control conversation flow, etc.
Below is a table of bot samples in Composer and their respective descriptions.
Sample
Description
Echo Bot
A bot that echoes whatever message the user enters.
Empty Bot
A basic bot that is ready for your creativity.
Simple Todo
A sample bot that shows how to use Regex recognizer to define intents and allows you to add, list and remove items.
Todo with LUIS
A sample bot that shows how to use LUIS recognizer to define intents and allows you to add, list and remove items. A LUIS authoring key is required to run this sample.
Asking Questions
A sample bot that shows how to prompt user for different types of input.
Controlling Conversation Flow
A sample bot that shows how to use branching actions to control a conversation flow.
Dialog Actions
A sample bot that shows how to use actions in Composer (doesn't include Ask a question actions already covered in the Asking Questions example).
Interruptions
A sample bot that shows how to handle interruptions in a conversation flow. A LUIS authoring key are required to run this sample.
A sample bot that is provisioned to enable users to create QnA Maker knowledge base in Composer.
Responding with Cards
A sample bot that shows how to send different cards using language generation.
Responding with Text
A sample bot that shows how to send different text messages to users using language generation.
Open a v1 sample
The Examples can be found on the right side of the Composer home page.
To open a bot sample from Composer:
Select the sample you want to open from the Examples list.
In the Create a bot project form:
Name: You can use the default name provided or enter a new name here.
Description (optional): Descriptive text to describe the bot you're creating.
Location: The location your bot source code files will be saved to.
After you select OK in the Create a bot project form, the new bot based off the example bot you selected will open in Composer.
Note
When you select a bot from the Examples list, a copy of the original sample is created in the Location you specify in the Create a bot project form. Any changes you make to that bot will be saved without affecting the original example. You can create as many bots based off the examples as you want, without impacting the original examples and you're free to modify and use them as a starting point when creating your own bots.
Select the Start all bots button located on the Composer toolbar, then select Test in Emulator to test your new bot in the Bot Framework Emulator.