Skip to main content
Multi-state agents keep their conversation logic in a workflow — a set of states the agent moves through during a call. The agent’s prompt only holds the global part (identity, tone, general rules); the actual call flow lives here. Single-prompt agents have no workflow. For them this endpoint returns null.
The workflow is not part of PATCH /v1/agents/{agent_id}. It is a large object and is validated before it is stored, so it has its own endpoint.

Data model

Step

Every next[].id must reference an existing step id.

Endpoints

Get workflow

Permission: agents:read
Response:

Replace workflow

Replaces the workflow completely. There is no partial update — send the full object.
Permission: agents:write
The body may be the workflow object itself or wrapped as {"workflow": { ... }}. To remove the workflow and turn the agent back into a single-prompt agent, send null:

Validation

The workflow is validated against the same rules the voice runtime enforces. If it is invalid, nothing is written and the response is 400 VALIDATION_ERROR listing every problem found:
This validation matters: the runtime silently discards a workflow it cannot parse and the agent then runs without its states. Rejecting the write is the safer failure.
  • Agents — agent configuration and prompt
  • Tools — tools that steps can reference