Building Bots with the Botpress Framework
Botpress is an open source, on-premises chatbot framework with a native NLU engine. Explore the basics of this framework, which is equipped with graphical bot-building tools for non-technical users. With Botpress, developers get granular control over all functions and business users can design conversation flows.
August 20, 2019
The Botpress name is no accident. Its creators envisioned a chatbot framework that was both open source and loaded with graphical tools that non-developers could use. Kind of like a specific CMS for websites, right?
Just as WordPress provides an infinitely extendable set of features for creating any kind of website, Botpress offers a flexible bot-building experience that allows you to create everything from simple bots for popular messaging channels to AI-powered assistants for specific enterprise activities. For WordPress, there are plugins. For Botpress, there’s the ability to integrate any natural language understanding (NLU) engine.
The Botpress product literature describes the development experience as “Lego-like.” Let’s explore this framework to get a sense of what you can build and how to go about it.
What is Botpress?
To better understand the fundamentals of this framework, we spoke with Botpress Director of Operations Jean-Bernard Perron. According to Jean-Bernard, open source is a key advantage, but it’s not necessarily the framework’s hallmark. From a business perspective, being an on-premises framework is what really separates Botpress from its peers. “Many of our enterprise clients are in financial services, insurance, and government,” Jean-Bernard explains. “Their conversational data is highly confidential.”
Too confidential, that is, for the cloud. When an organization’s survival depends on the security protocols it employs to protect customer data, the risks of storing that data on third-party servers can be too great to bear. And that’s not even considering that many such companies must comply with stringent security regulations. In those cases, cloud-based options might not be just risky—they might also be prohibited.
Botpress is an open source, on-premises chatbot framework with graphical bot-building tools. Those are its high-level characteristics. More granular capabilities include straightforward integration with a variety of bot-building tools, including NLU engines from other frameworks, and multiple SDKs and APIs that make Botpress highly extendable.
And, although Botpress excels in enterprise environments where on-premises development and hosting are a must, you don’t have to work at a big organization to start using it. You don’t even have to be building a complicated chatbot. What’s more, the Community version of Botpress is free and comes with onboard NLU. The barriers to entry are modest.
Botpress chatbot examples
With any flexible chatbot framework, the possibilities for bot building are endless—and Botpress is no exception. From virtual enterprise assistants to consumer-facing bots that live on popular messaging platforms, developers can use Botpress for pretty much anything.
Virtual enterprise assistant chatbots
A subsidiary of Thomson Reuters, Domínio Sistemas is a Brazil-based company that makes tax and accounting software. To effectively manage around 8,000 daily customer support queries, the company flagged repetitive questions that could be answered by a chatbot. This would allow human agents to use their time more efficiently.
According to a case study published by Botpress, Domínio needed a framework that let business users design conversation flows with a GUI and that allowed developers to perform unrestricted customizations.
Ultimately, Domínio used Botpress to build TRIA, a bot that lives inside the tax and accounting software. When users have a question about a common issue, they can activate TRIA instead of contacting support. To customize their experience and provide more valuable assistance, TRIA can also track how users interact with the software.
Health and lifestyle chatbots
OneRemission is a startup that aims to help cancer patients and survivors learn about post-cancer health and lifestyle decisions. The company worked with KeenEthics, a software development company, to build its flagship, chatbot-driven mobile iOS app.
Built with Botpress, the OneRemission bot provides lifestyle tips to users to help them avoid getting cancer again. Its nutritional and activity-related advice is based on principles of integrative medicine.
Another Botpress-built chatbot that serves a consumer audience is Boost. This chatbot lives on Facebook Messenger and delivers motivational messages and videos related to work, life, and fitness. Users receive the messages at 8 a.m. every day, which is when they may need them most.
Travel and tourism chatbots
When you think of institutions that are leveraging the latest technologies to engage customers, museums don’t typically come to mind. However, the Carnegie Museums of Pittsburgh are encouraging users to explore different exhibitions by gamifying the experience. And, naturally, they’re using chatbots.
The Andy Carnegie Bot, which was built with Botpress, uses digital stamps to encourage visitors to explore the premises. Users can chat directly with Andy, who encourages them to scan codes scattered about the museum. When they scan these codes, they can unlock digital stamps. It’s basically a virtual scavenger hunt powered by a chatbot.
Why use the Botpress framework? The pros and cons
As mentioned previously, being on-premises can be a significant advantage. When you can’t risk storing sensitive data or intellectual property on someone else’s infrastructure, a non-cloud chatbot framework is likely the only way to go.
With Botpress, there’s also a lot of flexibility for NLU. There’s a native NLU engine, Botpress NLU, but the framework is built so that you can use another NLU if it’s better suited to your goals. For example, you can bring in Wit.ai or Dialogflow natural language tools but still build your bot with Botpress.
Developers can join the Botpress community and contribute to the Botpress core. They can build new components for bots and collaborate with others to add new features to the framework.
Not a developer? Don’t worry. Every Botpress feature is available via a GUI. You can build bots, modify them, and maintain them—without writing a line of code. This arrangement can be very valuable when different business units (think IT and marketing) share responsibility for the behavior of a bot.
Being on-premises might not be attractive to everyone. Although you certainly can host your bot in the cloud after building it on Botpress, you might be able to work more efficiently using a cloud-based set of tools. That’s especially true if you’re already tied to a specific tech company’s software ecosystem.
For example, your organization might already run everything in IBM Cloud, Microsoft Azure, or Amazon Web Services (AWS.) These providers already have heavily integrated chatbot frameworks, so it might make more sense, from an efficiency standpoint, to work with their tools. And that’s especially true if the unique features of Botpress don’t really impact what you’re doing.
For your most ambitious AI-based contextual assistants, you might also find Botpress a bit limiting. Botpress supplies you with the machine learning models that make sense for most bots and most users most of the time; however, frameworks like Rasa offer more options for fine-tuning the models. Not every project requires this, but some might.
Botpress features and integrations
Botpress includes all of the features you’d expect from a full-fledged framework, plus a few special ones. We’ve already considered that it’s on-premises and offers flexibility with regard to NLU and natural language tools, so let’s explore a few other distinguishing traits.
One is the separation of content from flow in Botpress. Every bot, of course, contains content (the things it says) and behaves according to a particular conversation flow. In Botpress, these two components can be managed separately. That way, one team, such as marketing, can have control over the actual content of the bot’s messages. Another team can control when and in what context the bot delivers that content to users.
Advanced analytics allow you to evaluate user engagement based on a variety of metrics. You can even add your own metrics in Botpress and configure them to be represented in a graphical format.
There’s also a “human in the loop” feature. If things aren’t going smoothly, a human agent can drop into a given conversation and either take over or provide additional guidance.
When it comes to integrations, there are few limitations. Botpress was designed to function hand in hand with other tools, and that includes other frameworks and their associated NLU engines. Your Botpress bot can engage users via any communication channel, and the documentation even includes special tutorials for deploying your bot to Telegram, Facebook Messenger, and your own website.
Getting your own domain for your bot is always a good idea. By deploying your bot to a space you control, your users can always find it—even after they’ve lost interest in whichever messaging app they were using back when they first found your bot. A .BOT domain is particularly well-suited to this purpose, and deploying a Botpress bot there is mostly a matter of adding a simple script to the site’s code.
Botpress pricing model
There are three Botpress pricing options: Community, Pro, and Custom. Community is free, and it includes the native NLU, visual flow editor, dialog management tools, and a Bot CMS for managing your bot’s content. (Remember, it can be managed separately from flow.)
The Pro option starts at $45 per month and includes unlimited bots, unlimited admins, and the ability to white-label Botpress by adding your own branding. Additional options include role-based access control and more processing power than you get with the Community version.
Custom pricing is for large organizations. You have to contact Botpress to create an exclusive agreement.
Supported programming languages
However, for many people in your organization, none of that will matter. They’ll be using the framework’s graphical tools to do everything. Part of the beauty of Botpress is that you don’t have to do any coding to build a sophisticated chatbot.
How machine learning works in Botpress
The framework documentation contains an overview of the Botpress framework’s native NLU engine. The overall process breaks down as follows:
- Intent classification. You can create intents and specify how the bot should respond.
- Entity extraction. Every phrase contains entities that help your bot understand a user’s intent and respond appropriately.
- System and custom entities. System entities are known entities that you can incorporate into your bot to accelerate development. You can also provide custom entities in the form of patterns or lists.
- Slots. These are the parameters that must be fulfilled to complete an action associated with an intent. You define your slots and the NLU tags certain words from a user input that can be identified as intent slots.
- Slot filling. The engine gathers info required to satisfy a particular intent.
You may recognize this process and its associated terminology as a fairly standard process for creating machine learning models. It is, although the Botpress NLU actually includes slot tagging. Not all NLU engines do, and their models often require more effort to train.
How to get started with Botpress
You can download Botpress for free to start building a bot. Read through the documentation to get a feel for the different features and concepts you’ll be working with. And then start building!
Since Botpress is equipped with a graphical GUI, you might even want to pull in your colleagues from different departments as you start building your bot. Not only will they have insights from the business side of things, but also they’ll be able to help you build the bot in a hands-on fashion.