Build your agent
Workflows
A workflow is the script your agent follows on every call: the steps, the order they run in, and the values they pass along.
Every flow has one workflow. You build it on the flow's Workflow tab by dragging steps onto a canvas and joining them, or you write it as JSON. Both are the same thing: the editor reads and writes the JSON, and the engine runs the JSON.
The pieces
| Piece | What it is |
|---|---|
| Step | One thing the agent does: speak, listen, think with an AI, or choose a path. See Steps. |
| Line | Where to go after a step. In JSON it's the step's next, or a Branch's mappings. |
| Start step | Where every call begins (start_node). Usually a greeting. |
| Values | Named values the steps share during a call, such as user_input (what the caller said) and speak (what to say). See Values and state. |
The smallest useful workflow
Greet, then loop: listen, think, reply, listen again. If the AI decides the call is over, it sets hangup and the call ends after the reply is spoken:
{ "start_node": "greeting", "variables": { "user_input": { "type": "str" }, "conversation_history": { "type": "list", "default": [] }, "speak": { "type": "str" }, "hangup": { "type": "bool", "default": false } }, "nodes": { "greeting": { "type": "out", "parameters": { "out_dict": { "speak": "Hi! How can I help you today?" }, "interruption_type": "no" }, "next": "ask_for_input" }, "ask_for_input": { "type": "input", "parameters": { "input_variables": { "user_input": "str" } }, "next": "think" }, "think": { "type": "llm", "parameters": { "system_prompt": "You are the receptionist at Sunrise Dental. Keep replies to one or two sentences.", "service": "groq", "model": "openai/gpt-oss-120b", "input_variables": { "user_input": { "type": "str", "description": "What the caller said." } }, "llm_return_type": { "speak": { "type": "str", "description": "What to say to the caller." }, "hangup": { "type": "bool", "description": "True once the conversation is over." } }, "history_key": "conversation_history" }, "next": "reply" }, "reply": { "type": "out", "parameters": { "variables": ["speak", "hangup"] }, "next": "ask_for_input" } }}In this section
| Page | Read it to |
|---|---|
| How a call runs | understand the order steps run in, side by side steps, and waiting for the caller. |
| Values and state | pass information between steps and to your webhook. |
| Patterns | copy proven shapes: instant acknowledgement, branching, ending the call. |
| Import, export and code | move workflows between flows and accounts, or manage them from your server. |
Next steps
- How a call runs: the rules the engine follows.
- Steps: every kind of step.