A harness is the whole "operating system" wrapped around a large language model: it keeps the model working in a loop, calling tools, remembering progress, and staying within limits.
You ask an AI to "put this week's invoices into a spreadsheet." The difference isn't how smart the model is. It's whether there's something around it to pick up where it leaves off.
It can't see your folders or open a spreadsheet. All it can do is write you some text; the rest is up to you.
The system around it opens the files, reads them, and writes the spreadsheet for it. After each step it hands the result back, and the model decides what to do next.
However strong a horse is, without reins, a harness, and a cart, it can't haul goods or know where to go. Tack doesn't make the horse any stronger; it turns that strength into something useful.
In English it's usually just called an "agent harness"; you'll also see it described as an agent wrapper or agent scaffolding.
The model sits in the middle, and each time it only "thinks of the next step." Everything else is done by these four parts around it.
The model says "I want to read this file," the loop reads it, passes the contents back, and asks "what's next?" It keeps going until the task is done or someone stops it.
On its own, the model can only output text. What actually touches files, the terminal, or the browser are the tools the harness provides.
There's a limit to how much the model can see at once. On long tasks, the harness has to compress old records and hold on to what matters, so the model doesn't "lose its memory."
Should it ask a person before deleting files, making payments, or sending emails? Which folders can it touch? These rules are written into the harness, not left to the model's good behavior.
Click "Next step." Notice: each time, the model only says what it wants to do. The actual doing, recording, and blocking is all the harness.
Many of the AI products you've used are, at heart, "some model + some harness." The model can be the same and the experience still very different; the difference is in the layer around it.
Anthropic's harness for coding tasks: it can read and write code and run commands, and asks you before risky operations.
OpenAI's coding agent, likewise a model wrapped in a layer of loop, tools, and sandbox.
They plug the model into an editor; the harness decides how much code it can see and which files it can change.
A real example: in April 2026, Anthropic published a postmortem. Users had reported that Claude Code got worse, and the investigation traced it to several changes in the harness and product layer, not to the model itself. Once those were reverted, performance came back. Read the original →
| Easily confused term | What it is | Relation to the harness |
|---|---|---|
| Model | The "brain" that thinks and writes | Sits in the middle of the harness |
| AI Agent | An AI that works toward a goal on its own | Agent = Model + Harness |
| Tools / MCP | The hands that let AI reach the outside world | One component of the harness |
| Skill | An instruction manual written for the AI | Loaded into context by the harness when needed |
Agent Harness: the software scaffolding around a large language model, including the execution loop, tool calling, context management, and guardrails, that turns the model from "answering questions" into "completing tasks on its own."
The definition above is a synthesis of these two articles: one focuses on the loop and context, the other on instructions and guardrails, and they don't fully agree on whether tools count as part of the harness. The industry generally uses the broader sense: everything outside the model that lets it do work.
The model is the brain;
the harness is the body and the rules that let the brain get work done.