Rasa in Production

Just have a couple of questions about using Rasa in production if people have answers. For reference, I am designing a food ordering app that interfaces with a tts and asr system for audio.

  1. What is the correct way to deal with multiple sessions i.e. how should I deal with multiple clients. Should I have session tokens? Also, does Rasa have a timeout system so that I can close sessions with users that have finished talking?
  2. How do I collect/ record the training data from production? Does the rasa REST api have a way to collect the training data for me? (I don’t plan on using Rasa X)


  1. Your frontend has to generate a unique identifier for each session/user, which could be a UUID or the user’s username. You then POST a JSON object containing the message and the ID. The rest will be taken care of by Rasa.
  2. I’m not sure I understand this one. In your deployment, on Rasa X, you can access conversations with users and transform them to stories. Since you don’t want to use Rasa X, you can still get the story via API (see this).

So for getting the stories via API, do I have to use a post request? Is there a request that just gives me every single conversation. Does it just write everything to a yaml file that I can just access? Does RASA have to be running, i.e. if I stop the service, do I lose the logs? Would it be smarter to use Rasa X to collect the training data?


  1. I guess you can used Postgres Database as Tracker Store to store the bot/user conversation or you can write the custom action code in python to save the bot/user conversation whilst using tracker.events.From, there you need to check the out of training data whilst seeing confidence score or out of scope action. It will give you clean training data to add on. I can understand you are using audio, but for me I am using both the process for my text based chatbot.
1 Like

You have to use a GET request to get the story:

GET http://{ip}/conversations/{conversation_id}/story`

I don’t think there is a way to get a list of conversation IDs via API, but you can query your Tracker Store for that.

You can stop Rasa and keep logs, since conversations are stored in the Tracker Store, which could be in-memory (file), Postgres, or MySQL.

Rasa X is a very useful tool. And on a server deployment, it is installed by default. You will be able to see plenty of useful features, like conversations, intent prediction accuracy, and more. You can even search for conversations with particular intents for example.

Keep in mind that it’s not Rasa X which “collects the training data”. It can just access them via an interface; same for the Tracker Store, conversations are still stored there, but Rasa X provides an interface to cleanly see, sort, and filter conversations.