Earlier guides showed how to run a model. But a model on its own can only read text and write text back — it has no memory between calls, cannot use tools, and stops after one reply. To make it do things, you wrap it in software called a harness (also called scaffolding). This guide explains what a harness is and why it matters.

Agent = model + harness

A widely used shorthand captures the whole idea: an agent is a model plus a harness. 1 The model supplies the reasoning; the harness supplies everything the model cannot do by itself — the loop, tools, memory, context management, and guardrails that turn raw text prediction into goal-directed action. 4

Figure 1 — The model reasons; the harness lets it act. Together they form an agent.

Figure 1 — The model reasons; the harness lets it act. Together they form an agent.

The core loop: reason, act, observe

At the heart of every agent is a repeating cycle. The model reasons about what to do next; the harness acts by carrying out that decision (running a tool, executing code, calling an API); and the result is fed back so the model can observe and decide again. 2 The loop continues until the task is finished.

Figure 2 — The reason–act–observe loop is what lets an agent complete multi-step tasks.

Figure 2 — The reason–act–observe loop is what lets an agent complete multi-step tasks.

What a harness provides

Because a language model is stateless and only emits text, the harness fills every practical gap around it:

  • The loop. Runs the model repeatedly instead of stopping after one answer, with a turn limit to prevent runaway behaviour.
  • Tool dispatch. The model requests a tool; the harness actually executes it and returns the result — the model can only express intent, not act. 5
  • Memory. Stores information across steps and sessions so the agent has continuity a bare model lacks.
  • Context management. Decides what to put in the model's limited context window each turn, and compacts it as work grows.
  • Guardrails and a sandbox. Constrain what the agent is allowed to do and isolate risky actions — the subject of a later guide.

Inner vs. outer harness

It helps to distinguish two layers. An inner harness ships with a product — for example a coding agent like Claude Code or Codex, which its own documentation calls “the agentic harness around” the model. An outer harness is what you assemble on top: instruction files, MCP servers, and custom skills that tailor the agent to your work. 1 The next guides in this series build exactly that outer layer.

Why the harness matters more than you'd think

The model weights stay fixed, yet much of the real-world improvement in agent performance over the last few years has come from better harnesses, not bigger models — sometimes a larger jump than swapping in a stronger model. 3 Two agents built on the same model can behave very differently depending on how their harness handles tools, memory, and failure. 5 In short, reliability is won in the harness.

Key takeaways

  • A harness (scaffolding) is the software around a model that turns it into an agent: agent = model + harness. 1
  • It runs a reason–act–observe loop and supplies tools, memory, context management, and guardrails. 2
  • An inner harness ships with a product; an outer harness is what you add — instruction files, MCP servers, skills.
  • Much of an agent's capability and reliability comes from the harness, not the model alone. 3