Microsoft Bot Framework web site

Introduction to the Microsoft Bot Framework

Back at the end of March, at their annual Build conference, Microsoft announced the Bot Framework. As I have been working with the framework for a couple of months now since it was announced. This post is intended to give you a bird’s eye view of what the Bot Framework is and what you can do with it, with me going into more granular details in later posts.

So, let’s start at the beginning…..

What is a bot?

There are differing definitions of what a bot is (and if you were expecting me to say that they are the larva of the botfly, then you’re probably on the wrong page), but they way I like to think about them (in the context of what we can create with the Bot Framework) is an application that can carry out automated tasks or provide information to a user based on their input, but with the user being able to interact with the bot in the same way they might interact with another human.

Think about ordering some take-out food, specifying your order and your address without needing to speak to anyone.  Previously we might have completed a form online or used an app, but now using a bot we could just say, “I would like 2 x hot curry and some poppadoms delivered to 17 Cheery Tree Lane”, and the bot would understand that we wanted 2 portions of curry, hot, with poppadoms and to have them delivered to Cherry Tree Lane.  This is probably, for me, the best thing about modern bots in that they can be so much more natural and engaging. It just feels better.

Bots are now popping up everywhere, from Facebook to Twitter and many more platforms.

OK…got it…so what is the Microsoft Bot Framework?

The Microsoft Bot Framework is a suite of tools and resources designed to help and empower developers to make creating the type of conversational chat bots I mentioned above. These tools provide developers with all of the underpinnings that every bot needs, such as basic interaction (input / output) as well as dialog and language capabilities. The framework also allows you to surface your bots in the places that they are already having conversations, such as Facebook Messenger, Skype, Slack, web chat, Office 365 mail, SMS / text and more common services.

bot framework channels
Bots can be surfaced through a number of popular channels

The Bot Framework consists of 3 major components.

Bot Builder SDK

The SDK portion of the framework gives you what you need to actually build bots that are based on .NET / C#, Node.js or a REST API. Regardless of your choice of approach between these options, the SDK allows you to create Dialog classes, which model the conversations your bot can have with the outside world.  The different types of Dialog you can create include;

  • Yes / No prompts
  • Accepting a simple string
  • Giving the user a choice from a number of options (even supporting displaying the options as buttons in supported clients, such as Facebook and Slack)
  • FormFlow – allowing you to model a multi-stage, more back and forth conversation

Using the SDK you can also implement rich interactions for your end users when interacting with your bot, such as sending / receiving attachments, using images and serving up cards (which I will go into in a later post).  The SDK now even supports Skype Calling.

In order to add some intelligence to your bot, the team behind the framework have added extensions to allow you to integrate with the Microsoft Cognitive Services suite, such as LUIS (Language Understanding Intelligence Service) for interpreting a users intent through natural language, speech and facial recognition or translation services.  As an example, the LUIS service takes input provided by a user and, based on a model created and trained by you, determines the likely intent. For example, you might say, “I would like to book a holiday” or “I need to take some annual leave” and for both cases the service would tell the developer that their intent was to “Book a holiday”.

A very capable emulator is also available to allow you to debug and test your bots locally, giving you the ability to see the full JSON request / response stack between the emulator and your bot.

Bot Framework Portal

The Bot Framework Portal is where you register and manage your bots.  Here you create a profile for each bot that you create and then configure the channels that you would like your bot to be made available through.

The channels for Web Chat and Skype are even configured for you right out of the gate. Then, for each additional channel that you want to create there are helpful step-by-step guides to inform you of the steps required to complete channel setup, such as registering your bot in your chosen platform, and then enabling optional functionality, like support for Interactive Messages in Slack.

bot framework portal
Bot Framework Portal provides step-by-step instructions for registering a channel

Once you have published your bot you can test the connection to ensure it is responding as expected and even add a connection Azure App Insights to allow you to collect useful telemetry for your bot.

Bot Directory

The final piece in the Bot Framework puzzle is the Bot Directory.  This is where, once you are ready, you can submit your bot for inclusion in a public directory to allow others to use your bots.

You can use functionality in the Bot Framework Portal to assist you in publishing your bot to the Microsoft Bot Directory, as well as other support bot directories, such as the Skype apps directory.

Right now, since the end of April, the directory is open for submissions but bots submitted to it are not yet available to the public.  That being said, it is still worth a visit to the bot directory as Microsoft have published a number of featured bots in order to showcase some of the capabilities of the Bot Framework. These featured bots include the Bing News Bot which, as you might imagine, allows you to search the web for latest news using Bing and the Summarize Bot which can provide an overview of the main points within a web page if you don’t have time to read the whole thing.

Microsoft Bot Directory
Featured Bots in the Microsoft Bot Directory

Summary

Hopefully you should now have a good overview of the Microsoft Bot Framework, its capabilities and what its major components are.  In future posts I will dive into detail about creating bots and the various intelligence services you can use to support them.

In the meantime, if you are keen to get started, just head on over to http://dev.botframework.com where you can find some documentation and to Bot Builder repository on GitHub, where the team behind the framework are very active and very willing to help developers.

Are you excited about the Bot Framework?  Have you already started building bots?  I would love to hear from you and your thoughts.

One thought to “Introduction to the Microsoft Bot Framework”

Leave a Reply

Your email address will not be published. Required fields are marked *