Skip to main content
A workflow with a central orchestrator directing multiple worker LLMs to perform subtasks, synthesizing their outputs for complex, coordinated operations.
The user submits a complex task; the orchestrator routes subtasks to workers and synthesises the final answer.

Quick Start

1

Simple Usage

Create app.py:
Run it:
2

With Configuration

Add routing tools and explicit task wiring for finer control:
Requirements
  • Python 3.10 or higher
  • OpenAI API key. Generate OpenAI API key here. Use Other models using this guide.
  • Basic understanding of Python

How It Works

The user submits a task; the orchestrator picks a worker via route(), the worker executes, and the synthesizer merges the result.

Understanding Orchestrator-Worker Pattern

What is Orchestrator-Worker?

Orchestrator-Worker pattern enables:
  • Dynamic task distribution and routing
  • Specialized worker execution
  • Result synthesis and aggregation
  • Coordinated workflow management

Features

Task Routing

Intelligently distribute tasks to specialized workers.

Worker Specialization

Dedicated agents for specific task types.

Result Synthesis

Combine and process worker outputs effectively.

Process Control

Monitor and manage the orchestrated workflow.

Configuration Options

Troubleshooting

Routing Issues

If task routing fails:
  • Check routing conditions
  • Verify worker availability
  • Enable verbose mode for debugging

Synthesis Flow

If result synthesis is incorrect:
  • Review worker outputs
  • Check context connections
  • Verify synthesis logic

Best Practices

The orchestrator should return a single routing keyword — avoid asking it to perform worker tasks directly.
Give workers narrow roles (research, code, writing) so the orchestrator can route confidently.
A final synthesizer agent merges worker outputs into one coherent response for the user.

AutoAgents

Automatically created and managed AI agents

Mini Agents

Lightweight, focused AI agents

Multi-Agent Pipelines

Chain agents into production pipelines

Nested Workflows

Compose workflows inside workflows