Flow Builder
The Flow Builder is a visual node-based editor that lets you design the response logic of your mock agent using a drag-and-drop interface.

Opening the Flow Builder
- Edit a Mock Agent (Step 7 — Response Behaviour)
- Set the default behaviour to Custom
- Click Configure Flows
The Flow Builder opens as a full-screen dialog.
Interface Overview
The Flow Builder has three panels accessible via the left icon toolbar:
| Icon | Panel | Description |
|---|---|---|
| Shapes | Nodes | Drag node types onto the canvas |
| Settings | Properties | Configure the selected node |
| Variable | Variables | Manage flow-scoped variables |
Panels slide in/out — click the icon to toggle.
Node Types
Nodes are colour-coded by category and can be dragged from the Nodes panel onto the canvas.
Flow Control (green)
| Node | Description |
|---|---|
| Start | Entry point — every flow begins here |
| End | Terminates the flow and sets the final task state (completed, failed, canceled, input-required) |
Logic (amber)
| Node | Description |
|---|---|
| If / Else | Branches flow based on a condition |
Data (violet)
| Node | Description |
|---|---|
| Set Variable | Creates or updates a flow variable |
Response (blue)
| Node | Description |
|---|---|
| Set Payload | Builds the response content sent back to the caller |
| Error | Returns a JSON-RPC error response |
Debug (gray)
| Node | Description |
|---|---|
| Log | Logs a message to the server console for debugging |
Coming soon: Switch, For Loop, Transform, Delay, HTTP Request, LLM Call
Connecting Nodes
Draw edges by dragging from a node's output handle to another node's input handle. The If/Else node has two output handles: true (condition met) and false (condition not met).
If / Else Conditions
Configure conditions in the Properties panel:
| Setting | Description |
|---|---|
| Left Operand | Variable reference or literal. Use {{input}} for the incoming message text |
| Operator | equals, not_equals, contains, not_contains, starts_with, ends_with, matches_regex, greater_than, less_than, is_empty, is_not_empty |
| Right Operand | Value to compare against (not needed for is_empty/is_not_empty) |
Template Variables
Use {{variableName}} syntax in node fields to reference variables:
| Variable | Description |
|---|---|
{{input}} | The text content of the incoming message |
{{messageId}} | The incoming message UUID |
{{taskId}} | The current task ID |
| Any custom variable | Variables defined by Set Variable nodes |
Set Payload Node
The Set Payload node defines the content of the response. Add multiple parts:
| Part Type | Description |
|---|---|
| text | Plain text content (supports {{template}} syntax) |
| data | JSON data |
| file | File with MIME type |
Skill Tabs & Routing
When the mock agent has multiple skills, the Flow Builder shows a tab per skill. Each skill has an independent flow graph.
Skill Routing
With multiple skills, configure how incoming messages are routed to the correct skill flow:
| Mode | Description |
|---|---|
| Manual | Client must specify the skill ID in the request |
| Pattern | Regex patterns matched against message text; configurable priority |
| LLM | Use a configured LLM to semantically route to the most relevant skill |
For LLM routing, select a configured LLM from Settings and optionally provide a custom system prompt.
Validation
The toolbar shows a real-time validation badge:
- Valid (green) — Flow is complete and can be saved
- N error(s) (red) — Issues that must be resolved before saving
Common errors:
- No Start node
- Dangling output handles (connected to nothing)
- End node missing (no terminal node)
Saving
Click Save (or Save & Close) to persist the flow. Unsaved changes show an Unsaved badge. Closing with unsaved changes prompts a confirmation dialog.