Skip to main content
Pick a workflow pattern and connect agents so they share context across steps.
The user chooses a pattern, configures agents, and submits a task that flows through the team.

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:
Start simple: Use Sequential for your first workflow, then explore other patterns as needed.

Best Practices

Independent subtasks fit parallel; ordered steps fit sequential; expert routing fits routing. Choosing the shape first keeps flows simple.
AgentFlow(steps=[...]) runs exactly the steps you list. Reach for AgentTeam + hierarchical only when you want an AI manager to decide.
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