What is a Workflow?
A workflow is a visual graph of connected nodes that define a precise execution path. Each node performs an action or makes a decision, and edges connect nodes to define the flow. Unlike runbooks (which give agents flexibility), workflows follow explicit branches and conditions every time.When to Use Workflows
Workflows are ideal when:| Situation | Why Workflows Work |
|---|---|
| Exact steps required | Every execution follows the same path |
| Compliance/audit needs | Deterministic execution is traceable |
| Complex branching | Multiple decision points with clear outcomes |
| Tool orchestration | Multiple tools must coordinate precisely |
Workflow Components
Nodes
Nodes are the building blocks of workflows:| Node Type | Purpose | Example |
|---|---|---|
| Action | Execute a tool or operation | ”Search knowledge base” |
| Decision | Branch based on a condition | ”Is order eligible?” |
| AI Decision | Use LLM to evaluate and branch | ”Is customer satisfied?” |
| AI Extract | Extract data using LLM | ”Get order number from message” |
| Respond | Send a message to the customer | ”Here’s your tracking info” |
Edges
Edges connect nodes and define the flow:- Success path — Where to go when the node succeeds
- Failure path — Where to go when the node fails
- Conditional paths — Multiple outputs based on decision outcomes
Inputs and Outputs
Each node can:- Accept inputs — Data from previous nodes or the conversation
- Produce outputs — Data passed to subsequent nodes
Example Workflow
Refund Request Workflow: What this does:- Extracts the order number from the customer’s message
- Looks up the order in your system
- Checks if it’s within the return window
- Either processes the refund OR explains the policy
- Sends the appropriate response
Workflows vs Runbooks
| Aspect | Workflows | Runbooks |
|---|---|---|
| Format | Visual graph | Natural language |
| Execution | Deterministic — same path every time | Flexible — AI adapts |
| Best for | Strict processes, compliance | Judgment-based conversations |
| Complexity | Visual but more setup | Easy to write |
| Debugging | See exact path taken | See AI reasoning |
Choose Workflows When
- Process must be identical every time
- Audit trails require deterministic paths
- Multiple tools must execute in exact order
- Branching logic is complex but well-defined
Choose Runbooks When
- Conversations vary significantly
- AI judgment improves outcomes
- Quick iteration is important
- Instructions are easier than flowcharts
Workflow States
Workflows can have different states:| State | Meaning |
|---|---|
| Draft | Being edited, not available for agents |
| Published | Available for agents to use |
| Archived | Hidden, not available |