AI Assistant

Use AI Assistant to run a configured assistant as a step in a call or messaging journey. Select the assistant and route its results to the appropriate next nodes.
Test the assistant in the AI Assistant simulator before publishing the Flow. Define clear completion and fallback paths so the customer journey does not depend on an unhandled model result.
Configuration and outcomes
Select the saved AI Assistant, optionally supply dynamic context and previous Flow history, and set turn and runtime safeguards. The node has Exit, Timeout, and Error outcomes, plus up to seven named condition outcomes evaluated from the Assistant's structured JSON reply. It also records reply, matched-condition, runtime, turn, token, and cost data.
Variables set by this node
When the conversation ends, the node stores the assistant's last reply, why the conversation ended, and usage totals. The outcomes above already branch the Flow on the matched condition.
Show the variables this node sets
Each variable is prefixed with the node's unique name, shown here as ai_assistant_abc. Insert them with the Variables button rather than typing them, so the prefix always matches your node.
| Variable | Contains | Example |
|---|---|---|
{ai_assistant_abc.last_assistant_reply_text} | The assistant's last reply as text. | Your appointment is confirmed. |
{ai_assistant_abc.last_assistant_reply_json} | The assistant's last reply as JSON. Read a single field by adding its key. response_json is an alias for the same value. | A JSON object |
{ai_assistant_abc.matched_condition} | The name of the exit condition that matched, or none, exit, timeout, or error. | appointment_booked |
{ai_assistant_abc.total_turn} | How many replies the assistant gave. | 6 |
{ai_assistant_abc.total_runtime_ms} | Total time spent waiting for the assistant, in milliseconds. runtime_ms is an alias. | 5230 |
{ai_assistant_abc.total_tokens_input} | Total input tokens used across the conversation. | 3100 |
{ai_assistant_abc.total_tokens_output} | Total output tokens used across the conversation. | 540 |
{ai_assistant_abc.total_cost} | The total estimated cost of the conversation. | 0.01 |
{ai_assistant_abc.error_message} | A description of the problem, set only on the Error path. | Assistant not found |
On the Error and Timeout paths the reply variables can be empty, so handle those paths without them.
Typical uses:
- Save details the assistant collected, read from
last_assistant_reply_json, with Update Contact. - Send the conversation outcome to your own system with HTTP Request.
- Record
matched_conditionandtotal_turnwith Log Result.
See Flow variables for how variables work across a Flow.
Design and test
Use a saved Assistant when the journey needs multi-turn conversation and conditional routing. Make each condition name describe the next business action, set conservative reply and repeated-answer limits, and connect Timeout and Error to a human-friendly fallback. Test the exact context and conditions in the simulator before enabling the Flow.