Workflows
Workflows orchestrate complex, multi-step processes by connecting agents, conditions, and transformations into executable graphs. When a single agent is not enough, workflows let you coordinate multiple agents, add decision points, and include human approvals.
Why Workflows?
Some processes are too complex for a single agent:
- Multi-stage approval -- Review, manager approval, finance sign-off, then execute
- Data pipelines -- Extract, transform, validate, load
- Customer journeys -- Qualify, enrich, route, assign, notify
- Conditional logic -- High-value leads take the premium path; others take the standard path
Workflows give you visual process design, conditional branching, parallel execution, human-in-the-loop approvals, and error handling with retries.
Sample Workflow
Here is how the 8 node types come together in a typical flow:
Core Concepts
Node Types
Nodes are the building blocks of a workflow:
| Node Type | Purpose |
|---|---|
| Start | Entry point (exactly one required) |
| Agent | Execute an agent with input/output mapping |
| Condition | Branch based on expressions |
| Parallel | Execute multiple branches concurrently |
| Merge | Join parallel branches back together |
| Transform | Transform data without an agent |
| Delay | Pause execution for a set duration |
| Human | Wait for human input or approval |
| Loop | Repeat a sequence until a condition is met |
| Webhook | Wait for or send an external HTTP callback |
| Coding | Execute code in a sandboxed environment |
| Notify | Send a notification (email, Slack, in-app) |
| End | Exit point (at least one required) |
Edges
Edges connect nodes and define execution flow. Every node (except End) must have at least one outgoing edge, and every node (except Start) must have at least one incoming edge.
Merge Strategies
When parallel branches converge at a Merge node, you choose a strategy:
| Strategy | Behavior |
|---|---|
| All | Wait for every branch to complete |
| Any | Continue when any single branch completes |
| Race | Continue when the first branch completes; cancel the others |
Input/Output Mapping
Data flows between nodes using JSONPath references. You can reference workflow input, previous node outputs, and nested fields to wire data through the graph.
Best Practices
Begin with a linear workflow (Start, Agent, End) and add complexity as needed. Validate at each step.
Rather than building separate workflows for different scenarios, use Condition nodes to branch within a single workflow.
Any step that involves money, customer data, or irreversible actions should include a human approval gate. See Human-in-the-Loop.
Always configure a max execution time. Without one, a stuck workflow can consume resources indefinitely.
Next: Learn about Human-in-the-Loop for human approval workflows.