Workflows
Workflows define how multiple agents work together to complete a task. Just like a team of people in an office, agents can collaborate in different ways depending on the task.What is a Workflow?
Think of a workflow as a recipe that tells your agents:- Who does what
- In what order
- How they share information
The Four Main Patterns
🔀 Routing
“Send to the right expert”Like a receptionist directing calls to the right department.
⚡ Parallel
“Everyone works at once”Like a team researching different topics simultaneously.
➡️ Sequential
“One step at a time”Like passing a document from person to person for review.
👔 Orchestrator
“Manager delegates work”Like a project manager assigning tasks to team members.
Which Pattern Should I Use?
| I want to… | Use this pattern |
|---|---|
| Send requests to different specialists | Routing |
| Do multiple independent things at once | Parallel |
| Process step-by-step (A → B → C) | Sequential |
| Let an AI decide how to break down work | Orchestrator |
Real-World Examples
Example 1: Customer Support Bot
A customer asks: “Why is my order delayed?”| Pattern | How it works |
|---|---|
| Routing | Classify the question → Send to Shipping Agent |
| Sequential | Lookup Order → Check Status → Write Response |
Example 2: Research Report
You ask: “Create a report on AI trends”| Pattern | How it works |
|---|---|
| Parallel | Research AI + Research ML + Research NLP (all at once) |
| Sequential | Research → Analyze → Write → Edit (step by step) |
| Orchestrator | Manager assigns: “You research, you analyze, you write” |
Two Ways to Build Workflows
PraisonAI offers two approaches:| Approach | Class | Best for |
|---|---|---|
| Deterministic Pipelines | AgentFlow | You define exactly what happens |
| Dynamic Delegation | AgentTeam + hierarchical | AI manager decides |

