Cover of Multi-Agent Systems
From Keyword to Code

Multi-Agent Systems

CrewAI, Supervisors and Handoffs — Plus When One Agent Was Enough

Explore how multiple AI agents coordinate through supervisors and handoffs. Consider CrewAI alongside the more fundamental question of when multiple agents are useful and when one agent is sufficient.

View on Amazon ↗

Opens Amazon in a new tab. Check the listing for formats and availability.

A closer look

About this book.

Every "multi-agent" tutorial shows you how to wire up three agents. Almost none of them tell you when you shouldn't have.

Most multi-agent demos would work fine as one agent with a few tools — and the ones that don't fail in ways a single-agent tutorial never prepares you for: silent handoffs that drop context, a Supervisor that rubber-stamps a broken answer, and a cost bill that multiplies 6 to 8 times overnight with nobody watching.

This book starts by teaching you to tell the difference. A three-question framework — role specialization, parallelism, failure isolation — decides whether your task actually needs more than one agent, before you write a line of code. Then you build the real thing: a Researcher, Analyst, and Supervisor crew in CrewAI, each with restricted information and a specific job, coordinated through explicit handoffs and a hard, enforced dollar budget from day one.

You'll debug a real multi-agent failure using a named catalog of six failure modes, measure your own cost multiplier against a single-agent baseline, scale past three agents with AutoGen's conversational patterns, and ship the whole thing behind a FastAPI endpoint.

Every example is real, runnable Python — not pseudocode, not a diagram.

Beyond the book

Reader resources.

Download chapter code (ZIP)

Includes a README with setup notes and a chapter-by-chapter file index.

Official documentation and guides for topics covered in this book.

← Back to the books