Skip to content
47% off: the complete course for $79 (reg. $149)Order now →
Agent Builder
Module 6Full course11 min read

Handoffs and Shared State

Pass work between agents reliably using artifacts, structured handoff notes, and shared files instead of giant transcripts.

The moment work passes from one agent to another, something has to carry it across. The lazy answer is to hand the next agent the previous agent's whole conversation. It's also the wrong answer: transcripts are huge, full of dead ends, and expensive, and the receiving agent latches onto the wrong details. Most broken multi-agent pipelines aren't broken by bad models; they're broken by bad handoffs.

This lesson shows you how to pass work between agents reliably. You'll use artifacts, files that hold the actual work product, plus small structured handoff notes enforced by a schema, so every agent receives exactly what it needs and nothing else. You'll build a three-stage research, write, and review pipeline in TypeScript, and learn simple rules for shared state that keep parallel agents from corrupting each other's work.

Why transcripts make terrible handoffs

Imagine joining a project and, instead of a briefing, being handed a recording of every meeting your predecessor attended. Everything you need is in there somewhere, buried under false starts and abandoned ideas. That's what passing a transcript to an agent does.

Concretely, transcripts cause three problems:

  • Cost. A research agent's transcript can easily run to tens of thousands of tokens of fetched pages. The next agent pays to read all of it, on every turn.
  • Distraction. The receiving agent sees the dead ends alongside the conclusions and can't always tell which is which. It may repeat a rejected idea or cite a page the first agent decided was unreliable.
  • No contract. Nothing guarantees the transcript contains what the next stage needs. If the researcher forgot to note sources, the writer finds out too late.

The fix is the same one human teams use: separate the work product from the briefing.