Agent = model + harness
What a harness is, what goes in it, and why most of the engineering in an agent sits outside the model.
The equation
A model on its own takes text in and gives text out. It cannot read your files, run a command, remember yesterday or stop itself from doing something destructive. An agent is what you get when you wrap a model in everything that fixes those gaps. The shorthand popularised by LangChain’s Vivek Trivedy is Agent = Model + Harness: if you are not the model, you are the harness1.
Diagram: my own, based on the components listed in 1.
What is in a harness
Concretely, Trivedy lists system prompts; tools, skills and MCP servers with their descriptions; bundled infrastructure such as a filesystem, sandbox and browser; and orchestration logic such as subagent spawning, handoffs and model routing1. O’Reilly’s summary is similar: the prompts, tools, context policies, hooks, sandboxes, subagents, feedback loops and recovery paths wrapped around the model so it can finish something2.
The later notes in this section take these apart one by one:
| Harness part | Note |
|---|---|
| The loop that drives everything | The execution loop |
| What the model can call | Tool design, MCP |
| Talking to other agents | A2A |
| Saving progress | State and checkpoints |
| Rules that run regardless of the model | Hooks |
| Splitting work | Subagents |
Why the filesystem comes first
Models can only act directly on what fits in their context. A filesystem gives the agent somewhere to read data and code, a place to park intermediate work instead of holding it in the window, and a shared surface that several agents and people can coordinate through; adding git on top gives versioning, so work can be tracked and rolled back12. That is why almost every capable coding agent starts with file and shell tools, and why so much “memory” in practice is just files.
Where it sits among the “engineerings”
It helps to separate three levels of work, each wider than the last3:
Diagram: my own, following the layered view in 3.
- Prompt engineering is the words you send.
- Context engineering is everything that goes into the window, covered in Prompting and context engineering.
- Harness engineering is what the agent can do and touch, and the loop that runs it.
Why it matters
The practical lesson is that a lot of agent quality is decided outside the weights. One write-up notes that a very small Python agent can score within a few points of far larger systems on SWE-bench Verified4, which, if it holds, suggests a lot of the difference is in the harness rather than the model. Treat that as an indication, not a settled result. Either way it changes where you spend effort: the same model can behave very differently depending on its tools, its loop and its guardrails. If a failure keeps recurring, ask whether a harness change (a better tool, a hook, a checkpoint) would fix it for good, instead of rewording a prompt.
Harness choices also couple to the model. Models are often trained or tuned around particular tool shapes, so a harness that fits one model well may fit another less well. Revisit your harness when you change models.
Sources
- [1]The Anatomy of an Agent Harness — Vivek Trivedy · LangChain · 2026PARAPHRASED
- [2]Agent harness engineering — O'Reilly RadarPARAPHRASED
- [3]Agent harness engineering — DataCampPARAPHRASED
- [4]The Anatomy of an Agent Harness — Tian Pan · tianpan.co · 2026PARAPHRASED
- [5]Building effective agents — Erik Schluntz and Barry Zhang · Anthropic · 2024FURTHER READING