
Agent Harness
An agent harness is the program scaffolding built around an AI language model that turns its responses into actual work steps: reading files, executing commands, reporting back results. The model thinks, the harness acts and controls.
A language model like ChatGPT can do only one thing: generate text. It cannot open a file on its own, cannot fetch a web page, and cannot launch a program. To make it capable of doing so anyway, a program is written around it. This program takes the generated text, recognizes instructions within it, and carries them out. It then sends the result back to the model so it can continue working. This exact scaffolding is called an agent harness. The English word “harness” means a set of straps or gear, i.e., something that channels a force and converts it into usable work.
Why the scaffolding determines success or failure
For a long time, the rule was: if you want better results, you need a bigger model. That’s only half true. In practice, two companies using the same model solve very different numbers of tasks. The difference lies in the harness. It determines what information the model even gets to see and which tools it is allowed to use.
An example from software development: in a well-known benchmark, AI systems have to fix real bugs in real programs. The same models achieved very different success rates there depending on the scaffolding. What was improved was not the model, but the way it was allowed to search through files and test its solution. Such jumps are more than mere cosmetics.
Safety is also important. A harness must not let a model blindly do everything. It determines whether a file may be deleted or whether a human must approve first. Without these boundaries, an acting AI agent within a corporate network would hardly be responsible to deploy.
The loop of thinking, acting, and observing
At its core, a harness runs as a loop. First, the model receives the task and a list of permitted tools. The model responds with a proposal, for example: “Search this folder for the word Login.” The harness recognizes this call, actually performs the search, and appends the result to the conversation history. Then the round starts over until the task is completed or a limit is reached.
Typical tools include file access, a command line, a web search, and a test run for written code. The harness describes each tool in words so the model knows when it fits. It also validates the inputs and catches error messages. If a command crashes, the model gets to read the error message and can try a different approach.
A second core point is memory management. A model can only process a limited amount of text per request. In long tasks, the history would quickly exceed this limit. That’s why the harness truncates older steps, summarizes them, or stores intermediate results in files. Harness and model are often confused: the model only delivers text, while all rules, boundaries, and repetitions come from the scaffolding.
From coding assistants to benchmark headlines
Harnesses are best known in programming tools. Products like Claude Code, Codex, Cursor, or GitHub Copilot essentially consist of a harness plus a rented model. When such a tool independently modifies files and runs tests, that is the scaffolding’s work. Booking and research assistants that click through a browser also work on the same principle.
In trade news, the term comes up especially around record results. When a company reports a new record on an agent benchmark, it’s worth asking about the harness. Some results are produced with scaffolding heavily tailored to the test and cannot be replicated in everyday use. Conversely, providers now often release their harnesses as open source so others can verify the numbers.
For investors, this is an economically interesting point. Models are built by a handful of large providers and have become interchangeable. The harness, on the other hand, contains the knowledge about a profession or an industry. This is precisely where many new companies are currently emerging, even without their own model.