All chapters
  1. Start hereSomething has to decide what runs next
  2. Foundations · 1Sequence, branch and loop: the three primitives of every workflow
  3. Foundations · 2State machines, DAGs, events and agent loops: four shapes of control
  4. Patterns · 3One agent with tools, or several specialized agents
  5. Patterns · 4Supervisor, planner-executor, router, swarm and peers: who talks to whom
  6. Patterns · 5Control plane and data plane: where code decides and where a model may
  7. Mechanics · 6Task queues, fan-out and fan-in, concurrency and rate limits
  8. Mechanics · 7Handoffs: what one agent must give the next
  9. Mechanics · 8Human approvals: pause, wait for a person, resume safely
  10. Production · 9Durable workflows: checkpoints, retries, compensation and cancellation
  11. Production · 10Permissions, budgets and termination: what a run may do, spend, and when it must stop
  12. Production · 11Failure propagation, circuit breakers and fallback routes
  13. Production · 12Trace propagation and outcome evaluation across a workflow
  14. Reference · 13Frameworks: LangGraph, Temporal, AutoGen, CrewAI and the provider SDKs
  15. Reference · 14Testing orchestration: transition coverage and fault injection
  16. Reference · 15Advanced: speculative execution, deadlocks, fairness and evaluating many agents
  17. Reference · 16The insurance lab: one quote workflow, end to end
  18. ReferenceGlossary
  19. AboutAbout this site and its sources
About

About this site and its sources

What this site is, what it is not, where its ideas come from, how the facts were checked, and the sister sites.

This is a knowledge site about orchestration in agentic software: the logic that decides what runs next, under which conditions, and how the pieces coordinate. It starts from sequence, branch and loop and climbs to durable workflows with several agents, a pause for a person, failures, budgets and traces. At each step it asks one question: who decides what runs next here, code or a model? It is written for engineers and architects who build agent systems and have to decide where a model's choice belongs and where it does not.

One example runs through every page. An insurer receives a broker's request for a quote. The quote workflow turns the email into a submission, gathers evidence with three lookups, applies the rules of a policy fixture, drafts a recommendation, checks the process with a guard, stores the recommendation and waits for an underwriter. The model recommends; a person decides.

What it is and is not#

It isIt is not
A ladder: one idea per page, each word in plain English with a tiny example before it is usedA standard, or the only way to design a workflow
One running example: the quote workflow, eighteen cases, followed through every chapterA record of any real insurer. The cases, the rules, the fields, the provider and the timings are invented
A demonstration of mechanism: how steps, transitions, guards, waits, retries and traces fit togetherA measurement of any model or product. No page reports how good or how fast a real system is
Code that was run: a small workflow engine in standard-library Python, with its real outputA framework to install. It is short so that it can be read whole, and it leaves things out
Frameworks described from their own documentation, by what each one runs for youA ranking or a buying guide. No framework is called best, and no price is quoted

What is original here and what is not#

Most ideas on this site are older than agents: state machines, directed acyclic graphs, queues and workers, checkpoints, idempotency keys, sagas, circuit breakers, deadlock and trace propagation all come from decades of distributed systems and operating systems work. This site applies them to workflows in which a model makes some of the choices.

PartStatus
Sequence, branch, loop; state machines; DAGs; queues, workers, fan-out and fan-in; timeouts; deadlock, livelock, starvationFoundational computer science, explained here without a single source
The saga and compensationFrom "Sagas" by Hector Garcia-Molina and Kenneth Salem (1987), read for this site; see durable workflows
Trace and span identifiersTheir shape follows the W3C Trace Context recommendation; see tracing
Workflows versus agents; routing; when to use several agentsPublished guidance by Anthropic, OpenAI and Cognition, quoted with attribution on one or many and topologies
The distinction between the control plane and the data planeA networking idea applied to agent workflows
The hybrid design: a deterministic skeleton, a model's choice inside one bounded step, a code guard at its exit, a person at the decisionA design proposed on this site; see control plane
The site's one question ("who decides what runs next here, code or a model?")The organizing question of this site
The quote workflow, the policy fixture, the eighteen casesUW-001 to UW-010 are shared by the series; UW-901 to UW-908 and policy version 2026.3 were written for this site. All synthetic
The example code, its tests, the labs and the diagramsWritten for this site

Where a page takes an idea from a source, the page says so. Where this site proposes something, it calls it a design.

How the facts were checked#

Kind of claimHow it was checked
A named framework, SDK or standardRead on its own documentation on the day of writing (2026-11-17) and logged with the page address and the date. Where the documentation is silent, the page says so. Statements about products live on Frameworks
A surprising factFetched a second time by a different reader before publication. Four were confirmed this way: the AutoGen repository is archived and points to Microsoft Agent Framework; Google's Agent Development Kit marks its template workflows deprecated and its documentation moved to adk.dev; the Spring Retry repository is archived and superseded by Spring Framework 7; Anthropic's "Building effective agents" notes that much of its tooling landscape has changed since December 2024
An idea from a sourceThe source was opened and read on the day of writing, and is listed below
The exampleRun. Every command shown from examples/uw-orchestrator/ was executed in a scratch copy, and the output on the page is the output it printed. The folder has 45 unit tests
The labsThey read data that a script generates from the example with a fixed seed. Their logic is a second implementation of the Python functions in core.py, and a test fails if the two disagree
NumbersSynthetic and illustrative unless a source is linked. A number from the example is the result of a script, never a measurement
Other codeA block that was not run says how far it was checked, for example "documented shape; not run here"
Links and structureA build step checks every internal link, every diagram and every glossary reference before the site is published

Documentation changes. Treat every statement about a framework as true on the day it was read, and read its page again before you build on it.

What the example does not show#

The insurance example is an illustrative reconstruction for teaching. The cases, the rules, the fields, the provider, the timings and every number are invented. Nothing here reports the quality of a real system or model. The agents here are scripted stand-ins and time is simulated, so the results show how the orchestration works, not how good or how fast any model is.

In the exampleWhat it really is
The intake, assessment and underwriting agentsScripts. No model is called, there is no network and no key
The stand-in model of loop modeA seeded random plan, so the path varies between trials and every reader sees the same variation
The tools and the roof-data providerStand-ins that return what the case file tells them to return
The underwriter cockpit and the underwriterThe case file, which sends the decision signal
The policy fixtureFive illustrative rules in three versions. They are not insurance practice
Durations and the clockConstants and a simulated clock. Nothing sleeps
Checkpoints and the storeJSON files in an output folder

The example also leaves things out, and the pages say so where it matters: rate limits, event-history replay, speculative execution, deadlock detection and fairness policies are explained, not implemented. The whole example is on the insurance lab.

Sources and reading list#

Each link below was opened on the day this page was written (2026-11-17).

Start here#

SourceWhy read it
Building effective agents, Anthropic, December 2024The distinction between workflows (predefined code paths) and agents (a model directs its own process), and the common workflow patterns. The page now notes that much of its tooling landscape has changed
A practical guide to building agents, OpenAIWhen a single agent with tools is enough, and two multi-agent arrangements: a manager and decentralized peers
How we built our multi-agent research system, Anthropic, June 2025What several agents cost and buy in one production system
Don't Build Multi-Agents, Cognition, June 2025The argument for sharing context and traces, and why conflicting decisions between agents fail

Foundations#

SourceWhy read it
Sagas, Garcia-Molina and Salem, 1987The origin of compensation for long-lived work. Depth for durable workflows
Trace Context, W3C Recommendation, 2021How trace and span ids cross process boundaries. Depth for tracing
ReWOO, Xu and others, 2023Separating planning from tool observations: one form of planner and executor. Depth for topologies
Spring Batch: controlling step flowThe familiar pre-AI version of sequence and branch in a batch job

Framework documentation#

These are the entry pages of each framework's own documentation. What each one runs for you is described on Frameworks, and only there.

Sister sites#

This site is one of a series. Each site takes one question, and none repeats a chapter of another. At a boundary, a page says in one sentence what the neighboring concept is not, and links the site that owns it.

SiteThe question it answers
Prompt EngineeringHow instructions are written, composed, ranked, versioned and defended
Context EngineeringWhat the model can see now: selection, retrieval, budget, compaction
Memory EngineeringDurable information and saved execution state, and the difference
Agent CommunicationMessages between agents, the A2A protocol, and A2A versus MCP
Observability EngineeringEvidence of what happened: logs, metrics, traces, audit events, replay
Guardrails EngineeringEnforceable checks around a probabilistic agent
Tools EngineeringCallable capabilities: schema, execution, MCP tools
Structured Output EngineeringTyped contracts: shape, validation, repair, evolution
Agent Orchestration Engineering, this siteWho decides what runs next, under which condition
Agent Reliability EngineeringAcceptable outcomes despite failures, retries, load and changing dependencies
Harness EngineeringThe runtime around one model call: the agent harness
Eval EngineeringMeasurement: graders, golden sets, judges, trials and release gates
Diff to DeployShipping a change with coding agents: hooks, review, lanes, CI

This site touches five neighbors most: messages between agents (Agent Communication), saved state (Memory Engineering), operational guarantees (Agent Reliability Engineering), evidence of what happened (Observability Engineering), and the loop inside one agent (Harness Engineering).

Who wrote it#

Sam Muthu, an engineer and architect who builds agent systems and holds Anthropic's Claude Certified Architect credentials (Foundations and Professional). More of his work is at sammuthu.com.

The site is a working version. If a claim is wrong or out of date, the fix is to read the source again and correct the sentence. Every term the pages use is collected in the Glossary.