Coldbrew Bots

Coldbrew Bots is a chat bot development platform.

Features

NOTE: Coldbrew Bots is currently the Beta release. And, some features are currently open to the invited developers only.

API Bot

API Bot is our own Facebook Messenger chat bot we created using Coldbrew Bots API and Flow Engine. At first it was built as a demo for Coldbrew Bots, but, we soon realized that we could use it to serve our developers (like yourself)!

With API Bot, you can do things like this:

  • Create and manage your bots
  • Manage your API tokens
  • Access Bot Store (coming soon)
  • Send feedback to us

Try It Now! (Best viewed in Messenger mobile app)

NOTE: Actually you will have to use our API Bot no matter what, because we didn't create a web site (or a mobile app) that serves the functionalities above. Sorry.

Getting Started

See Facebook Messenger Setup to create and configure a new bot for the Facebook Messenger.

Core Concepts

Sessions

Your bot is supposed to interact with multiple end users (or multiple groups of users) simultaneously. And, from the end user's perspective, they expect their conversation with the bot is completely private and isolated from other conversations of the bot.

To make such isolation simpler, Coldbrew Bots API provides sessions for all conversations. Whenever an end user initiates the conversation with your bot, Coldbrew Bots API will create a new session and assign the end user to that session. And, all messages that you receive and send through Coldbrew Bots API will use that session to maintain private and independent conversation states with the end user.

NOTE: In the current release, we support 1-to-1 session type only, but, we're working to add group and individual-in-group session types.

Each session has the following attributes:

  • ID: a unique string ID of the session
  • State: a session can have a state at a time. It's up to you how to utilize this session state, but, typical use cases would be to track of conversation phase of individual end users, or, to limit the possible interaction scenarios with the end users. Session state can be modified whenever you send a message through Coldbrew Bots API. (See SessionUpdate and SendRequest.)
  • Key-Value Storage: you can store multiple string-based key value pairs in the session. All data in the session storage is private and permanent (unless you delete them). Session data can be updated or deleted using SessionUpdate in SendRequest.
  • Modify Index: a session maintain the modify index to keep track of all changes to the session. Whenever you make a change to the session (state or key-value data), this modify index will be incremented. You can use this modify index when you need to perform atomic operations (such as "compare-and-swap"). (See SessionUpdate.)

Message Pulling vs. Webhook Pushes

When using Coldbrew Bots, you pull the messages, whereas the Facebook Messenger Platform "pushes" the messages to your webhook endpoints. Both approaches have pros and cons, but, our pulling model has the following advantages:

  1. It simplifies the local bot development setup. You don't need the network tunneling tools (such as ngrok) because your bot application will not receive incoming Webhook calls directly. Instead Coldbrew Bots API will handle the incoming Webhook calls and store them in Coldbrew Bots so you can pull those messages whenever you can.

  2. You bot application does not have to be a web server accepting HTTP requests (unless you have real needs). This can simplify your bot code, deployment structure, and, security configurations. No inbounds connections, no need for load balancer(s), etc.

IMPORTANT: But, we do have rate limits on our API endpoints. See Rate Limiting for more informations.