Flow agents
Design a conversation as a graph of nodes when the call has to follow steps.
A flow agent follows a graph you design instead of one open prompt. Each node does one job, such as ask a question, call a function, split on a condition, transfer or end. The edges between nodes decide where the call goes next.
Use a flow when the conversation must be predictable: identity checks, intake forms, menu-style routing. For open conversation, use a prompt agent.
Build one
In the dashboard, choose Flow agent when you create an agent. The flow builder opens with a gallery of ready-made templates you can start from.
Through the API, a flow is saved on its own and attached to agents:
- Create it with
POST /v1/flows(Create flow). A flow is checked when you save it, and problems come back with the node that caused them. - Attach it by sending
flow_idwhen you create or update an agent, or sendflow_configdirectly.
Attaching copies the flow
flow_id copies the flow into the agent. Editing or deleting the saved flow afterwards does not change agents, published versions or calls that already use it.
Nodes
| Node | What it does |
|---|---|
| Conversation | Talks with the caller. The instruction is either fixed text (static_text) or a prompt the model follows. It stays here until an edge matches. |
| Subagent | Like a conversation node, but the model may also call tools you give it. |
| Function | Calls one function as soon as the call reaches it. With wait_for_result the next step can depend on the answer. |
| MCP | Calls a tool on an MCP server and keeps the reply in a variable. |
Logic split (branch) | Chooses an edge by comparing variables. No model, no speech. |
| Extract variables | Pulls named values (text, number, true/false, or one of a list) out of the conversation so far. |
| Transfer call | Cold or warm transfer to a phone number. |
| Press digit | Sends touch-tones to move through a menu on an outbound call. |
| Agent swap | Hands the call to another agent in your organization. Available only if it has been enabled for your account. |
| SMS | Sends a text message. |
| Code | Runs your JavaScript. Available only if it has been enabled for your account. |
| End | Ends the call, optionally saying something first. |
Edges
An edge is a condition plus a destination.
- A prompt condition is plain language ("the caller wants to book"). The model decides whether it holds.
- An equation condition compares variables, for example
planequalspro, and can combine several with&&or||. else_edgeis taken when nothing else matches, andalways_edgeis taken without asking.
Things that catch people out
- Fixed text is spoken once, when the call enters the node. A node that waits for an answer should use a prompt instruction, not
static_text, or it goes quiet when the caller's answer does not match any edge. - A node with no condition moves on in the same turn. A question node needs at least one conditional edge, or the agent asks and walks straight past.
- Every path should reach an end node. Two nodes that only point at each other will not be flagged when you save, and the caller will loop.
- A function that starts the call delays the first word. If the start node calls a slow URL, the caller hears silence until it returns. Keep timeouts short.
Variables
Flow speech and prompts can use {{variable}}. Set defaults in default_dynamic_variables, pass values when the call starts, or fill them with an Extract variables node. A Function or MCP node keeps its reply in a variable named after the node, NODE_ID_result. Equations only see variables that exist, so declare a default for each one you compare.
What to confirm
Test transfers before you rely on them
Test your transfer with a real phone number before you rely on it.