Overview
The Flow Builder engine is a single-loop state machine that processes one user message at a time. Understanding it helps you build faster, more efficient flows — especially for voice where latency matters.The Processing Loop
When a user sends a message:- Receive message — Input is added to conversation history
- Process current node — Engine executes the active node
- Chain through silent nodes — Variable, Logic, Extraction, Function, Request nodes execute automatically in sequence
- Stop at Conversation or End — Loop stops when it reaches a response-generating node
Only Conversation nodes produce user-facing responses. All other nodes execute silently. The engine can chain through multiple nodes in a single turn, transparently to the user.
Node Processing Order
| Node Type | What Happens | Blocks? |
|---|---|---|
| Conversation | LLM call with prompt + history | Yes — waits for LLM |
| Tool/Function | Executes HTTP tool call | Yes — waits for API |
| Extraction | LLM extracts structured data | Yes — waits for LLM |
| Variable | Sets values synchronously | No — instant |
| Logic | Evaluates conditions, picks path | No — instant |
| Request | Makes HTTP request | Yes (if await: true) |
| End | Fires webhook, returns end message | No |
Streaming (SSE)
Flow Builder uses Server-Sent Events to stream responses in real-time — critical for voice where TTS starts speaking as soon as the first tokens arrive.SSE Event Types
| Event | Description |
|---|---|
token | Individual LLM token chunks |
filler | Speak-during-execution text from Tool/Function nodes |
clear | Discard partial response — a transition is happening |
tool_calls | Tool/function call detected |
done | Turn complete with final state |
error | Error during processing |
clear event is key for voice: when the LLM starts responding but then transitions, clear tells TTS to stop the partial response and prepare for the new node’s output.
Safety Limits
| Limit | Value | Purpose |
|---|---|---|
| Max transitions per turn | 10 | Prevents infinite loops |
| Max tool call rounds | 5 | Limits recursive execution |
| Conversation history cap | 40 messages | Controls context window |
| Request timeout | 10 seconds | Prevents hung API calls |
LLM Resolution Order
The engine determines which model to use by checking (in order):- Node override — Model set on the specific node
- Flow default — Model set at the flow level
- Fallback —
gpt-4o-mini
Related Pages
Conversation Node
The core node type
API Key Setup
Configure your LLM provider
Voice Connection
Deploy to voice with streaming
Testing
Test your flow
