Skip to main content
Multi-agent systems enable specialized agents to work together on complex tasks. Each agent focuses on a specific domain and coordinates through orchestration patterns.

Multi-Agent System Design Patterns

There are many ways to design multi‑agent systems, but we commonly see two broadly applicable patterns:
  • Manager (agents as tools): A central manager/orchestrator invokes specialized sub‑agents as tools and retains control of the conversation.
  • Handoffs: Peer agents hand off control to a specialized agent that takes over the conversation. This is decentralized.
This guide focuses on the Manager pattern (agents as tools), which is the most common and straightforward approach.

Installation

Manager Pattern (Agents as Tools)

In the Manager pattern, a central orchestrator invokes specialized agents as tools. The orchestrator retains control throughout the conversation and decides when to call each specialized agent.

Creating Specialized Agents

Each specialized agent focuses on a specific task:

Creating the Orchestrator

The orchestrator coordinates the workflow by delegating to specialized agents. It wraps specialized agents as tools:

Best Practices

  1. Clear Boundaries: Each agent should have a specific, focused responsibility
  2. Efficient Communication: Minimize overhead between agents using appropriate patterns
  3. Structured State: Use typed state classes when agents need to share data

Next Steps