Rasa
Type: full-code · Vendor: Rasa Technologies · Language: Python · License: Apache-2.0 · Status: active · Status in practice: mature · First released: 2016-10-15
Developer platform for enterprise text and voice AI assistants combining LLM-based dialogue understanding (CALM) with deterministic business logic encoded as Flows, custom actions for tool calls, slots for collected data, and built-in patterns for human handoff and fallback.
Description. Rasa is an open-source (legacy Open Source) and commercial (Rasa Platform / Pro) framework for building text and voice conversational assistants. The current dialogue engine is CALM (Conversational AI with Language Models): an LLM interprets each user message and emits internal commands (start flow, set slot, correct slot, cancel flow, clarify flows, chitchat, knowledge answer, human handoff), while a deterministic dialogue manager executes those commands against business logic written as Flows. Flows are step-by-step processes built from collect (slot filling), set_slots, action (custom-action server call), and branching steps; the tracker persists slot values across turns.
Agent loop shape. Each turn the user message is fed to a CALM dialogue-understanding LLM with a structured prompt that emits a set of internal commands (start flow, set slot, correct slot, cancel flow, clarify flows, chitchat, knowledge answer, human handoff). The dialogue manager interprets those commands against the currently active Flow on the tracker, executing collect / set_slots / action / branching steps. Custom actions run in an external action server; the tracker carries slot state across turns. Conversation patterns provide reusable structured sub-flows for things like clarification, correction, and handoff.
Primary use cases
- enterprise customer-support and CX assistants over text and voice
- LLM-driven dialogue understanding with deterministic flows enforcing business logic
- custom-action-driven tool use against internal APIs
- human handoff via the built-in human_handoff command
- knowledge-grounded answers via Enterprise RAG and the knowledge_answer command
Key concepts
- CALM (docs) — Conversational AI with Language Models — the dialogue system pairing an LLM-driven dialogue understanding layer with a deterministic dialogue manager.
- Flows → plan-and-execute (docs) — Step-by-step descriptions of business processes (collect slots, run actions, branch on data); the LLM can dynamically route between flows.
- Dialogue understanding / commands → structured-output (docs) — LLM emits internal commands (start flow, set slot, correct slot, cancel flow, clarify flows, chitchat, knowledge answer, human handoff) for the dialogue manager to execute.
- Slots & tracker → cross-session-memory (docs) — Slots are typed values collected through flow steps; the tracker is per-conversation persistent state.
- Custom actions → tool-use — External action server endpoints called from action steps for tool/API integration.
- Human handoff → conversation-handoff (docs) — Built-in command and conversation pattern for escalating to a live agent.
Patterns this full-code implements —
- ★★Agentic RAG
Enterprise RAG is a named Rasa product; the `knowledge_answer` command is a built-in CALM command that routes to grounded answers.
- ★★Conversation Handoff to Human
`human handoff` is a built-in CALM command and `pattern_human_handoff` is a named conversation pattern documented in Rasa's reference primitives.
- ★★Fallback Chain
Rasa positions itself explicitly around 'built-in recovery patterns'; clarify_flows, correct_slot, cancel_flow act as the LLM-side fallback chain.
- ★★Session Isolation
Slots set inside a flow are reset when the flow ends — documented per-flow isolation; persistence requires opt-in via `persisted_slots`.
- ★★Structured Output
CALM's whole architecture is built on the LLM emitting a constrained, typed command set rather than free text — the canonical structured-output use.
- ★★Tool Use
Action steps in flows trigger custom actions served by an external action server, used for API and tool calls.
- ★★Plan-and-Execute
Flows are predefined plans; the LLM picks which flow to start and the dialogue manager executes it deterministically.