Bot Basics

Popular Chatbot Frameworks

When you're ready to build your chatbot, you'll need the right framework. Chatbot frameworks are digital spaces where coders and developers build bots from the ground up. This guide covers some of the most common bot building frameworks out there: Amazon Lex, Dialogflow, and Microsoft Bot Framework.

May 1, 2018

What's a Chatbot Framework?

Chatbot frameworks—or bot frameworks—are digital spaces where developers build bots from the ground up from predefined functions and classes. Frameworks make it easier to create a customized chatbot than starting from nothing, but they still require advanced coding knowledge to use.

The bot industry is very new, and there’s still plenty of confusion surrounding is terminology. You can create bots with both frameworks and platforms. What’s the difference?

To use a skiing analogy, bot platforms are the easy slopes and bot frameworks are the expert-only runs. Popular bot building platforms include Chatfuel, Botkit, or Motion.ai, but there are dozens of great options out there. Most bot platforms allow users to create bots without any coding knowledge using drag-and-drop functionality. These bot building platforms go hand in hand with bot publishing platforms, like Facebook, Slack, or Twitter, where easy-to-build bots are launched for interaction.

Bot frameworks, on the other hand, are more complicated. You can think of a framework as a kind of toolkit for development, with ready-made code snippets that plug into an API easily. Popular frameworks allow developers to build for natural language and robust customization and create bots that will integrate with a wide variety of publishing platforms.

Of course, there are advantages and disadvantages to each major framework. Here’s how to choose between Amazon’s Lex, Google’s Dialogflow, and the Microsoft Bot Framework, and what particular features each platform possesses.

Beginner' Guide to Popular Chatbot Frameworks

How to choose a chatbot framework

Amazon’s Lex, Google’s Dialogflow, and the Microsoft Bot Framework all offer similar capabilities and integrations. How do you choose which to get started with?

Mostly, the decision will be based on what you’re familiar with and what you want to do with your bot. The biggest distinction between the frameworks is the development ecosystem and assistant they support best. Lex is best for Alexa, Dialogflow is best for Google Assistant, and Microsoft Bot Framework is best for Cortana.

Similarly, the cloud services that support each framework are different for the respective companies. For example, someone who is already an Azure client might choose to create their bot with Microsoft Bot Framework from their existing Azure account. An Amazon Web Services client, or someone who is interested in serverless hosting through AWS Lambda, would want to go with Lex. For hosting with the Google Cloud Platform, you would likely choose Dialogflow.

Even if you’re not already hosting something somewhere, you might just be more familiar with one company’s offerings in general. Do you use Google Drive or Microsoft Office 365 for file sharing and storage? Are you in the e-commerce space and listing products to Amazon? Each framework lives within the larger ecosystem of each company, so if you’re familiar with the language and UI of one brand that might make it easier to create your bot with that framework.

All three frameworks use relatively the same workflow for building and training the bots. Choose one of them based on what you’re most familiar with already and what product suites or hosting methods you want to integrate with in the future.

To learn more about the unique features of each platform, read on.

Amazon Lex

Amazon’s Lex excels when it comes to voice capabilities. A bot built with Lex can easily integrate with the digital personal assistant Alexa, the most popular in-home assistant. (Alexa maintains a three-to-one market share advantage to Google Home, the closest leading competitor.) This allows developers to create bots that can automatically process voice or text input interchangeably.

This is because bots built with Lex can be seamlessly integrated with the Alexa Skills Kit (ASK). ASK contains tens of thousands of “skills” for Alexa, which include anything that third-party developers teach her to do beyond her out-of-the-box functionality. Developers can export their Lex-built chatbot schema directly into ASK, creating a version of their bot that can communicate through voice without any extra scaffolding. That’s a massive advantage for anyone hoping to make their bot voice-capable.

Lex is also simpler to use than other leading bot frameworks. Lex-built bots can draw from a vast predefined list of subjects and entities. (Examples include movies, music, countries, locations, dates, times, numbers, genders, cars, or airports.) If your bot stays within certain topic areas, there’s a whole lot less you have to teach it. (For example, a bot built with Lex is immediately able to connect the word “tomorrow” with a date on the calendar.) For bots that need to understand simple commands or developers who are less experienced, Lex is a good choice.

Developers can use the AWS Management Console or a platform library to access Lex and to create and store bots. If you already use AWS Management Console or have an AWS account, it syncs up immediately. You can also take advantage of Amazon’s serverless hosting option, Lambda, which allows for dramatic reductions in hosting costs and cleaner, container-defined code executions.

Microsoft Bot Framework

Microsoft Bot Framework is a good platform for developers looking for serious customization and robust capabilities. Like many things that are more complicated, it’s more powerful, with an arsenal of connectivity behind it.

Microsoft Bot Framework uses the Microsoft Bot Builder, which (like Lex) offers a set of predefined functions and classes. Developers can plug-and-play with these premade code blocks, but there is still a great deal of hand-coding necessary. Actions for each user’s intent must be created from the application side, meaning that non-technical team members might have a hard time collaborating.

Microsoft’s LUIS (Language Understanding Intelligent Service) is part of the Microsoft Bot framework. LUIS provides the Natural Language Processing intelligence behind the Bot Builder and also Microsoft’s personal assistant Cortana. LUIS allows bots built with Microsoft’s Bot Builder to draw from a deep library of NLP knowledge.

The Microsoft Bot Framework requires users to log into an Azure account. From there, a user can create a new bot service. The system has three major parts: Bot Connector, a developer portal, and Bot Directory. Developers use the Azure Bot Service as a resource for building, testing, deploying, and connecting bots—all from the single location of Microsoft’s well-regarded Integrated Development Environment (IDE).

Dialogflow

Dialogflow is Google’s contribution to the bot framework pantheon. Though newer and less robust than Lex or the Microsoft Bot Framework, it offers its own unique advantages.

Until recently, Dialogflow was known as API.AI, and many of the resources regarding the framework still refer to it by its old name. Google changed the name in October of 2017 to reflect the fact that the service wasn’t just an API anymore, but a robust conversational interface tool that could compete with other frameworks.

Like Lex and Microsoft Bot Framework, Dialogflow offers prebuilt agents, multi-language support, and in-line code editing. It’s also created with Google’s famously-keen eye for design and intuitive interfaces. Bots built on Dialogflow integrate easily with Google Home and can be hosted with Google Cloud Platform (though serverless options are still limited to Early Access Program members).

Dialogflow’s most distinct advantage is Chatbase, its analytics program. Google is already a kingpin of web and user analytics, thanks to its long-established Google Analytics platform, and their early efforts in the space of chatbot analytics will set them apart in the long run for data crunchers. Chatbase provides similar functionality and visibility to Google Analytics, but for chatbots, providing information about how, when, and who are using chatbots. Chatbase works with bots built on other frameworks, but for anyone who values complete accuracy and visibility into their data, the native Chatbase integration is a major win.