Docs menuCore concepts
Core concepts
Voice agents, conversation flows, nodes, intents, slots, validation, and interrupts — the mental model.
Five concepts cover ninety percent of what the platform does. Read this once and the rest of the docs read themselves.
Voice agent
A voice agent is the runtime persona on the call. It bundles:
- A voice (TTS provider + voice id).
- An STT model (transcribes the caller).
- An LLM (drives intent classification and dynamic prompt generation).
- A system prompt (overall persona).
- A language (
en-IN,hi-IN,en-US).
You can have many agents in one workspace and pick which agent runs which campaign or call.
Conversation flow
A flow is a directed graph of nodes that defines what the agent does on the call. Flows are JSON, validated by Zod, versioned, and rollback-able from the dashboard.
A flow declares:
- A
rootNodeId— the node to start at. - A
nodesobject (keyed by node id, not an array) typed bytype:goal,speak,decide,tool,end,return. - A
data_collectiondictionary — the typed slots the flow intends to capture. Informational; the engine doesn’t enforce extraction from this list. - A required
interruptsarray — flow-wide intents like DNC, transfer-to-human, help. Empty array is valid. - An optional
on_call_end.fetch— a single HTTP request fired when the call hangs up.
Top-level field names are mostly snake_case (data_collection, on_call_end); a few historical fields are camelCase (rootNodeId, systemPrompt).
Nodes
| Node | What it does |
|---|---|
goal | Asks the caller a question, listens, classifies intents, extracts slots, decides where to go. |
speak | Speaks via TTS through the speech field. No listening. Advances to next when audio finishes. Optional writes[] mutate slots. |
decide | Branches on a boolean expression over engine state (e.g. slots.budget_paise > 50000000). First match wins. |
tool | Calls an external HTTP endpoint, optionally LLM-coerces the body, captures slots from the response, routes by outcome (on_success / on_error.{network,timeout,client_4xx,server_5xx,schema,default}). |
end | Terminates the call. |
return | Pops an interrupt-stack frame, optionally speaking a bridge (“Where were we — you were saying…”). Only valid inside an interrupt handler subtree. |
The
toolnode was previously calledfetch. Old documents with"type": "fetch"are silently rewritten to"tool"on parse; new saves write"tool".
Intents and slots
Inside a goal node you declare a list of intents — natural-language descriptions of what the caller might say:
"intents": [
{
"id": "states_city",
"intent": "Caller names a city or area",
"extracts": { "slot": "city", "format": "string", "normalize": "title_case" },
"target": "ask_budget"
},
{
"id": "undecided",
"intent": "Caller is undecided about the city",
"target": "city_options"
}
]
When the caller speaks, the dispatcher (one LLM call) classifies the utterance against your intent list, extracts any slot described in extracts, and routes to the matching target. No keywords, no regex.
extracts is a single spec per intent (slot, format, optional enum, optional normalize), not an array.
Slots are typed by their extract format: string, number, enum, phone, date, or currency_inr. If extraction fails or validate.expr returns false, the node runs a repair turn — speaks repair_prompt and re-asks — until attempts_max is exceeded.
Completion
A goal node’s completion condition tells the engine when the node is “done”:
{ "kind": "slot_filled", "slot": "city" }— finish when the named slot is populated.{ "kind": "slots_filled", "slots": ["city", "budget_paise"] }— finish when several named slots are populated.{ "kind": "any_intent_matched" }— finish on any intent match.{ "kind": "expression", "expr": "slots.city != '' && slots.budget_paise > 0" }— finish when an arbitrary expression is true.
If completion is omitted, the engine infers a sensible default; if on_complete is set, the engine transitions there, otherwise to the matched intent’s own target.
Interrupts and barge-in
The caller can speak while the agent is speaking. The orchestrator detects voice activity, stops the TTS, and re-runs the dispatcher on what they said. If the utterance matches an intent on the current node, the flow continues normally. If it matches a flow-level interrupt, control jumps to the interrupt’s handler.
Interrupts have two kinds:
kind: "context"— pushes a frame onto the interrupt stack. Areturnnode later pops it and resumes the paused node (withresume_modecontrolling whether the prompt is re-asked).kind: "safety"— terminal. Must end via anendnode. The validator rejects safety handlers that can reach areturn.
Stack depth is capped (stack_max_depth, default 5) to prevent runaway recursion.
State, persistence, and idempotency
Engine state — current node, captured slots, attempt counts, interrupt stack — is committed to Postgres on every turn. If the worker crashes mid-call, the call resumes deterministically on restart. You don’t need to reason about retries.
Where to go next
- Flow schema — every field of every node type, with examples.
- Webhooks — how
on_call_end.fetchworks and what’s coming next. - Examples — a complete real-estate qualifier flow that’s valid against the schema.