Rasa Session and Sender ID

In the Rasa docs and source code you’ll find references to Session ID, Sender ID and Conversation ID. This is a quick post to clear up the use of these terms.

There’s good reason to be confused about these terms in Rasa as we’ll see below.

  • Sender ID: This is a unique ID associated with a user. This is also referred to as the Conversation ID (you can see this in the source code here and here)
  • Session ID: This ID is used to track a user session

I’m going to review how these ID’s are used by channel.

REST Channel

You’ll find the sender id is id used in the REST channel using the sender key. You can see an example in the docs here and you’ll find this in the source code here.

The REST channel does not use session id

Socket Channel

The socket channel requires use of the session id and will set the value of sender id to the session id by default. In the socket channel, the key is session_id.