A new version of RedBot was released today, the biggest change is Mission Control: a persistance layer and pluggable control panel for RedBot's bots.
- Storage for inbound and outbound messages (SQLite)
- Chatbot user management and persisted chat context (SQLite)
- Admins management with multiple roles
- Basic Content Management System with custom fields
- Chatbot simulator
- GraphQL endpoint to access SQLite database
- New Node-RED nodes (MC GraphQL, MC Simulator, etc)
- Plugins repository for additional features
- Pluggable and open architecture
- Docker image
REDBOT_ENABLE_MISSION_CONTROL=true node-red -u /my-node-red-project)
When enabled, the bot is persisting bot's user information (fist name, last name, language, chat context, etc) that can be inferred or extracted from the chat platforms. All users can be searched, modified or deleted from Mission Control (i.e. change user's detail or inspecting the current chat context).
Each new user receives a unique
userId which can be used to identify the user within the chatbot indipendently from the chat platform (i.e. the same user can access the bot with multiple platforms, there's a 1-to-many relation between userId and chatId).
A custom JSON
payload field can be used to store anything related to a user, it can be modified from Mission Control or - programmatically - using the
MC GraphQL node in Node-RED.
Messages are automatically stored in SQLite, it's now possible to inspect messages filtering for chatId, platform, userId or chatId.
Access can be granted to an unlimited number of admins with fine grain permissions.
Every feature has it own set of permissions that can be added individually to each admin.
The Mission Control's panel can handle multiple chatbots, admins can be assigned to all or specific chatbots.
It's now possible to simulate the bot with the chatbot simulator inside Mission Control, it's even possible to impersonate an existing user to investigate on production problems.
Implementing the simulator is easy, just drop the
MC Simulator nodes in the flow like normal senders and receivers.
SQLite database can be accessed with GraphQL: chabots can read/write data using
MC GraphQL node, admins can read/write data using Mission Control's panel, third party systems can read/write data using the
/graphql endpoint (with a security token).
These are the available entities
users chatbot's user
messages the inbound and outbound messages
content the post-like contents
records user-related entities (i.e. orders, invoices, etc)
Content Management System
It's a simple post-like content management system with some basic fields (i.e. title, body, category, language, etc) plus
slug it's an arbitrary id to identify a content. For example it's possible to fetch the content with
MC Content node using the slug instead of the numeric id or it's possible to use it to identify the same content in different languages (multi-language support)
custom fields a list of structured and typed fields for a content (string, number, etc)
payload a custom JSON field that can contain anything
namespace contents are grouped by namespace, the default one is
content, but it's possible to develop plugins using different namespaces and reusing the same UI, the Mission Control's CMS can be used to store anything
New Node-RED nodes
A bunch of new nodes are available to use the power of Mission Control:
MC Content to easily fetch content from Mission Control's CMS using the slug or the id
MC GraphQL to explore and persist data on SQLite using simple GraphQL queries
MC Simulator sender / receiver add these nodes to simple add support for the simulator in Mission Control
MC User Payload to store and persist any kind of json payload into the user's space in SQLite
This is actually the most important feature. Mission Control has an open architecture and it's pluggable: every feature is a plugin, new and optional features can just be plugged into the control panel.
Some simple plugins are already available in the Plugins Store like Send Direct Message, Commands, Knowledge Base, Authorization and more to come in the future.
Since RedBot is open source, everyone can develop custom plugins using React and RSuite (docs for this is still not available).
There's an official Docker image for RedBot, just run it to quickly test RedBot in a local environment or to easily deploy in production.
Just run (Mission Control is not enabled by default)
docker run -d -p 1880:1880 \ -e REDBOT_ENABLE_MISSION_CONTROL=true \ guidone/redbot