Skip to main content

Composing Multi-Agent Systems

Three orchestration primitives for combining agents.

SequentialAgent — Run agents in order

Each agent’s final answer becomes the next agent’s input.

ParallelAgent — Run agents concurrently

All agents run simultaneously. Each gets a derived context with branch isolation.

LoopAgent — Repeat until done

Repeats sub-agents until escalate=True (via exit_loop_tool) or max_iterations reached.

Custom stop condition

Combining patterns

Transfer routing — Agent handoff