Analytics Database | Rasa Documentation
Build your first agent in just a few minutes with Rasa Copilot.
On this page
Overview [](/content/docs/reference/integrations/analytics-database/#overview "Direct link to Overview"/index.html)
Studio ingests conversation events from a Kafka topic (rasa-events) and stores them in a PostgreSQL database. An event ingestion service consumes each message and writes structured records into analytics tables — capturing individual conversation events as well as aggregated daily statistics by channel/version and by flow.
These tables are available as a standard PostgreSQL database, which means you can connect any SQL-compatible BI tool — such as Metabase, Tableau, Looker, Grafana, or Redash — directly to the database and build custom dashboards on top of the data.
Connecting to the database [](/content/docs/reference/integrations/analytics-database/#connecting-to-the-database "Direct link to Connecting to the database"/index.html)
Studio uses a standard PostgreSQL connection. Use the following connection string format:
postgresql://<DB_USER>:<DB_PASSWORD>@<DB_HOST>:<DB_PORT>/<DB_NAME>
| Parameter | Default value | Description |
|---|---|---|
DB_HOST |
— | Hostname or IP of the PostgreSQL server |
DB_PORT |
5432 |
PostgreSQL port |
DB_NAME |
studio |
Database name |
DB_USER |
studio_backend |
Database user |
DB_PASSWORD |
— | Password for the database user |
Example (local development):
postgresql://studio_backend:studio_backend@localhost:5432/studio
For production deployments, ask your administrator for the host, port, and credentials. It is recommended to create a dedicated read-only database user with SELECT privileges on the analytics tables before connecting your BI tool.
Data model [](/content/docs/reference/integrations/analytics-database/#data-model "Direct link to Data model"/index.html)
Table reference [](/content/docs/reference/integrations/analytics-database/#table-reference "Direct link to Table reference"/index.html)
Conversation [](/content/docs/reference/integrations/analytics-database/#conversation "Direct link to Conversation"/index.html)
Each row represents a single conversation session between a user and the assistant.
| Column | Type | Description |
|---|---|---|
id |
string (UUID) |
Primary key. Unique identifier for the conversation. |
assistantName |
string |
Name of the assistant that handled the conversation. |
assistantVersion |
string |
Version of the assistant at the time of the conversation. |
totalNumberOfUserMessages |
integer |
Number of messages sent by the user during the conversation. |
startDate |
datetime |
Timestamp of the first event in the conversation (set on session_started). |
ingested |
boolean |
true once the conversation has been fully processed (set on session_ended or conversation_inactive). |
reviewState |
enum |
Review status of the conversation. Values: UNREVIEWED, PARTIALLY_REVIEWED, REVIEWED. |
csatRating |
`enum | null` |
lastReviewedAt |
`datetime | null` |
escalatedAt |
`datetime | null` |
environmentId |
`string (UUID) | null` |
ConversationEvent [](/content/docs/reference/integrations/analytics-database/#conversationevent "Direct link to ConversationEvent"/index.html)
Each row represents a single Rasa event within a conversation, such as an action execution, slot update, or flow transition.
| Column | Type | Description |
|---|---|---|
id |
string (UUID) |
Primary key. Unique identifier for the event. |
conversationId |
string (UUID) |
Foreign key to Conversation.id. The conversation this event belongs to. |
timestamp |
datetime |
When the event occurred. |
modelId |
string (UUID) |
Foreign key to MachineLearningModel.id. The model that generated this event. |
type |
enum |
Type of Rasa event. See values below. |
rawData |
json |
Full raw event payload as received from Rasa. |
metadata |
json |
Additional metadata attached to the event. Defaults to {}. |
actionText |
`string | null` |
name |
`string | null` |
slotValue |
`json | null` |
flowId |
`string | null` |
stepId |
`string | null` |
agentId |
`string | null` |
type enum values:
ACTION, SESSION_STARTED, SLOT, RESET_SLOTS, FLOW_STARTED, FLOW_INTERRUPTED, FLOW_RESUMED, FLOW_COMPLETED, FLOW_CANCELLED, FORM, ACTIVE_LOOP, RESTART, CONVERSATION_INACTIVE, SESSION_ENDED, ENTITIES, FOLLOWUP, ACTION_EXECUTION_REJECTED, STACK, ROUTING_SESSION_ENDED, REMINDER, CANCEL_REMINDER, REWIND, UNDO, EXPORT, PAUSE, RESUME, LOOP_INTERRUPTED, AGENT_STARTED, AGENT_COMPLETED, AGENT_INTERRUPTED, AGENT_CANCELLED, AGENT_RESUMED
VersionDailyStatistics [](/content/docs/reference/integrations/analytics-database/#versiondailystatistics "Direct link to VersionDailyStatistics"/index.html)
Each row contains aggregated daily metrics for a specific channel and assistant version combination. This table is the primary source for time-series dashboards tracking volume, automation rate, latency, and CSAT.
| Column | Type | Description |
|---|---|---|
id |
string (UUID) |
Primary key. |
date |
datetime |
The calendar day this row covers. Combined with channelName and version, this is unique per row. |
channelName |
string |
Name of the channel (e.g. rest, socketio). |
version |
string |
Assistant version identifier. |
totalSessions |
integer |
Total number of conversation sessions on this day. |
automatedCount |
integer |
Number of sessions that were fully handled without escalation. |
escalatedCount |
integer |
Number of sessions escalated to a human agent. |
averageLatencyMs |
float |
Mean response latency in milliseconds. |
p50LatencyMs |
float |
50th percentile (median) response latency in milliseconds. |
p95LatencyMs |
float |
95th percentile response latency in milliseconds. |
p99LatencyMs |
float |
99th percentile response latency in milliseconds. |
csatSatisfied |
integer |
Number of sessions rated as satisfied. |
csatUnsatisfied |
integer |
Number of sessions rated as unsatisfied. |
csatUnanswered |
integer |
Number of sessions where CSAT was not answered. |
customSuccessCount |
`integer | null` |
customFailureCount |
`integer | null` |
createdAt |
datetime |
When this row was first created. |
updatedAt |
datetime |
When this row was last updated. |
successCriteriaId |
`string (UUID) | null` |
FlowDailyStatistics [](/content/docs/reference/integrations/analytics-database/#flowdailystatistics "Direct link to FlowDailyStatistics"/index.html)
Each row contains aggregated daily metrics for a specific flow, allowing you to compare flow-level engagement and escalation rates over time.
| Column | Type | Description |
|---|---|---|
id |
string (UUID) |
Primary key. |
date |
datetime |
The calendar day this row covers. |
flowName |
string |
Name of the flow. |
totalSessions |
integer |
Total number of sessions that entered this flow on this day. |
automatedCount |
integer |
Number of sessions that completed the flow without escalation. |
escalatedCount |
integer |
Number of sessions that were escalated while in this flow. |
createdAt |
datetime |
When this row was first created. |
updatedAt |
datetime |
When this row was last updated. |
SuccessCriteria [](/content/docs/reference/integrations/analytics-database/#successcriteria "Direct link to SuccessCriteria"/index.html)
Stores the custom success filter configured per assistant, which defines which flows must (or must not) be executed for a session to be counted as successful. Referenced by VersionDailyStatistics to compute customSuccessCount and customFailureCount.
| Column | Type | Description |
|---|---|---|
id |
string (UUID) |
Primary key. |
assistantName |
string |
Name of the assistant this criteria applies to. |
includedFlows |
string[] |
List of flow names that must be executed for a session to count as successful. |
excludedFlows |
string[] |
List of flow names that must not be executed for a session to count as successful. |
createdAt |
datetime |
When this criteria was created. |
updatedAt |
datetime |
When this criteria was last updated. |
Ask AI
🍪 Cookie settings
We use cookies to keep things running smoothly and improve your experience.
Customize settings
Accept allReject all