Bot Development, Frameworks and Tools

How to Choose a Framework for Your Next Bot Build

It takes a lot of planning to create a bot. Before you even get started coding, check our list of things to consider when you choose a bot framework.

September 11, 2018

With increased accessibility to bot framework providers, the pace and scale of bot creation have increased dramatically. The way we create, test, and publish bots is an ever-evolving process. This means there’s a good chance that the framework you used to build your last bot might not be ideal for your next one. The choice of framework for your next bot really comes down to your goals and ideal user interaction.

To better assist you with your next bot build, we interviewed Eli Israel, Founder and Principal Architect of Heavy Lift Technologies and surfaced our burning bot development questions.

How bots work

Let’s do a quick review. Generally speaking, there are two kinds of bots: one that uses a set of programmed rules, the other uses advanced learning techniques, such as artificial intelligence (AI), natural language processing (NLP), and machine learning (ML).

Bot’s with programmed rules are built to answer specific questions. The capabilities of those bots are fixed as they can only provide answers to questions they were preprogrammed to answer (think Amazon Eco). Wheras bots with advanced learning techniques are capable of building upon their existing knowledge and refine their answers (think ELIZA).

How bots are built

The terms framework and platform are often used interchangeably when talking about bots, but they mean vastly different things.

A bot platform refers to the engine that takes the text and messages from the user and runs them through the backend mapping built by the developer. You can use any existing platform, like Facebook Messenger, Slack, or WhatsApp, to house and launch your bot.

A bot framework is made up of prebuilt tools, features, and coding abilities. These features may or may not be tied to a specific platform. The Wit.ai framework, for example, runs only on the Facebook Messenger platform. As you research the best framework for your next bot, keep in mind the benefits and limitations of the different frameworks.

Depending on your bot’s function or purpose, you may choose to create your bot with preset, scripted responses that determine which path the interaction follows. More advanced bots use AI that accepts information from the user in a less structured way, like a voice memo or an informal text.

Well-known bot platforms

You’re probably more familiar with bot platforms than you realize. Messaging apps, like Facebook, Slack, and WhatsApp, all have open platforms for developers to build and launch custom bots. Even with little or no previous experience, you can create and deploy bots on these open platforms. A popular Facebook Messenger bot is HealthTap, which gives users quick responses to their most urgent health questions.

Voice-commanded bots, such as Alexa, Siri, and Cortana, use NLP to complete tasks for the user. However, due to proprietary knowledge, these bots don’t allow for integration with bots developed outside of their framework.
So, how do you determine which framework is best for your next build? And what’s the best framework for weekend bot-hobbyists, seasoned professional developers, and everyone in between? We have answers.

How to choose a bot framework

We asked Eli Israel, founder and principal architect of Heavy Lift Technologies, “How do you choose a framework when building your bots?” As a developer and bot builder with decades of experience, he believes bot frameworks differ from other development projects.

“It’s not so much technical as it is about user experience,” he notes. “And you need to start by thinking, who are the users interacting with your bot? What kinds of interactions are they going to expect? What should the bot do when it knows an answer versus when it doesn’t know an answer, or when it partially knows an answer? And how deep do you want that tree of possibilities to go?”

The answers to these fundamental questions are a good place to start and can point you toward the most compatible framework options.

Questions to consider when choosing a bot framework

Creating a bot takes a lot of up-front planning, even before you do any coding. As you choose a framework, consider the following:

  • What type of bot are you building? For example, an e-commerce bot can make it easier to shop for a specific item, and a lead-generation bot collects the information from qualified customers.
  • Who is the target audience? The answer to this question can inform how and where you create your bot. Bots designed to make ordering faster, like Slack’s Lunchbox, are likely to appeal to office administrators, who facilitate dozens of lunch orders every week.
  • What is your bot’s intent and use? If you’re creating a messenger bot, consider building on a framework that supports chat functionality and already has built-in users, like Slack and Facebook Messenger.
  • Is it possible to incorporate custom intents into the framework? Keep in mind, as you build, that bots must be trained to perform specific tasks and actions triggered by keywords. The more variations and examples of keywords (plus related words and synonyms) that you can provide, the higher your user success rate will be.

The more you understand about your bot, the users, and what you hope to accomplish, the easier it is to choose a framework.

Choosing a bot framework

Bot expert, Eli Israel, offers this insight when it comes to evaluating frameworks.

“A lot of the tools out there are limited to a particular platform or have to be run on their own virtual machine. And a lot of the frameworks, in fact, come bundled with a platform and can only run into one place,” explains Israel.

For most bot builds, he suggests that developers choose a bot framework that is:

  • Offers free tool. There are frameworks that require users to “pay to play,” so make sure you look for a framework that doesn’t charge, like Botkit.
  • Serverless. Serverless computing costs less to run and is easier to manage.
  • Integratable. Some frameworks are limited to specific platforms, so figure out which existing chat platforms will integrate with your project. Wit.ai, for example, works exclusively with Facebook Messenger.
  • Open source. An open source bot framework with an active developer community can help troubleshoot issues, especially when it comes to testing and insights.
  • JavaScript/Node.js compatible. JavaScript/Node.js allow for better scalability for bots, with real-time communication and interaction.
  • A single tool for both development and deployment of your bot. Too many tools can slow you down and make it harder to share your bot with the world.

Additionally, Israel recommends looking for a framework with an established community of users and developers who can offer support, help with testing, and answer questions, as you build and deploy. Frameworks should be evaluated based on attributes like:

  • Deployability
  • Scalability
  • Availability of prebuilt elements
  • Ease of updates
  • Platforms that support the framework

Available frameworks

Keeping these considerations in mind, let’s take a look at the pros and cons of some popular bot frameworks.

Amazon Lex

The framework is versatile and compatible with all voice and text applications. It comes with speech recognition and can also do text to speech in reverse. However, because it offers so many capabilities, Amazon Lex will require more time for integration and testing.

Botkit

Botkit enables users to integrate existing code and has coverage for a variety of different platforms (e.g. Slack, Facebook messager, and Cisco Spark). However, most that allow cross-platform capabilities are limiting. This also becomes a hassle when each platform gets updated.

Botpress.io

An all-in-one bot-building solution, Botpress.io uses Node.js and allows for rapid start-up. Botpress is a helpful plug-and-play tool, but it requires a license, which is not ideal for new or hobbyist builders.

Dialogflow

Previously known as API.ai, Dialogflow uses Google’s Machine Learning. It can also integrate with other chat services. Dialogflow is free for users who wish to develop their bots, but it charges for end-user interactions.

Gupshup

Gupshup's framework is a good use case for bot builders who aim to fulfill goals related to customer service, sales and/or marketing. Gupshup works with a variety of APIs (e.g. SMS, voice, email and IP messaging) and focuses heavily on conversions. However, Gupshup's design is not as user focused as other frameworks. For instance, their dashboard does not provide the best user experience (UX).

Microsoft Bot Framework

Microsoft Bot Framework is a free, flexible, all-in-one framework and platform. It can use JavaScript and .NET and can implement REST calls. It also allows access to additional developer bots. One drawback is that it runs on Azure only, limiting the interaction with other platforms.

Pandorabots

Pandorabots offers the flexibility of a bot built and integration with popular social channels. Similar to the other bot frameworks, the initial built and testing phase ends up being free (up to 1,000 messages/month). This is a really great option specifically for chat based bots. However, beyond messaging, the capabilities are currently limited.

Wit.ai

Leveraging the power of the world’s largest social media website, Wit.ai is a Facebook bot framework that uses JavaScript and allows for REST calls. The framework is free. However, testing, publishing, and deploying methods are limited to only Facebook Messenger bots.

In summary, look for free use frameworks that allow for seamless integration. Also, consider the framework’s ability to integrate custom intentions. Find a framework that already has a user base to help troubleshoot and offer insights along the way.

Start building your bot

The availability of new frameworks for bots means that anyone with an idea, a laptop, and a few extra hours can build a bot. After you’ve worked out how your bot will interact with users, you’ll have an easier time selecting the ideal framework.

For more on how chatbots work and for details on popular chatbot publishing platforms, check out our beginner’s guide to bots.