CHAPTER 01 · What Is an Agent Harness? · 3 / 6
How it works: two mental maps
Different sources slice the harness in different ways. Two slicings are worth keeping in your head as a map for the rest of the guide.
Map A: the six layers (from the Claude Code architecture breakdown)
This view puts a simple loop in the middle and wraps six concentric layers around it.
| Layer | What it does | Where in this guide |
|---|---|---|
| 1. Input | Session boundary, trust, what the agent is allowed to do | Ch 7 |
| 2. Knowledge | Persistent instructions and context that survive long sessions | Ch 9 |
| 3. Execution | Dispatching tools and running the loop | Ch 2, 6 |
| 4. Integration | External systems and packaged extensions (MCP, plugins) | Ch 10 |
| 5. Multi-agent | Delegated work that does not blow up the main context | Ch 11 |
| 6. Observability | Deterministic control and audit points (hooks, checkpoints) | Ch 12 |
The key phrase from that breakdown is that the loop in the center is "the dumb part on purpose." The intelligence is not in some clever orchestration engine. It is in the model's reasoning plus the quality of the layers around it.
Map B: the seven pillars (from the "Agentic Harness Architecture" breakdown)
This view is more opinionated and more builder-focused. It lists seven things a production harness gets right, and for each one it separates what the platform gives you for free from what you have to architect yourself.
| Pillar | The core idea | Where in this guide |
|---|---|---|
| 1. Context engineering | Decide what enters the context window, and what stays out | Ch 3, 4, 5 |
| 2. Memory management | Knowledge that lives outside the model's weights | Ch 9 |
| 3. Skills as workflow encoding | Package a repeatable procedure the agent loads on demand | Ch 10 |
| 4. Agent contracts and orchestration | Give each subagent a clear input/output contract | Ch 11 |
| 5. Tiered execution | Answer cheaply when you can, escalate only when you must | Ch 5, 11 |
| 6. Deterministic computation | Push exact work into code, not the model's head | Ch 10 |
| 7. Portability and shareability | The whole setup lives in the repo, so a teammate can clone it | Ch 9, 16 |
The seven pillars breakdown adds one more idea that deserves a spot of its own: the anti-hallucination contract. The most important rule for any agent handling real data is that if a tool can fetch the truth, the agent must not be allowed to make the answer up. We will return to this in Chapters 10 and 13.
Do not memorize either table. The point is that "harness" is not one blob. It is a set of distinct problems (context, memory, tools, safety, delegation, observability) that you can attack one at a time. That is exactly how the rest of this guide is organized.