Workflows
Multi-agent orchestration and handoffs
Workflows
A Workflow defines how multiple agents work together in a voice call. It's a directed acyclic graph (DAG) where nodes are agents and edges define transitions.
Workflow Structure
{
"slug": "daily-health-call",
"name": "Daily Health Check-in",
"config": {
"nodes": [
{ "id": "greeter", "agent_name": "greeter-agent", "is_entry": true },
{ "id": "meal", "agent_name": "meal-agent", "skip_condition": "flags.skip_meal" },
{ "id": "glucose", "agent_name": "glucose-agent" },
{ "id": "feedback", "agent_name": "feedback-agent", "is_exit": true }
],
"connections": [
{ "source_id": "greeter", "target_id": "meal" },
{ "source_id": "meal", "target_id": "glucose" },
{ "source_id": "glucose", "target_id": "feedback" }
],
"shared_context": ["user_id", "logged_meals", "glucose_reading"]
}
}Visual Representation
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Greeter │────▶│ Meal │────▶│ Glucose │────▶│ Feedback │
│ (entry) │ │ (skippable) │ │ │ │ (exit) │
└─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘Nodes
Each node represents an agent in the workflow:
| Property | Description |
|---|---|
id | Unique identifier within workflow |
agent_name | Reference to agent definition |
is_entry | Starting point (exactly one required) |
is_exit | Ending point (at least one required) |
skip_condition | Context path to evaluate for skipping |
Connections
Connections define how agents transition:
| Property | Description |
|---|---|
source_id | From node |
target_id | To node |
context_passed | Which context keys to pass |
condition | Optional routing condition |
Shared Context
The shared_context array defines which values persist across all agents in the workflow. See Context for details.
Skip Conditions
Agents can be conditionally skipped based on context flags:
{ "id": "meal", "agent_name": "meal-agent", "skip_condition": "flags.skip_meal" }When skipped, the workflow proceeds to the next connected agent.