When an AI agent fails in production, the instinct is often to blame the model — it should have "known better," reasoned more carefully, been smarter. In practice, most of the failures that show up once an agent leaves the demo stage aren't model problems at all. They're harness problems. The model decides what to do next; the harness decides what's allowed to happen, what gets remembered, and what happens when something goes wrong. A capable model wrapped in a thin harness will still loop, hallucinate tool results, and drift off task — because nothing outside it is keeping score.

What a Harness Actually Is

The "harness" is everything surrounding the model that turns a single inference call into a working agent: the code that executes tool calls, tracks conversation state, enforces limits, and decides when a task is finished or has gone wrong. The model proposes an action; the harness is what actually runs it, validates it, and feeds the result back.

This distinction matters because it reframes where the real engineering work is. Prompting shapes what the model wants to do. The harness determines what it's actually able to do, and what happens when its first choice doesn't work.

The Core Responsibilities of a Harness