Microsoft Bot Framework is a comprehensive offering to build and deploy high quality bots for your users to enjoy in their favorite conversation experiences. Developers writing bots all face the same problems: bots require basic I/O; they must have language and dialog skills; they must be performant, responsive and scalable; and they must connect to users – ideally in any conversation experience and language the user chooses. Bot Framework provides just what you need to build, connect, manage and publish intelligent bots that interact naturally wherever your users are talking – from text/sms to Skype, Slack, Facebook Messenger, Kik, Office 365 mail and other popular services.
Bots (or conversation agents) are rapidly becoming an integral part of one’s digital experience – they are as vital a way for users to interact with a service or application as is a web site or a mobile experience. Developers writing bots all face the same problems: bots require basic I/O; they must have language and dialog skills; and they must connect to users – preferably in any conversation experience and language the user chooses. The Bot Framework provides tools to easily solve these problems and more for developers e.g., automatic translation to more than 30 languages, user and conversation state management, debugging tools, an embeddable web chat control and a way for users to discover, try, and add bots to the conversation experiences they love.
The Bot Framework consists of a number of components including the Bot Builder SDK, Developer Portal and the Bot Directory.
Language | Version | Release Date |
---|---|---|
Node.js | 3.7.0 | 2017-02-23 |
C# | 3.5.5 | 2017-03-07 |
C#
Visual Studio 2015 (latest update) - you can download the community version here for free: www.VisualStudio.com
Important: update all VS extensions to their latest versions Tools->Extensions and Updates->Updates
Download the Bot Application template from here: Template Download Save the zip file to your Visual Studio 2015 templates directory which is traditionally in "%USERPROFILE%\Documents\Visual Studio 2015\Templates\ProjectTemplates\Visual C#" Note: you will need to restart visual studio after this step, in order to use the template.
Once your bot is finished being created, you should have a solution similar to this:
Node.js
npm init
.npm install --save botbuilder
npm install --save restify
var restify = require('restify');
var builder = require('botbuilder');
// Setup Restify Server
var server = restify.createServer();
server.listen(process.env.port || process.env.PORT || 3978, function () {
console.log('%s listening to %s', server.name, server.url);
});
// Create chat connector for communicating with the Bot Framework Service
var connector = new builder.ChatConnector({
appId: process.env.MICROSOFT_APP_ID,
appPassword: process.env.MICROSOFT_APP_PASSWORD
});
var bot = new builder.UniversalBot(connector);
node index.js
.This is a basic setup that will be required for all bots created with bot framework. You can treat this as a blank template project to start with. It initializes a restify server for your bot and creates a connector to connect local machines with your server.
Downloading Emulator for Debugging (Both for node and C#)
Download and install the Bot Framework Emulator Emulator Download
Run the emulator, and enter the url from step 5 (C#) into the Endpoint URL text box. Then, click "Connect".
Congratulations on creating a Bot using the Microsoft Bot Framework!