In the following there are some guides and documentations for anyone is looking for resources about Microsoft Bot Framework. Some information is taken from the Microsoft Bot Framework site and a stackoverflow answer.
In general, the Bot Framework is a platform for building, connecting, testing, and deploying powerful and intelligent bots. You can think of a bot as an app that users interact with in a conversational way. Bots can communicate conversationally with text, cards, or speech. A bot may be as simple as basic pattern matching with a response or it may be a sophisticated weaving of artificial intelligence techniques with complex conversational state tracking and integration to existing business services.
The Bot Framework supports several popular channels for connecting your bots and people. Users can start conversations with your bot on any channel that you’ve configured your bot to work with (e.g. email, Facebook, Skype, Slack, SMS).
The Microsoft Bot Framework provides just what you need to build and connect intelligent bots that interact naturally wherever your users are talking, from text/SMS to Skype, Slack, Office 365 mail and other popular services.
Recently Microsoft added Cortana, Skype for business (Lync) and Bing as channels (according to Build 2017).
Why use the Bot Framework? Because it includes several helpers:
- A Bot Builder (download from NuGet; see get started), which provides rich and full-featured SDKs for the .NET and Node.js platforms. The SDKs provide features that make interactions between bots and users much simpler. Bot Builder also includes an emulator for debugging your bots, as well as a large set of sample bots you can use as building blocks.
- A Bot Framework portal that gives you one convenient place to register, connect, and manage your bot. It also provides diagnostic tools and a web chat control you can use to embed your bot on a web page.
- The Bot Framework supports several popular channels for connecting your bots and people. Users can start conversations with your bot on any channel that you’ve configured your bot to work with, including email, Facebook, Skype, Slack, SMS: they are getting more and more (e.g. Cortana channel).
- You can take advantage of Microsoft Cognitive Services to add smart features like natural language understanding, image recognition, speech and more. Learn more about adding intelligence to your bot.
The best way to start can be to look to the quickstarts page where you can find a detailed walkthrough for creating your first boot with your preferred option:
- Bot Builder SDK for .NET,
- Bot Builder SDK for Node.js,
- Azure Bot Service,
- REST API
- The Bot Connector REST API enables your bot to send and receive messages to channels configured in the Bot Framework Portal
- The Bot State REST API enables your bot to store and retrieve state associated with the conversations that are conducted through the Bot Connector REST API
- The Direct Line REST API
Download Visual Studio project templates to accelerate bot development:
Download the Bot Application, Bot Controller, and Bot Dialog .zip files. Install the templates by copying the .zip files to your Visual Studio 2017 project templates directory. NOTE – The Visual Studio 2017 project templates directory is typically located at:
%USERPROFILE%\Documents\Visual Studio 2017\Templates\ProjectTemplates\Visual C#\
- Bot template for Visual Studio for developing bots with C#
- Cortana skill template for Visual Studio for developing Cortana skills with C#
Microsoft Bot Framework Documentation
Here you can access documentation on .Net and Node.js
In the Blog section of the portal you can find a lot of interesting insights, like the following:
- Command Pattern architecture in your Bot using Scorables (Using Scorables for global message handling and interrupting dialogs in Bot Framework)
- Speech Support in Bot Framework – Webchat to Directline, to Cortana
- Azure portal
- Bot Framework portal (My bots) ;
- Preview bot features with the Channel Inspector (Channel inspector)
Microsoft Virtual Academy
- Creating Bots in the Microsoft Bot Framework Using C# (sample on GitHub)
- Creating Bots in the Microsoft Bot Framework Using Node.js
All the latest releases of the bot framework, tech demos and key notes.
- What is a BOT and how to create one…
- What’s new with the Microsoft Bot Framework (May 8, 2017) – Overview of new Bot Framework features – Bots – What are they? Why now? Best practices and real life scenarios – BOTs: The benefits of this technology
- Bots 101 – Scenarios for bots
- Intro to Bot Framework. This from APAC DevSquad Showcase
- Building an Intelligent Bot. (No coding but nice guide on how to use Microsoft QnA Maker API)
- DevOps for the Bot Framework.
- What’s new with the Microsoft Bot Framework. (from Microsoft Build 2017)
- Bot Analytics Dashboard.
- Dialog management in Bot Framework
- Bot capabilities, patterns and principles
- Bot Human Handoff
- More Bot Demos and Advanced Considerations
- Building a Conversational Bot: From 0 to 60 (3/2016)
- Testing the Bot Framework
- Continuous Integration for the Bot Framework
- Introduction to the Bot Framework and why DevOps for it
- Building an Intelligent Bot
- Build a Chat Bot with Azure Bot Service
- Introducing the Azure Bot Service
- Dialog management in Bot Framework
- Bot Human Handoff
- Bot Analytics Dashboard
- Microsoft Bot Framework Skype for Business Integration – Outbound Messaging to Skype for Business Clients
- Microsoft Bot Framework with Xamarin and UWP
- Cortana Skill Demo Event Bot (GitHub code)
- Getting started with bot development using Microsoft Bot Framework
- Bot Dialogs
- Dynamic Dialog Bot Sample
- Installation of Bot Framework (Preview) SDK to Visual Studio as a Template
- Bot design guidelines
- Designing conversational UI for bots (and humans)
- Conversations as a Platform with Azure Bot Service and Cortana Intelligence
- Bot conversations for apps
- Microsoft Bot Framework and how we created the Azure Bot
- Conversational UI using the Microsoft Bot Framework
- For the Dev: Tips to Coding a Successful Bot That aren’t Obvious
- Using Microsoft Graph with Cortana
- Formflow and Appinsights (how you can use FormFlow, a special type of dialog within the Bot Framework, to automate the handling of guided conversation; how to easily add Application Insights to a bot to send telemetry to Azure for analysis later)
- Simple Intelligent Bot using Microsoft Bot Framework & Cognitive Services
- Meet the presenter bot, a bot that presents about bots
Apart from all above pluralsight realeased a course named Getting Started with Building Bots with Microsoft’s Bot Framework (using c#) This course bit old but it contains all the details to jump start. I hope they update the content soon 🙂
To get the samples, clone the BotBuilder-Samples GitHub repository using Git.
- BotBuilder samples repository: task-focused samples in C# and Node.js to help you get started with the Bot Builder SDK.
- More samples in the SDK: Bot Builder SDK (C#, Node.js): the Microsoft Bot Builder SDK is one of three main components of the Microsoft Bot Framework.
- BotBuilder-CognitiveServices: the Microsoft Cognitive Services controls for Microsoft Bot Builder
- BotBuilder-Location: an open-source location picker control for Microsoft Bot Framework powered by Bing Maps REST services
- Other Microsoft Bot resources on GitHub
Bots examples with Cortana, speech recognition and synthesis :
- Build a speech-enabled bot with Cortana skills
- How to enable speech in Web Chat (BotFramework-Samples/docs-samples/web-chat-speech):
- Speech Support in Bot Framework – Webchat to Directline, to Cortana (TriviaBotSpeechSample, BotFramework-WebChat)
Other useful links
- Bot Framework Emulator (Debug bots with the Bot Framework Emulator): botframework-emulator-Setup-3.5.33.exe
- Enable speech recognition: The Bot Framework Emulator supports speech recognition via the Cognitive Services Speech API. This allows you to exercise your speech-enabled bot, or Cortana skill, via speech in the emulator during development. The Bot Framework Emulator provides speech recognition free of charge for up to three hours per bot per day.
- F.A.Q. – Bot Framework Frequently Asked Questions (Question and Answer Bot)
- If you already have a bot and would like to reach the Skype audience, your bot can easily be connected to Skype (or any supported channel) via the Bot Builder for REST API (provided it has an internet-accessible REST endpoint).
Direct Line is a REST API that allows you to add your bot into your service, mobile app, or webpage. You can write a client for the Direct Line API in any language. Simply code to the Direct Line protocol, generate a secret in the Direct Line configuration page, and talk to your bot from wherever your code lives. Direct Line is suitable for:
- Mobile apps on iOS, Android, and Windows Phone, and others
- Desktop applications on Windows, OSX, and more
- Webpages where you need more customization than the embeddable Web Chat channel offers
- Service-to-service applications
- R Succinctly 2 (2017 James McCaffrey)
- R Succinctly 1 (2014 Barson Poulson)
- Python Succinctly
- Spark Succinctly
- Hadoop Succinctly
- HDInsight Succinctly (*)
- MATLAB Succinctly
- Node.js Succinctly
- GitHub Succinctly
Design issues (from *)
A good bot solves the problem that user needs to address and delivers a great user experience.
The process of designing a bot is like the process of designing an app or website:
- Easily solve the user’s problem with the minimum number of steps and not requiring to type/talk too much, repeat information or explains things the bot should authomatically know,
- Solve the user’s problem better/easier/faster than any of the alternative experiences,
- Run on the devices and platforms the user cares about,
- Easy discoverable and the users naturally know what to do when using it.
Less relevant are maters like how smart the bot is, how much natural language capability it has, whether it uses machine learning: obviously completely irrelevant is which programming language was used to create it for the end user prospective.
Well design especially the first interaction giving all the relevant information to the user in order he can intuitively understand how to proceed in using it: therefore starting the bot with an open-ended question such as “How can I help you?” is generally not recommended. It is much better to have buttons or lists of options to convey the capabilities of the bot to the user: using menu let the user avoid to type too much (just click on an item or write its id in the list) but you may anyway support a free form input so, if a user responds to the initial menu by typing rather than by selecting a menu option, your bot could attempt to parse the user’s text input.
If your bot collects personal data from the user, it’s important to convey as soon as possible the privacy issue and to describe what will be done with that data.
Bots have a UI, but it is made up of dialogs, rather than screens as it happens in sites and apps: dialogs enable the bot developer to logically separate various areas of bot functionality and guide conversational flow.
Dialogs may or may not have graphical interfaces. They may contain buttons, text and other elements or be entirely speech-based. Dialogs also contain actions to perform tasks such as invoking other dialogs or processing user input.
Cognitive Services: Test the Text Analytics APIs
I tried this sample page also using the Italian language (not officially supported yet) and I was really surprised of the results as you can see from the following screenshots:
… even in difficult cases: