See also: Five-Layer Agent Stack — AgentFlow is Layer 5 (the Graph).AgentFlow is the workflow orchestration system for creating deterministic, multi-step pipelines. It supports sequential execution, conditional branching, loops, and parallel processing.
Quick Start
1
Simple Pipeline
Create a basic sequential workflow:
2
With Variables
Pass variables between steps:
3
Planning Mode
Enable AI-powered planning for complex workflows:
4
With Loops
Iterate over items:
Flow Patterns
Sequential
Steps execute in order, each receiving the previous step’s output.Conditional Branching
Route to different steps based on conditions.Parallel Execution
Execute steps simultaneously.Loops
Iterate over collections.Configuration Options
Using Functions as Steps
You can use regular Python functions as steps:Execution History
Enable history for debugging:Best Practices
Step Naming
Step Naming
Name your agents clearly for better debugging:
Variable Templating
Variable Templating
Use
{{variable}} syntax in agent instructions:Error Handling
Error Handling
Use hooks for error handling:
Key Methods
Related
AgentTeam
Multi-agent coordination
Agent
Individual AI agents
Recipes
Pre-built workflow templates
Process
Execution patterns

