1. Home
  2. Training Library
  3. Microsoft Azure
  4. Courses
  5. Creating a Bot Using Microsoft Bot Framework Composer

Overview of Bot Framework Composer

Overview of Bot Framework Composer

This course shows you the fundamentals of how to create, test, troubleshoot, and publish chatbots using the Microsoft Bot Framework Composer. You’ll learn about dialogs, triggers, and prompts and how these can be used to model conversational logic in your chatbots. We'll cover how to work with state and variables before moving on to how to control chatbot output by using language generation and how to implement adaptive cards to create rich user experiences.

Then we'll explore how the Bot Framework Emulator, Webchat Window, Watch Window, and Application Insights can be used to debug your chatbot. Finally, we'll show you how to get your chatbot published on Azure and how to test your chatbot using the Azure Portal.

Learning Objectives

  • Use Bot Framework Composer to create chatbots
  • Implement dialogs and maintain state
  • Implement logging for a bot conversation
  • Implement prompts for user input
  • Troubleshoot a conversational bot
  • Add language generation for a response
  • Design and implement adaptive cards
  • Test and publish a chatbot 

Intended Audience

This course is intended for developers or software architects who want to learn more about Bot Framework Composer and how it can be used to create conversational AI solutions in Microsoft Azure. 


To get the most out of this course, you should have:

  • Intermediate knowledge of coding techniques
  • Familiarity with Azure concepts such as App Service and resources
  • An understanding of JSON

Let's look at an overview of Bot Framework Composer. In this lecture, we're going to introduce what Bot Framework Composer is. We'll look at some of the key features that Bot Framework Composer provides. We'll see some of the things that you can do with Bot Framework Composer. And finally, we'll see a demo of Bot Framework Composer and how these features can be used. Bot Framework Composer is an open source IDE from Microsoft. It ships with an easy to use designer canvas and using the click and create interface makes it simple for you to create chat bots that run in Microsoft Azure.

Bot Framework Composer provides you with features that provide many benefits. Some of these include giving you an efficient way to create conversational AI solutions. An easier experience to design and model conversational logic. The click and create interface can improve accessibility to chat bot development for citizen developers. After building your chat bot and composer, you can automatically publish it to Azure using a wizard. Any required Azure resources will automatically be provisioned. One of the great features of the bot framework SDK is that you can blend composer generated assets with code first chat bots.

This approach to chat bot development is something that I've personally done many times with success. It helps accelerate the development process. It also gives you the option of creating solutions with high levels of customization. You have a few options in terms of using Bot Framework Composer. You can use composer as a desktop application. You can choose to host it in the cloud or you can even build and run the source code locally. The desktop version of Bot Framework Composer is available from the URL that we can see here. This version is available for windows, MacOS and Linux. And this generally the preferred way to use the tool.

To install the desktop version of Bot Framework Composer, you need to ensure that you have Node JS with NPM installed. You also need to install the dot NET Core SDK. Don't worry too much about missing any of the prerequisites during the installation process. Bot Framework Composer will let you know if anything is missing. You also have the option of hosting composer in a web application on a Linux VM in Azure.

Installing composer on a VM, contains multiple steps and requires multiple prerequisites on your VM. Prerequisites include Node JS, NPM, Yarn and dot NET Core. You also need to be comfortable with the Linux command prompt. You may choose this installation approach in environments where users have restricted access to installing software on their machines. You can find out more detailed information about hosting Bot Framework Composer in the cloud by visiting the URL that we can see here.

If you'd like to make customizations to Bot Framework Composer, you also have the option of building and running the source code on your local machine as a web application. You need to install Git on your development machine along with Node JS, the package manager Yarn and the NET Core SDK. You can find the source code for composer at the URL that we can see here. If you decide to build and run composer locally, be sure to take any updates from the Microsoft GitHub repo to ensure that your copy is kept up to date.

Let's look at some of the key features that share with Bot Framework Composer. Composer contains many features to help you create innovative chat bots Out-of-the-box templates are included to help accelerate your chat bot development process. A variety of widgets and activities are also available to help you model conversations. These can include sending messages, collecting data from users, or even connecting to third party web services. It's common for the conversational style of a chat bot and voice and text channels to be different.

Composer makes it easy for you to create speech and text variations of any response he sent by your chat bot. Support for natural language processing is also available in composer. This feature makes it simple for you to create conversationally isolation that can understand human language. You might want to you any chat bots you've created a composer in the power platform. Composer contains a feature that lets you export composer assets and input them into power virtual agent. Use this feature if you have people with varying levels of technical knowledge within your workforce.

A nice feature of Bot Framework Composer is that after developing your chat bot, you have the option of automatically provisioning the required resources directly in Azure. You don't need to select this option however, if you have existing resources in Azure, you can also manually change the underlying app settings JSON file to use your existing Azure resources. The default language you can pose it as set to English, but you have support for multiple languages.

Composer also makes it easy for you to test your chat bot. The built-in web chat feature lets you quickly test and debug your chat bot, composer contains features that let you integrate with APIs or external services such as the Microsoft Q and A Maker. This is a powerful feature as it lets you leverage existing IP or complex business processes in your chat bot. The designer canvasing composer is a key feature of the product that helps you create rich conversational experiences. Items known as activities are added to the designer canvas by using a click and create interface. Dialogue library and prompts that you model conversational logic. 

Variables help you track information being used in conversations. For example, your chat bot can ask a customer what they'd like to order, you can store this information in a variable. Images, text and adaptive cards that you create innovative ways for users to interact with your chat bot. Composer also contains features that let you integrate with industry standards, security protocols such as OAuth. If a human is unable to achieve what they want with your chat bot, you can also configure composer to hand off the conversation to a human operator.

An adaptive card is a platform agnostic snippet of JSON. You can use adaptive cards in Bot Framework Composer to create almost any type of UI element for people to interact with when having a conversation with your chat bot. Here we can see the adaptive cards portal on the web. On the left, we can see the different types of adaptive card element that we can add. Here, we can see some sample JSON. That lets us render the adaptive card that we can see on the right. We'll take a closer look at adaptive cards in the future lecture and see how these can be integrated with your chat bots.

The HTTP request activity and composer makes it simple for you to integrate your chat bot with external systems or internal or external APIs. This is an approach that I've often used in the past. For example, I'll often create an API that does most of the heavy lifting in data processing. I then use the HTTP request activity and composer to consume that API in any of the data that it returns. Composer also makes it simple you to integrate your chat bot with a Language Understanding Intelligence Service LUIS Integrating LUIS will let people interact with your chat bot in a more human like fashion, support for Q and A Maker knowledge base is also available.

Connecting your chat bot to a Q and A Maker resource is a quick way for your chat bot to leverage existing information and conversations. You can also use composer to help accelerate your chat bot development process. For example, business users, with an understanding of flow charts and basic billion logic can most likely create a chat bot using Bot Framework Composer. This means that you can free up developers to work your most specialized tasks that might involve the bot framework SDK. These activities can be done in parallel, thereby accelerating the development process of your chat bot.

The technology and concepts and features we've covered so far, let you build easy to use chat bots. Using some of these can give you as new ways of interacting with data processes or systems within your organization. We've covered quite a bit so far in this lecture, so it's now time for a demo. In this demo, we'll have a quick look around Bot Framework Composer and some of the key areas of the application. So here we can see Bot Framework Composer. This is the windows version that's being run in my local machine.

We can see the interface is split up into four main sections. The navigation menu gives you access to features so that your create, configure, publish and integrate your chat bot with other services such as the knowledge base. You can also access predefined packages to help accelerate your development by using the package manager. Here we can see the bot Explorer. The bot Explorer can be used to create dialogues, remove dialogues or configure triggers.

You can think of a trigger as an event that fires when a particular action occurs. That's maybe when an intent has been detected by the natural language processing features of your chat bot. You can also detect when a Q and A Maker intent has been recognized or even when a custom event has been raised by a dialogue. This section here is the designer canvas. The designer canvas is where you click and create your chat box conversational logic. For example, we can select the greeting intent over here. The designer canvas refreshes a conversation update activity event is received when someone joins a conversation, that's what we can see here. A welcome message is then sent to the person connecting to the conversation. Clicking on the plus node underneath the welcome message will display a context menu, so we'll try that just now.

The context menu contains a variety of capabilities that can be added to your chat bot. For example, you can send another message, ask a question, create a logical condition, manipulate dialogues, properties, or even access external resources. Some debugging options are also available. For this example, we'll send another message to the user. We can do that by clicking on this option here. The send response activity is added to the designer canvas. Bot Framework Composer gives us new activity focus, and the proper's pain is displayed for this item. That's what we can see here.

The properties pane lets you configure the various settings for a particular activity that you have selected on the designer canvas. The items that you see in the properties pane depend on the type of activity that you've added. For this example, we'll send a secondary message. Can do that by selecting the text box and typing in a message. Note the hyphen prefix before the text, this is needed by composer to indicate that a string is being supplied.

Finally, we can run the chat bot by clicking on this item here. This will start running the chat bot in the background. With the chat bot running, we can test it using one of two ways. We can either open the inbuilt web chat feature of composer or test it using the emulator. We'll use the inbuilt web chat feature of composer to test our chat bot. Here we can see the initial welcome message and the new message that we've just added.

In this lecture, with anchorage's Bot Framework Composer. We've looked at some of its key features. We've seen what you can do with Bot Framework Composer. And finally, we explored some of the key sections within composer and a purpose. Next, we'll take a deeper dive into dialogues triggers and prompts. We'll see how to work with variables in state. We'll use these features to create a chat bot that collects and processes user input.

About the Author
Jamie Maguire
Software Architect, Developer, and Microsoft MVP (AI)

Jamie Maguire is a Software Architect, Developer, Microsoft MVP (AI), and lifelong tech enthusiast with over 20 years of professional experience.

Jamie is passionate about using AI technologies to help advance systems in a wide range of organizations. 

He has collaborated on many projects including working with Twitter, National Geographic, and the University of Michigan. Jamie is a keen contributor to the technology community and has gained global recognition for articles he has written and software he has built. 

He is a STEM Ambassador and Code Club volunteer, inspiring interest at grassroots level. Jamie shares his story and expertise at speaking events, on social media, and through podcast interviews. 

He has co-authored a book with 16 fellow MVPs demonstrating how Microsoft AI can be used in the real world and regularly publishes material to encourage and promote the use of AI and .NET technologies.