Connect Rasa Open Source to Rasa Enterprise

You are viewing documentation for a legacy Rasa product. If you want to get started building assistants with Rasa please check out our latest documentation here.

Connect a Rasa Open Source Server

In order to collect incoming conversations and interact with your running bot in the UI, you will need to connect your deployment to a Rasa Open Source server.

By default, rasactl installs only Rasa Enterprise without a Rasa Open Source server. If you are using the Rasa Enterprise Helm chart, it is still recommended to connect an external Rasa Open Source server as your production server. Future versions of the Rasa Enterprise Helm chart will default to disabling the integrated Rasa Open Source servers.

Connection Types

A Rasa Open Source server can be connected to Rasa Enterprise for one or more of the following purposes:

  1. To stream conversations to Rasa Enterprise. This requires connection via the event broker. This is the minimal connection needed to collect conversations from a Rasa Open Source server.
  2. To act as a deployment environment for Rasa Enterprise. A deployment environment is available for Rasa Enterprise to make e.g. training requests to, and to talk to in the UI. Connection as a deployment environment entails:
    • using Rasa Enterprise as a model server (requires configuration of the endpoints of the Rasa Open Source server).
    • using Rasa Enterprise as a channel via Interactive Learning and Share Your Bot (requires configuration of the credentials of the Rasa Open Source server, as well as connection via the event broker).
    • availability of the Rasa Open Source server for API requests (server must be started with --enable-api).

These purposes are not mutually exclusive. All deployment environments will also stream conversations into Rasa Enterprise and a Rasa Open Source server that is used only to stream conversations can later be added as a deployment environment as well.

Event Broker Connection

For the purpose of collecting incoming conversations with the bot, the only requirement is that the Rasa Open Source server must be connected to the same event broker as Rasa Enterprise.

If you have historical conversations from an existing Rasa Open Source deployment, you can also export them into Rasa Enterprise via the event broker.

Deployment Environment Connection

In order to interact with your bot in the UI, in addition to sharing the same event broker, the Rasa Open Source server must be configured as a deployment environment. There are two default deployment environments:

In Rasa Enterpise, you can add additional deployment environments besides production and worker.

Connect a Local Rasa Open Source Server as a Deployment Environment

If you installed Rasa Enterprise on KIND using rasactl, you have the option to connect a locally running Rasa Open Source server to a Rasa Enterprise deployment on the same machine.

To use this option, Rasa must be installed on your local machine and the version must be compatible with the version of Rasa Enterprise you have deployed. Please consult the compatibility matrix to check that your installed version is compatible.

Once Rasa is installed, you only need to run:

rasactl connect rasa

The command rasactl connect rasa starts a local Rasa Open Source server using the rasa command available in whichever Python environment is currently active. It provides the event broker endpoint configuration for your Rasa Enterprise deployment and updates your Rasa Enterprise deployment with the local address of the Rasa server. By default, the command will start a single server to be used as both the production and worker environments. You can use the flag --run-separate-worker to connect a separate Rasa Open Source server as the worker environment. See the rasactl CLI docs for more options.

Connect an External Rasa Open Source Server

Connection via the Event Broker

To send conversation from an existing Rasa Open Source deployment you have to connect Rasa Open Source and Rasa Enterprise to the same event broker.

Rasa Enterprise Event Broker Configuration

The event broker used by Rasa Enterprise must be able to receive events from the Rasa Open Source server. Depending on where the Rasa Open Source server is deployed relative to the Rasa Enterprise event broker, you may need to expose the port it runs on. If you are using an external event broker, you will need to configure access to it directly.

Rasa Open Source Event Broker Configuration

You will need to configure the endpoints.yml file read by your Rasa Open Source server with connection details for the Rasa Enterprise event broker. For example, if you are using RabbitMQ:

event_broker:
  type: "pika"
  url: <URL of the exposed RabbitMQ service in your Rasa Enterprise deployment>
  port: 5672  # change if your RabbitMQ service is exposed on a different port
  username: "user" # if customized, value of the RABBITMQ_USERNAME environment variable
  password: <value of RABBITMQ_PASSWORD>
  queues:
    - "rasa_production_events" # if using a custom queue, change the queue name to the one that you use

If you are deploying Rasa Open Source using the Rasa Helm Chart, see the section on Rasa Helm chart configuration for an example of how to configure the event broker.

General Requirements for Deployment environments

The following requirements are automatically fulfilled if you are using the Rasa Helm Chart to deploy Rasa Open Source and follow the instructions specific to that deployment method. For any other Rasa Open Source deployment method, the following settings are required:

  1. The environment variable RASA_ENVIRONMENT must be set to the name of the environment e.g. production.

  2. The model server URL must match the target model tag endpoint of your Rasa Enterprise deployment.

  3. The rasa channel credentials must point to your Rasa Enterprise deployment:

rasa:
  url: <Rasa-Enterprise-Base-URL>/api
  1. The server must be secured with an authentication token. You will need to provide this token to Rasa Enterprise when you add the server as a deployment environment.