Introduction to Bot Framework Composer
APPLIES TO: Composer v1.x and v2.x
Bot Framework Composer, built on the Bot Framework SDK, is an open-source IDE for developers to author, test, provision, and manage conversational experiences. It provides a powerful visual authoring canvas enabling dialogs, language-understanding models, QnAMaker knowledge bases, and language generation responses to be authored from within one canvas and crucially, enables these experiences to be extended with code for more complex tasks such as system integration. Resulting experiences can then be tested within Composer and provisioned into Azure along with any dependent resources.
Authoring dialog experiences with a visual designer is more efficient and enables easier modeling of more sophisticated conversational experiences where context switching, interruption, and more natural and dynamic conversation flows are important. More complex activities such as integrating with dependencies such as REST Web Services are best suited towards code and we provide an easy mechanism to extend Composer bots with code bringing the best of both together.
What you can do with Composer
Composer is a visual editing canvas for building bots. With Composer, you can:
- Create a new bot using a template, which incorporates the Virtual Assistant capabilities directly into Composer.
- Add natural language understanding capabilities to your Bot using LUIS and QnA and FAQ capabilities using QnA Maker.
- Author text and if needed speech variation responses for your Bot using language generation templates.
- Author bots in multiple languages.
- Test directly inside Composer using embedded Web Chat.
- Publish bots to Azure App Service and Azure Functions.
- Extend Power Virtual Agents with Composer (Preview).
- Integrate external services such as QnA Maker knowledge base.
Beyond a visual editing canvas, you can use Composer to do the following:
- Import and export dialog assets to share with other developers.
- Package manager provides a range of reusable conversational assets and code built by Microsoft and third parties. These assets can quickly add functionality to your project.
- Make any Bot available as a Skill for other Bots to call.
- Connect to a skill.
- Extend the dialog authoring canvas with Create custom actions.
- Integrate Orchestrator, which is an advanced transformer model-based router that can delegate from a parent bot to skills based on a user's utterance.
- Host Composer in the cloud.
- Extend Composer with plugins.
The nightly builds include pre-release features and may change how some operations are performed. The Composer documentation supports the latest stable release of Composer, and some aspects of the nightly builds may not work as described in the documentation. For more information about nightly builds, see Application settings.
Under the hood, Composer harnesses the power of many of the components from the Bot Framework SDK. When building bots in Composer, developers will have access to:
Dialogs provide a way for bots to manage conversations with users. Adaptive dialogs and the event model simplify sophisticated conversation modeling enabling more natural, dynamic conversation flow, interruption, and context switching. They also help you focus on the model of the conversation rather than the mechanics of dialog management. Read more in the dialog concept article.
Language understanding is a core component of Composer that allows developers and conversation designers to train language understanding models directly in the context of editing a dialog. As dialogs are edited in Composer, developers can continuously add to their bots' natural language capabilities using the .lu file format, a simple Markdown-like format that makes it easy to define new intents and entities, and provide sample utterances. In Composer, you can use regular expression, LUIS, and Orchestrator recognizers. Composer detects changes and updates the bot's cloud-based natural language understanding model automatically so it's always up to date. Read more in the language understanding concept article.
Creating grammatically correct, data-driven responses that have a consistent tone and convey a clear brand voice has always been a challenge for bot developers. Composer's integrated bot response generation allows developers to create bot replies with a great deal of flexibility, using the editor in the Bot Responses page or the response editor in the Properties pane. Read more in the language generation concept article.
With Language Generation, you can achieve previously complex tasks easily such as:
- Including dynamic elements in messages.
- Generating grammatically correct lists, pronouns, articles.
- Providing context-sensitive variation in messages.
- Creating Adaptive Cards attachments, as seen above.
- Provide speech variations for each response, including Speech Synthesis Markup Language (SSML) modifications, which are key for speech-based experiences such as telephony.
QnA Maker is a cloud-based service that enables you to extract question-and-answer pairs from existing FAQ-style documents and websites into a knowledge base that can be manually curated by knowledge experts. QnA Maker, once integrated into a bot, can be used to find the most appropriate answer for any given natural language input from your custom knowledge base of information.
Bot Framework Emulator
Emulator is a desktop application that allows bot developers to test and debug bots built using Composer. This tool allows for more advanced scenarios (like Authentication), which Composer's integrated Web Chat feature doesn't support at this time.
Advantage of developing bots with Composer
Some of the advantages of developing bots in Composer include:
- Authoring dialogs using the visual canvas can be more conducive to a conversational design versus code and enables you to focus development efforts on more complex tasks such as system integration.
- Design conversational experiences using a seamless blend of visual and code authoring.
- Existing dialogs authored in code can be leveraged by a Composer-based bot.
- Language generation provides the ability to create more natural, personalized responses resulting in engaging conversational experiences.
- Composer streamlines your bot project's codebase and provides a more accessible visual design surface that provides a unified canvas to author dialogs and responses, along with language and QnA resources.
- Integrated testing within the Composer authoring experience.
- Azure provisioning for dependent resources is streamlined as part of the overall Composer experience.
Apps created with Composer use the declarative dialog format, a JSON specification shared by many tools provided by the Bot Framework.
The Composer bot projects contain reusable assets in the form of JSON and Markdown files that can be bundled and packaged with a bot's source code. These can be checked into source control systems and deployed along with code updates, such as dialogs, language understanding training data, and message templates.
Existing SDK-first bots can make use of Composer for new capabilities while still making use of existing waterfall dialogs, see Migrating a bot built with the v4 SDK and waterfall dialogs to Bot Framework Composer for more information. In addition, Skills are a technique that can be used to combine different bots together.
- Bot Framework SDK documentation
- Adaptive dialog
- Language generation
- Adaptive expressions
- .qna file format