Central question: What can run in parallel, and who decides what happens next?
The coordination module. Routing you can trust, diamonds that survive failures, org charts with one writer, dynamic execution with real brakes — and the human gate that makes autonomy shippable. Plus the merge layer: how many confident opinions become one coherent decision, on one version of the truth.
Three edge types cover almost all orchestration: sequential (always next), conditional (branch on state), and cyclic (bounded return). The deeper question is who decides the route. The rule that won the field: deterministic code controls predictable routing; models handle only steps that need actual judgment. A model may classify — but code should branch on the classification.
Google's ADK team crystallized this; Chi Wang's AutoGen research explored the opposite pole — free conversation among agents — and production practice settled decisively on governed routing.
LangGraph: add_conditional_edges with a plain function. ADK and Microsoft Agent Framework: routing objects that are code, not prompts. CrewAI Flows: event-driven but still explicitly wired.
Build a support-ticket router: an agent classifies severity, code branches to quick-answer or full-investigation paths. The branch condition must be a unit-testable pure function.
Run the same ticket ten times. The classification may vary at the model's temperature; the route taken for each classification must never vary.
Adds route-with-code — the cost lever Module 6 turns into model tiering.
The diamond is the workhorse topology of serious agent systems: split the job, run independent workers at once, merge at a join. Two disciplines make it work: the join must tolerate missing inputs (one failed worker cannot sink the run), and the reduce step is plain code — flatten, dedupe, filter cost zero tokens. A graph where every edge is an agent is paying rent on its own wiring.
Anthropic's parallelization pattern (sectioning and voting) and their measured result: a multi-agent research system outperformed a single-agent baseline by 90% on a research eval — because research fans out naturally.
LangGraph joins wait on all incoming edges with reducers merging state; Pydantic Graph models joins with reducer nodes; the ADK ParallelAgent runs children concurrently and gathers.
Build the diamond: three researcher workers with distinct angles → code reducer (dedupe by source) → one synthesizer. Kill one worker mid-run on purpose.
The run must complete with two workers' results and say so in the output. Amdahl check: measure wall-clock vs the serial version and explain the gap.
Adds fan-out/reduce/synthesize — the exact skeleton of Studio patterns 3, 4, and 7.
Above the diamond sits the org chart: a supervisor decomposes and delegates to specialist workers, or peers hand off control directly. The critical design line: many agents may read; only one writes. Parallel reading is safe because a bad opinion costs nothing until someone acts on it — so concentrate the acting.
João Moura's CrewAI is role-based teams as a first-class concept; Cognition's Devin experience produced the read-parallel/write-single rule after a year in production.
OpenAI Agents SDK makes handoffs a primitive (an agent transfers the conversation with context); CrewAI expresses supervisor-worker as crew roles; Microsoft Agent Framework types the whole workflow.
Build a three-specialist crew (facts, numbers, counterarguments) under one supervisor that owns the only write path to the final document.
Grep the trace: exactly one node performed writes. Every specialist output is present or explicitly discarded with a reason.
Adds single-writer; Module 4 turns the readers into armed critics.
Some work can't be planned before it starts — discovery of unknown size, plans that emerge from findings. Dynamic graphs let a model draw the topology at runtime; the safety is that the drawing is still code you cap: max agents, max rounds, budget ceilings, and loop-until-dry convergence (stop after K empty rounds). And some edges must end at a person: irreversible actions route through human approval as a node, not an afterthought.
The orchestrator-workers pattern from Anthropic's effective-agents taxonomy; the 12-factor rule 'contact humans with tool calls' makes escalation structured data.
LangGraph interrupts pause a graph mid-run for human input and resume from checkpoint; Microsoft Agent Framework builds approval steps into typed workflows.
Add two things to your Module 2 diamond: a dynamic finder loop that stops after two dry rounds, and a human-approval gate before anything is published.
Force the dry-loop with a narrow query (must stop at exactly 2 empty rounds) and decline the approval once (the graph must end in a clean 'rejected' state, not a crash).
Completes the orchestration cluster; the Module 2 project assembles all four lessons into one graph.
One agent working long inside one context fails in three documented ways: agentic laziness (declares done after partial progress — the security review that quietly covers 35 of 50 items), self-preferential bias (asked to judge its own output, it prefers what it already produced), and goal drift (constraints and edge cases fade as the conversation gets summarized). Graphs cure all three structurally: fresh context per node, and verification before trust. The field has since settled on six named patterns: classify-and-act (routing), fan-out-and-synthesize (the diamond), adversarial verification, loop-until-done (the converging cycle) — plus two most builders underuse: generate-and-filter (produce twenty candidates, keep the three that survive a rubric) and tournament (candidates compete pairwise before a judge — for calls that are comparative rather than absolute, like naming or ranking).
Anthropic's dynamic-workflows team named both the failure modes and the pattern set; the practitioner rule that followed: you don't invent a pattern per task — you learn to recognize which of the six a task already is.
All six express in every Module 2 framework. Generate-and-filter is a fan-out whose reducer is a rubric gate; tournament is a bracket of pairwise judge nodes with a single winner edge.
Pick two real decisions from your own work: one absolute (“does this pass?”) and one comparative (“which name is best?”). Design generate-and-filter for the first and a four-candidate tournament for the second.
The filter's rubric must reject at least one candidate on a named criterion; the tournament's judge must compare pairwise (never score all four at once) and produce one winner with reasons.
Adds generate-and-filter and tournament to your pattern vocabulary. Source: @mikenevermiss's graph engineering guide and Anthropic's dynamic-workflows deep dive.
The two layers compose by one rule: every node in the graph is an agent running a loop. The graph decides who runs and when; the loop decides whether you can trust what comes back. Build the graph out of loops you can trust — or you have built a faster way to ship bugs across a fleet. And one test grades the whole system: can it take “done” back? A scheduler that refuses to merge a node that fails its gate, a task store that flips work back to not-ready when a blocker reopens, an exit hook that un-finishes a finished session, an eval that fails a previously green trace. A system that can only promote is a burndown chart with extra steps.
Granite (@Granite0x)’s “A Graph of Loops” builds the whole shape from ten real repos, read at the source: a plain-code DAG scheduler with a lint/type/test merge gate (bernstein), worktree-per-agent isolation, 203 specialist roles (“a graph of identical agents is just a slow agent”), graph memory with decay (beads), a ~95-line readable loop core, symbol-level context retrieval (serena, reclaiming ~16k tokens of tool descriptions), skills, a Stop-hook review gate with a second model, and trace-replay evals. Each entry names its trap — the honesty most tool lists skip.
The steal-this detail: in the shipped research plugin, a deterministic script — not a model — scores every claim and is the only writer of the verified-claims file. Fan out with models; let code decide what survives. Compare with this course’s read-only critics (Module 4): the strongest gate is the one that cannot be persuaded.
Audit your own multi-agent design one layer at a time: for each graph function (schedule, isolate, specialize) and each loop function (memory, iterate, context, skills, gate, proof), name the component that provides it — or write “missing.”
Run the take-done-back test at every layer: can the scheduler refuse a merge, can a task un-complete, can a finished session be blocked from exiting, can a green eval go red on replay? Every “no” is a place where a bad result becomes permanent.
Adds graph-of-loops and take-done-back. This is Module 2’s topology meeting the Loops course’s trust machinery — the same nesting the Harness course draws as environment → feedback → flow.
A huge share of what builders burn model tokens on is really an edge — and edges are plain code. The reduce step between fan-out and synthesis (flatten, dedupe, filter, rank) needs no agent: it is deterministic code operating on the shapes your nodes returned, and it costs zero tokens. What is not free is the barrier: a full fan-in makes every downstream step wait for the slowest node. So the operating rule: stream items through stages independently by default (a fast item finishes while a slow one is still in stage one), and pay for a barrier only when a stage genuinely needs every prior result at once — a cross-set dedupe, an early-exit on the total, a prompt that compares against “the other findings.” The smell test: if you wrote parallel → transform → parallel and the middle transform has no cross-item dependency, the barrier was waste.
Codez (@0xCodez)’s 4.6M-view graph-engineering roadmap — the graph entry in his context/loops/graphs trilogy — plus two economics levers it teaches: tier the models across nodes (bounded, repetitive nodes run on a cheap model; the merge and adjudication nodes keep the expensive one — topology makes the split obvious in a way a single agent never does), and the convergence detail that makes cycles safe: dedupe against everything seen, not just confirmed results, or rejected findings reappear every round and the loop never runs dry.
In Claude Code’s dynamic workflows this is literal API surface: parallel() is the barrier, pipeline() is the stream, the reducer between them is JavaScript, and a per-node model option routes one call to a cheaper tier. In LangGraph the same economics appear as joins versus independent branches.
Take your Module 2 research-graph project and label every stage boundary: barrier or stream? For each barrier, write the one-line cross-item reason it exists. Then mark each node cheap-model or judgment-model.
Your design passes when every barrier has a stated cross-item dependency, every pure transform runs as code (zero agent calls), and at least half the fan-out nodes run on the cheaper tier without degrading the merged output.
Adds edges-are-free and barrier-vs-stream. Module 4 measures what this lesson designs: cost per accepted result, node by node.
When N independent workers each produce a confident opinion and none knows the others exist, the layer that combines them is a system of its own — trading desks call it the central risk book or the portfolio construction engine; most agent graphs call it “the reducer” and under-build it. Four disciplines from desks that lose real money when it’s wrong: reliability shrinkage — an output travels with confidence and sample size, and the merge scales each voice by both, so a worker live since yesterday gets a smaller say than one proven for years, even when both say “buy”; hidden redundancy — two outputs can look unrelated and be the same bet underneath (two signals correlated 0.6 through a sector tilt neither meant to express), so residualize against shared factors before combining or you fund the same bet twice; budgets by risk, not by count — equal shares across branches silently hands the noisiest branch the most influence, so size each branch to contribute an equal share of risk; and netting — when two workers propose opposing actions on the same object, net before execution or you pay the cost twice for a result that barely moved.
Ruuj (@RuujSs)’s alpha orchestration layer builds this as a five-node graph and names the enforcement culture around it: the pod-shop drawdown discipline reported at Millennium — 5% loss triggers a 50% capital cut, 7.5% terminates the pod — is bounded repair applied to whole workers.
In LangGraph the merge is a reducer over typed state — make it carry (score, confidence, n_obs) tuples instead of bare answers; the shrinkage, netting, and budget steps are plain code (Lesson 2.7: edges are free); DSPy (Module 4) can tune the shrinkage weights against a measured outcome.
Upgrade your Module 2 diamond’s reducer: each researcher returns (claim, confidence, evidence_count); weight each claim by confidence × min(1, evidence/5); net opposing claims about the same fact; log what got netted away and why.
Feed two workers the same hidden source so they return one claim in different words — the merge must combine them as one bet, not double-count. A low-evidence claim must demonstrably move the final answer less than a high-evidence one.
Adds reliability-shrinkage, hidden-redundancy, risk-budgets, netting. Source: @RuujSs’s alpha orchestration layer.
Two correctness rules hide inside every serious orchestration layer. First: propose-then-veto is backwards. A pipeline that generates decisions and then trims whatever violates a limit spends its whole cycle producing answers it structurally could never keep — put the constraints inside the solve, so an infeasible answer is never generated at all. Second: version drift. The sneakiest failure isn’t stale data — it’s two nodes reading different versions of the truth in the same decision cycle. A budget computed on version 41 of shared state, a decision solved against version 42 that landed forty milliseconds later: each number individually correct, the combination never coherent at any single instant, and nothing throws an error. The fix is snapshot isolation, borrowed from databases: freeze one snapshot at cycle start, every node in the cycle reads only from it, writes land for the next cycle.
Ruuj (@RuujSs) calls this “a distributed systems correctness problem, not a finance problem dressed up in finance vocabulary” — wrong in a way nobody notices “until the P&L explains it weeks later.” The same race exists in any multi-node graph sharing mutable state.
LangGraph’s superstep execution already gives snapshot semantics — state updates apply between supersteps, never during one; Pydantic Graph’s typed state makes the version explicit as a field. A constrained-solve node is deterministic code (an optimizer library), not an agent.
Add a version counter to your graph state. Snapshot at cycle start; make every node log the version it read. Then move one after-the-fact validity check (a cap or limit) inside the deciding node so violating candidates are never produced.
Inject a mid-cycle write; every node in that cycle must still log the same snapshot version. Count proposals rejected by the moved limit: after the constraint lives inside the solve, that count must be zero.
Adds constraints-in-the-solve and snapshot-isolation. Module 3 persists state across runs; this lesson keeps it coherent within one. Source: @RuujSs.
Walk any workflow step by step and ask one question at each arrow: does this step actually consume the previous step’s output? If not, the edge is fake — the wait is pure waste, and the two jobs can run at once. Your linear agent is already a graph, “just the saddest one”: forty chained steps are forty sequential failure points with the latency of all forty added together, when the real dependencies usually number three to five. Then know the three failures that end most production graphs: context collapse — a thousand fan-out results cannot feed one synthesis step; layer the fan-in (batch → summarize each batch → combine summaries, so the final step reads twenty-five summaries, not a thousand raw outputs); false independence — two nodes whose prompts never mention each other but write the same file or hit the same rate-limited API share a hidden edge (the Bun port team learned this fanning agents across one workspace; give every worker its own worktree); and silent node failure — in a chain a death is obvious, in a graph one dead node among two hundred slips into a report that looks complete, so every merge counts its inputs against the number it expected and flags the gap.
rvaniaaa (@rvaniaaaa)’s 107K-view fleet guide, whose opening diagnosis names the discipline: “That is not an agent problem. That is a shape problem. The model was never the bottleneck. The line you drew was.”
Contracts make the cuts safe: a node whose output is a wall of free text is a node only a human can read; a schema-shaped output is one the next node consumes without guessing. In Claude Code workflows the mechanics are literal: per-agent worktree isolation, filter(Boolean) plus an expected-count assertion at every merge.
Redraw a real ten-plus-step workflow: mark every edge real or fake with the one-line data reason. Cut the fakes. Add an input-count assertion to every merge node.
You should find at least two fake edges — almost every hand-drawn workflow has them. Then kill one worker mid-run: the merged report must flag the missing input, never present itself as complete.
Adds fake-edge-test, layered-fan-in, hidden-edge, count-your-inputs. Module 1’s contracts define the edges; this lesson deletes the ones that never existed. Source: @rvaniaaaa.
Topology alone does not buy truth. Build the full graph — paired verifiers, audit nodes, every node watching another — and let the audit check numbers against the same system they came from, and everything is consistent while nothing is verified: it fails exactly like the single loop, “just later, more expensively, and with far more green lights on the way down.” The graph needs anchors — nodes that cannot be argued with: tests that actually ran, revenue that landed, customers who stayed — and frozen rules, the ones an optimizer would be tempted to weaken, kept off-limits precisely because it would bend them to win. Then the economics: a graph buys breadth, not judgment, and the coordination gets cheaper — not the work. The discipline is cap first, watch the cost, earn the scale: run the first graph capped near twenty items, read the usage report, and ask three questions — did the fan-out produce anything a single agent couldn’t? did the verifier catch something the worker missed? did the result justify the cost? Three yeses double the cap; any no means fix the shape before going wider, because a graph that doesn’t earn its cost at twenty will not earn it at two thousand.
rvaniaaa (@rvaniaaaa): “The graph is only as honest as the things inside it that refuse to move.” The ceiling story sets the stakes: the Bun runtime rewrite — roughly 535,000 lines of Zig to over a million lines of Rust in about eleven days, ~50 workflows, up to 64 agents at once, roughly $165,000 in usage, one human designing and monitoring, and real criticism over whether that much AI-written code can be safely reviewed.
Anchors are deterministic nodes — Module 4’s code-not-judge rule wearing production clothes. Budget caps are literal API surface (hard agent caps, token budgets); model tiering (Lesson 2.7) is the other half of the same economics. And the when-not-to-build list is Module 0 restated from the fleet side: small tasks, tight oversight, exploration, genuinely serial chains — if the fake-edge test finds nothing to cut, it’s a loop, and a loop that runs beats a graph that impresses nobody.
For your biggest planned graph: list its anchors (each must be a fact code can check), freeze-list the three rules an optimizer would bend, then run it capped at twenty items and answer the three questions in writing.
Trace every verification path to its terminus: it must end at an anchor outside the system being verified. Any path that cycles back into the graph’s own outputs is consistency cosplaying as verification.
Adds anchors, frozen-rules, earn-the-scale. Module 6’s spend caps enforce what this lesson decides. Source: @rvaniaaaa’s fleet guide.
Lesson 1 of every module is open. The full module — all lessons, the tool lab, and the graded project — unlocks with any plan.
Try Free — 30 Days (no card) Own the course — $6.93 Compare plansPurchased already? Sign in with your checkout email.
Express the supervisor + parallel workers + reducer + conditional reviewer topology in LangGraph, then sketch the same design in ADK, Microsoft Agent Framework, OpenAI Agents SDK, and CrewAI. You are not learning five APIs — you are learning one shape and five accents. This lab seeds Module 5.
Build the research diamond end-to-end: parallel researchers with distinct angles, a zero-token reducer, a conditional reviewer that can send work back once, and a human publication gate.
Acceptance criteria — all must be demonstrably true: