Workflows
Workflows orchestrate complex, multi-step processes by connecting agents, conditions, and transformations into executable graphs.
For full documentation, see Workflows (Full Guide).
Quick Overview
Why Workflows?
Some processes are too complex for a single agent:
- Multi-stage approval: Review → Manager approval → Finance sign-off → Execute
- Data pipelines: Extract → Transform → Validate → Load
- Customer journeys: Qualify → Enrich → Route → Assign → Notify
- Conditional logic: If high-value → premium path, else → standard path
Node Types
| Node Type | Purpose |
|---|---|
start | Entry point |
agent | Execute an agent |
condition | Branch based on conditions |
parallel | Execute branches concurrently |
merge | Join parallel branches |
human | Wait for human input |
end | Exit point |
Basic Example
const workflow = await client.workflows.create({
name: 'Lead Processing',
nodes: [
{ id: 'start', type: 'start' },
{
id: 'qualify',
type: 'agent',
agentId: 'qualification-agent'
},
{ id: 'end', type: 'end' }
],
edges: [
{ id: 'e1', source: 'start', target: 'qualify' },
{ id: 'e2', source: 'qualify', target: 'end' }
]
});
Full documentation: Workflows (Complete Guide)