"None of us is as smart as all of us."
Census, Crowd-Sourced AI Agent
Chapter Overview
Complex tasks often exceed what a single agent can handle. Multi-agent systems coordinate multiple specialized agents to decompose problems, debate solutions, and synthesize results. This chapter surveys the rapidly evolving multi-agent framework landscape, including LangGraph, CrewAI, AutoGen, OpenAI Agents SDK, and Google ADK, with a comparative analysis of their trade-offs.
You will learn to design multi-agent architectures using supervisor, pipeline, mesh, swarm, hierarchical, and debate topologies. The chapter covers structured communication protocols with consensus mechanisms, durable state management using LangGraph state machines and Temporal, and human-in-the-loop interaction points with graduated autonomy and trust calibration. Building on the single-agent foundations from Chapter 22, these patterns connect to the safety considerations in Chapter 26.
Complex tasks often exceed what a single agent can handle. Multi-agent systems use collaboration patterns like supervisor hierarchies, debate, and pipeline architectures to decompose problems. This chapter builds on the single-agent foundations of Chapter 22 and connects to the safety considerations of Chapter 26.
Learning Objectives
- Compare major multi-agent frameworks (LangGraph, CrewAI, AutoGen, OpenAI Agents SDK, Google ADK) and select the right one for a given use case
- Design multi-agent architectures using supervisor, pipeline, mesh, swarm, hierarchical, and debate topologies
- Implement structured communication protocols with consensus mechanisms and strategies to prevent sycophantic convergence
- Build durable, checkpointed agent workflows using LangGraph state machines or Temporal for long-running orchestration
- Design human-in-the-loop interaction points with graduated autonomy and trust calibration
Prerequisites
- Chapter 22: AI Agent Foundations (ReAct loop, agent architectures, planning and memory)
- Chapter 23: Tool Use, Function Calling & Protocols (function calling, MCP, A2A protocol)
- Chapter 11: Prompt Engineering (system prompts, structured outputs, chain-of-thought)
- Familiarity with Python async patterns and basic graph or state machine concepts
Sections
- 24.1 Framework Landscape LangGraph, CrewAI, AutoGen/AG2, OpenAI Agents SDK, Google ADK, smolagents, PydanticAI, Semantic Kernel. Comparative analysis and trade-offs.
- 24.2 Architecture Patterns Supervisor, pipeline, mesh, swarm, hierarchical, and debate patterns. When to use each topology and how to combine them.
- 24.3 Communication, Consensus & Conflict Resolution Message passing, shared memory, structured debate protocols, sycophantic convergence, and mitigation strategies.
- 24.4 State Management, Workflows & Orchestration LangGraph state machines, Temporal for durable execution, checkpointing, conditional branching, parallel execution, and error recovery.
- 24.5 Human-in-the-Loop Agent Systems Approval workflows, escalation patterns, graduated autonomy, trust calibration, and designing effective HITL interaction points.
What's Next?
In the next chapter, Chapter 25: Specialized Agents, we survey specialized agent designs for code generation, research, data analysis, and other high-value domains.
