AI Engineering from Scratch Phase 16 Introduction
AI Engineering from Scratch
0% Completed

Phase 16: Multi Agent And Swarms

Phase 16: Multi-Agent & Swarms

> Coordination, emergence, and collective intelligence.

Start this phase on GitHub

Prerequisites: Phase 14 Agent Engineering. Node.js 20+ and npx are
needed for the first TypeScript demo.

First lesson: Why Multi-Agent

Run this command from the repository root:

npx --yes tsx phases/16-multi-agent-and-swarms/01-why-multi-agent/code/single_vs_multi.ts

Keep the command, exit code, single-agent and multi-agent token and tool-call
totals, and one tradeoff that makes the added coordination worthwhile.

Next action: Change the task, compare the two approaches again, then
continue to FIPA-ACL Heritage and Speech Acts.

Browse the full Phase 16 lesson list or the
cross-phase roadmap.

Lessons in this phase

  • Why Multi-Agent?
  • Heritage of FIPA-ACL and Speech Acts
  • Communication Protocols
  • The Multi-Agent Primitive Model
  • Supervisor / Orchestrator-Worker Pattern
  • Hierarchical Architecture and Its Failure Mode
  • Society of Mind and Multi-Agent Debate
  • Role Specialization — Planner, Critic, Executor, Verifier
  • Parallel / Swarm / Networked Architectures
  • Group Chat and Speaker Selection
  • Handoffs and Routines — Stateless Orchestration
  • A2A — The Agent-to-Agent Protocol
  • Shared Memory and Blackboard Patterns
  • Consensus and Byzantine Fault Tolerance for Agents
  • Voting, Self-Consistency, and Debate Topology
  • Negotiation and Bargaining
  • Generative Agents and Emergent Simulation
  • Theory of Mind and Emergent Coordination
  • Swarm Optimization for LLMs (PSO, ACO)
  • MARL — MADDPG, QMIX, MAPPO
  • Agent Economies, Token Incentives, Reputation
  • Production Scaling — Queues, Checkpoints, Durability
  • Failure Modes — MAST, Groupthink, Monoculture, Cascading Errors
  • Evaluation and Coordination Benchmarks
  • Case Studies and the 2026 State of the Art