Quick Start
1
Simple Usage
Chain two agents so the second builds on the first.
2
With Configuration
Run independent agents together with the top-level
parallel primitive.How It Works
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?
Real-World Examples
Example 1: Customer Support Bot
A customer asks: “Why is my order delayed?”Example 2: Research Report
You ask: “Create a report on AI trends”Two Ways to Build Workflows
PraisonAI offers two approaches:Best Practices
Match the pattern to the task shape
Match the pattern to the task shape
Independent subtasks fit
parallel; ordered steps fit sequential; expert routing fits routing. Choosing the shape first keeps flows simple.Use AgentFlow for deterministic pipelines
Use AgentFlow for deterministic pipelines
AgentFlow(steps=[...]) runs exactly the steps you list. Reach for AgentTeam + hierarchical only when you want an AI manager to decide.Import primitives from the top level
Import primitives from the top level
from praisonaiagents import parallel (and when, loop) uses the friendly re-exports, so samples stay short and portable.Next Steps
Sequential Workflow
Start with the simplest pattern
Full Reference
Technical API documentation

