Phase 16: Multi-Agent & Swarms

The Multi-Agent Primitive Model

Four primitives, nothing more — the agent, the handoff, the shared state, the orchestrator — span a four-dimensional design space, and the major multi-agent frameworks shipping in 2026 (AutoGen, LangGraph, CrewAI, OpenAI Agents SDK, Microsoft Agent Framework) are points in it. This lesson builds them from zero, runs a toy system on all four, then maps every major framework onto the same axes so you can read any new release in one paragraph. Every six months a new multi-agent framework ships. AutoGen in 2023. CrewAI in 2024. LangGraph and OpenAI Swarm in 2024. Google ADK in April 2025. Microsoft Agent Framework RC in February 2026. Each press release claims to be "the right abstraction." If you try to learn them one at a time you will burn out. The APIs look different. The docs disagree about what an "agent" is. One framework calls its shared memory a "blackboard," another calls it a "message pool," a third calls it a "StateGraph." You start suspecting the field is just churning. It is not. Underneath the marketing, the four primitives are stable. Learn them once, read every new framework in one paragraph. Agent — a system prompt plus a tool list. Stateless; every run starts from its system prompt and the current message history. Handoff — a structured transfer of control from one…

The Multi-Agent Primitive Model: Four primitives, nothing more — the agent, the handoff, the shared state, the orchestrator — span a four-dimensional design…

This free lesson is part of the AI Engineering from Scratch curriculum. Read the full explanation, run the lesson code, and verify the result in the interactive reader or from the repository source.

Browse the complete course catalog or open this lesson on GitHub.