workflow_definition object passed to Create from Definition and Update Agent defines the full conversation graph. It is the same structure the dashboardβs visual workflow builder reads and writes β building an agent in the UI produces a workflow_definition under the hood, and anything you can configure visually can equally be expressed here as JSON.
Nodes
Each node represents a step in the conversation.Node types
Node data fields
Common fields (all node types)
agentNode β data extraction
Extraction variable schema:
type is one of string, number, or boolean.
agentNode β tools
trigger node
webhook node
qa node
Edges
Each edge connects two nodes and defines when the transition fires.Validation rules
- All
sourceandtargetIDs in edges must reference existing node IDs - All nodes except
trigger,webhook, andqamust have a non-emptyprompt - Node IDs must be unique within the workflow
- Each workflow must have exactly one
startCallortriggernode as the entry point