chapter 01 · the frame

Loops, harnesses, factories

Strip away the product names and the whole stack is three concepts, each wrapped around the one below it.

A loop is one agent doing a single job on repeat: gather context, take an action, check the result, go again until some condition is met. It is the smallest unit of agentic work; everything above it is loops stacked on loops. The craft at this level is called loop engineering, and it marks a real change of habit: you stop prompting the agent turn by turn and instead design the small system that prompts it for you.

A harness is the built environment around a loop: the sandbox where it executes, the tools it is allowed to call, whatever memory persists from one run to the next, and the gates that say when work counts as done. Behavior lives in the loop; everything that disciplines the behavior lives in the harness, and a model without one will spin indefinitely without noticing. Thoughtworks’ Birgitta Böckeler, who named the discipline of harness engineering in April 2026, compresses it to a formula she credits to LangChain’s anatomy of an agent harness: agent = model + harness. Her taxonomy splits the walls into feedforward guides (context files, skills, reference docs that steer the agent before it acts) and feedback sensors (linters, tests, review agents that observe what it did and let it self-correct).

A factory is many harnessed loops running at once, fed by a queue of work and drained through a review gate into production, with humans owning the whole thing from above. The important negative: a factory is not one bigger agent. The better mental model is organizational: many small workers with narrow jobs, defined reporting lines, and human management sitting above the wiring.

THE FACTORY many harnessed loops · a queue in · a review gate out THE HARNESS sandbox · tools · memory · gates THE LOOP context → act → check → again THE FACTORY many harnessed loops · a queue in · a review gate out THE HARNESS sandbox · tools · memory · gates THE LOOP context → act → check → again
fig. 1.1 · the three layers

§ 1.1The unit of work moves up

The paradigm shift underneath all three layers is the move from writing code to building and running the thing that writes it. Your attention relocates to the loop, the harness, and the flow between them, and away from the individual diff. That sentence sounds like slide-ware until the first time a harness you built catches a mistake you did not: then it becomes a job description.

Most working “agents” in production are less exotic than the demos suggest. They are mostly deterministic code (explicit steps, explicit conditional edges) with model calls sprinkled in at the points where judgment or language is genuinely needed. The rediscovered discipline is owning your control flow: an agent walking a predefined graph trades some freedom for mandatory checks and legible failure points, so when a run dies you can point at the node that killed it.

§ 1.2Why the layering matters

The layers are worth keeping straight because each one fails differently. A bad loop wastes a run. A bad harness wastes every run, quietly, until someone inspects the walls. A bad factory ships the failures. The chapters that follow are about the third case: what happens at the factory level when the review gate — the one component that does not scale like the rest — is left open, throttled, or removed.