Agent Orchestration Explained

/learn

How an orchestrator runs an agent

One chapter per mechanism, each opening with an animation. Every frame is computed by the Agent_Loop_Sim engine's orchestration module, identically in Python and in your browser, and its graph runtime is checked against real LangGraph. Toggle layers (Concept / Maths / Code) inside any chapter to choose how deep to go. For the slides, see Introduction to LangGraph.

  1. A request flowing through a graph, super-step by super-step: nodes light up together, writes wait at a barrier, state flows along the edges, and a step lasts as long as its slowest node.

  2. Two parallel branches write the same key: no reducer is an error, an add reducer keeps both in a fixed order, a custom reducer picks one; and what a router can see.

  3. A checkpoint after every super-step: a run that crashes and resumes, a human interrupt, an edit, and time travel that forks the thread, on a timeline of checkpoints.

  4. An event history replayed after a crash: recorded steps are not run again, a step that reads the clock breaks the replay, and an idempotency key stops a double charge.

  5. Single agent, supervisor, hierarchical, swarm, debate and map-reduce on the same task: every call on a timeline, each agent's context, and what each pattern costs in tokens, time and reliability.

  6. Parallel workers under a rate limit: watch calls queue for token capacity and the speed-up saturate, against Amdahl's law and the bound the token bucket sets.

  7. Success decays with every step; retries fix visible errors, a verifier catches silent ones. The closed forms beside seeded simulations and their confidence intervals.

  8. Hundreds of workflows sharing one rate-limited endpoint: queueing, tail latency, retries and cost per successful task, and the knee where load meets capacity.

  9. A decision guide built from the simulation: set constraints on success, latency, cost and throughput, and watch them strike out patterns until one is left.