Bot Development

Building Bots with Pandorabots

Pandorabots is an open source chatbot framework based on the AIML scripting language. Its unique approach avoids the problems of many machine learning systems.

June 18, 2019
tools building chatbot on pandorabots framework

Pandorabots is unique among bot-building frameworks. Rather than praise its powerful machine learning system, the Pandorabots product literature boasts about not having one. Really!

In the modern-day chatbot landscape, that might seem an odd “advantage” to highlight. However, Pandorabots is by no means behind the curve when it comes to chatbot sophistication. It simply follows a different approach for AI, and that might be just what you’re looking for in a bot framework. Keep reading to learn more about Pandorabots and its unorthodox development tools.

What is Pandorabots?

If you had to sum up Pandorabots in two words, they would be longevity and AIML. In business since 2008, the creators of Pandorabots refer to themselves as the “original gangsters” of chatbot development. As an open source framework, Pandorabots has a vibrant community of contributors working around the clock to maintain and enhance its features. Presumably, many of those developers have been with the framework for a long time.

As for AIML, that’s an acronym for Artificial Intelligence Markup Language, which is an open source scripting language that developers use to build bots with Pandorabots. After you get the hang of AIML—and it’s supposed to be easy to learn—you can create bots that are capable of pretty much anything.

The catch, of course, is that you actually have to learn to use AIML and spend a fair amount of time writing the code that will power your bot. And, since Pandorabots doesn’t include the machine learning tools common among other bot frameworks (like the Microsoft Azure Cognitive Services prebuilt models or the Amazon Lex sample utterance training), you build all of the intelligence into your chatbot yourself. Using AIML, of course.

The good news? Pandorabots also comes with shortcuts that can accelerate your development efforts. We consider those later in this article.

Pandorabots chatbot examples

Developers are spinning up AIML to build all sorts of chatbots with Pandorabots. Here’s a sample of what’s possible when you use the Pandorabots framework.

Device control chatbots

Vending machines are already pretty convenient, but chatbots can make them even more so. To improve (you might even say modernize) the vending machine experience, Coca-Cola built a conversational chatbot with Pandorabots and deployed it on Facebook Messenger.

Users activate the bot, tell it what they’d like to drink, and pay for a beverage. The bot then communicates with a nearby vending machine and sends in the order. The user’s beverage is waiting for them at the machine as soon as they arrive.

This chatbot example shows just how capable a Pandorabots chatbot can be. Using the Pandorabots API, you can integrate the framework’s built-in hosting and natural language processing (NLP) engine with practically any application—including vending machine software.

E-commerce chatbots

American Eagle Outfitters is another B2C company using Pandorabots and Facebook Messenger to build bots for business and to enable a new type of customer experience. By integrating its product catalog with a bot built on Pandorabots, American Eagle lets users shop for apparel via a chatbot. In addition, users can browse product thumbnails and flag certain products they like. They can even make purchases directly through the Facebook Messenger chat window.

The bot, dubbed Aerie, has been a huge success. Around three-quarters of all users were new American Eagle customers, and they exchanged as many as 4 million messages with the bot.

Customer service chatbots

After launching a bot that lets users track packages and change delivery dates, Yamato, a Japanese delivery service, saved significantly on customer support. Yamato built its bot on Pandorabots and deployed it on the LINE messaging app.

Like the American Eagle bot, which interfaced with the company’s product catalog, the Yamato bot was able to connect to the company’s internal data to quickly understand and process customer inquiries. The Pandorabots API makes these sorts of interactions possible.

Why use Pandorabots? The pros and cons

There are several advantages to using Pandorabots. For starters, the framework always provides access to the underlying code. There’s no graphical user interface (GUI) or proprietary abstraction layer (think ChatScript) standing between you and the basic syntax that powers your bot. Does that make Pandorabots harder to use? Possibly. But it also gives you more flexibility.

In addition, the AIML scripting language is highly versatile and supported by an enthusiastic developer community. You have the flexibility to build a bot that your users need, while having unfettered access to the cogs and gears powering that experience. Many frameworks, by contrast, offer access to their proprietary fork but stop short of showing you the code itself.

By building your bot using AIML and avoiding the machine learning systems available with most frameworks, you also enjoy faster bot performance. When your bot relies on machine learning models on a typical framework, it’s outputting information based on the complex rules defined within a large AI engine. With Pandorabots, you define all the inputs and outputs on your own, and they’re specific to your bot! That makes it faster. Here’s how Pandorabots explains it:

“Above approximately ~500 defined intents, [machine learning] systems begin to slow way down. By contrast, the response time for bots hosted on Pandorabots is always around ~300 milliseconds, even for bots that have ~300,000 intents defined. For finite domains, a botmaster may not need to define over 500 intents, but generally speaking robust chatbots have a lot more intents defined, and that number should only increase over time.”

The advantages of the Pandorabots bot framework are also its disadvantages. Compared to, for example, building a bot with Dialogflow and relying on its machine learning tools, the use of pure AIML requires that you define your own input/output pairs—and you may have several of them. Thankfully, Pandorabots comes with libraries of predefined content, so you won’t have to manually teach every bot to respond to “hi” with “Hello there, friend.”

These libraries are the primary shortcut mentioned earlier, and they can accelerate development despite some of the extra labor that may be required when coding in AIML.

Pandorabots is also a bot hosting service, and it’s not advisable to build your bot using Pandorabots and then host it somewhere else. If that’s an issue for you, consider using a framework with an on-premises option.

Key features and integrations

AIML is the main differentiator for Pandorabots. You get to work with the actual scripting language driving bot behavior rather than with a proprietary layer masking the script.

Additionally, there’s the Pandorabots API, which makes it possible to integrate the hosting platform and the framework’s NLP engine into an existing app or to build a custom application that incorporates your bot. Using the Pandorabots CLI, you can leverage the command line to communicate with the API.

If you’re not sure where to begin when it comes to bot development, Pandorabots also offers consulting services. It will even develop your chatbot for you! Development services are not common among the larger companies that offer bot frameworks, but Pandorabots is an exception.

As for integrations, the documentation shows you the AIML markup you need to deploy your bot to messaging apps, like Facebook Messenger, Viber, and WeChat. It also includes tutorials for deploying your bot to Slack and for quickly setting up a chat widget for your website.

The chat widget option is particularly useful if you’re deploying your chatbot on its own domain. Maintaining a consistent, branded website for your bot is always a good idea, since third-party platforms (and their user bases) constantly shift and evolve. By giving your bot a permanent home, such as a .BOTbot top-level domain name, you’re showing users that they can always find your bot—even after they stop using Facebook Messenger, Viber, or another platform.

Finally, when you build a bot with Pandorabots, you are able to obtain a .BOT domain name without going through a separate validation process. Pandorabots has a direct link with .BOT to validate its customers and quickly get them through the domain name registration process.

Pandorabots pricing model

Building a bot with Pandorabots is free. You won’t start paying for messages until users start interacting with your bot more frequently. At the time of this writing, there are three pricing tiers for Pandorabots:

  • Free. Always get up to 1,000 messages per month at no charge.
  • Developer. When your bot starts getting more use, you pay $0.0025 for each message beyond the 1,000 message threshold.
  • Enterprise. For larger organizations with heavier usage, Pandorabots will discuss a custom price. To be eligible for enterprise pricing, your bot must engage in over 100,000 interactions per month.

Development or consulting assistance from Pandorabots is available for a separate fee.

Supported programming languages

AIML is the scripting language you use for a Pandorabots chatbot, but there several SDKs that allow you to access the Pandorabots API using:

Some of these are offered by Pandorabots, but others were developed by the framework’s community of contributors. The availability of these SDKs speaks to the size and vivacity of the Pandorabots community.

How machine learning works in Pandorabots

Pandorabots doesn’t include any machine learning, per se. As discussed earlier, there’s no true machine learning engine driving the AI in your Pandorabots chatbot. With most frameworks, you enter a few sample inputs, and the system uses those to train your bot to respond to similar inputs. The Pandorabots framework is different.

Using the framework and AIML, you script all input/output pairs. These are called rules, and your bot won’t respond to anything that hasn’t been programmed into it manually. Thankfully, the included libraries come loaded with a lot of the intents you need to get started. After that, you must define your own intents. Compared to other frameworks, like Amazon Lex, Microsoft, and Dialogflow, you’ll likely end up defining more intents over time.

The Pandorabots tutorial “Bot Building 101” includes a section called “Basic AIML Training” that shows you everything you need to know about using AIML. If you’re concerned about the lack of a machine learning engine, read through this tutorial to get a feel for what it’s like to create an intelligent bot using AIML.

How to get started with Pandorabots

Review the Pandorabots documentation, including tutorials, and sign up to start building your bot. Building a chatbot with Pandorabots is free, so there’s little risk besides the time involved in learning AIML.

To create a bot, after signing up and logging in, just click the + button next to My Bots. At that point, you might want to re-read their “Bot Building 101” tutorial and add the Small Talk library (aka “Rosie”) to give your bot some basic conversational capabilities.

Now that you’ve created a simple bot, the sky’s the limit! Pandorabots is among the most flexible, lightweight, capable options available to chatbot developers. And, with a large open source community supporting the framework, it’s always getting better.