You’ve probably used ChatGPT or Claude to answer a question. But when people talk about AI agents that fix bugs, run code or finish whole tasks for you, there is something more going on behind the scenes.
That “something more” is called the harness.
The simple formula
Agent = Model + Harness
- Model: the brain. It reads, thinks and decides what to do next.
- Harness: the body and the workspace. It gives the brain hands, tools, memory and rules.
- Agent: the two together. A worker that can think and act.
A model on its own can only talk. It can’t run code, open files, call an API or remember yesterday’s work. The harness is what makes that possible.
How an agent works: think, do, check, repeat
Most agents run in a simple loop:
- Think. The model looks at the task and decides the next step.
- Do. The harness performs that step, like running code or searching something.
- Check. The harness gives the result back to the model.
- Repeat until the job is done.
Example: a coding agent fixing a bug. The model suggests a fix. The harness runs the tests. If they fail, the model sees the error and tries again. The model solves the problem; the harness handles everything else.
What’s inside a good harness
You can think of a harness as a toolkit with eight parts:
- System prompt. Standing instructions: who the agent is, what it should do and which rules it must follow.
- Tools. Things the agent can use: search, databases, email, APIs. More and more, the main tool is simply “write and run code.”
- Sandbox. A safe, isolated space to run code, so mistakes don’t break real systems.
- Filesystem. A place to save files, notes and progress so work isn’t lost.
- Memory. Models forget everything outside the current chat. The harness decides what to keep, what to summarize and what to bring back later.
- Self-checking. After each step, run tests or review the output. This is how agents catch their own mistakes.
- Guardrails. Rules like “ask a human before deleting files, sending emails or spending money.”
- Observability. Logs that show what the agent did and why, so you can debug it and audit it.
Why the harness matters so much
Here’s the surprising part: the same model can do much better or much worse depending on its harness.
Top AI models are getting closer to each other in raw ability. So the real difference now comes from how well they are set up: good memory, the right tools, solid checks.
A good harness around an average model can beat a bad harness around a great model.
Databricks shared one example. With a harness built for complex document tasks, their new setup scored 52.6%, up from 36.1% before, which cut errors nearly in half.
Prompt → Context → Harness
The way we work with AI keeps growing outward:
| Stage | Focus |
|---|---|
| Prompt engineering | Writing better questions |
| Context engineering | Choosing what information the model sees |
| Harness engineering | Designing the whole system around the model |
Prompts and context still matter. They are now just parts of the harness.
Where things usually go wrong
Most agent failures come from the harness, not the model:
- Too much history. Long conversations make the model lose focus.
- Too many tools. The model gets confused about which one to pick.
- Fragile tool setup. A small change in how a tool is described breaks things quietly.
- Slow responses. Many steps can mean 10+ second waits.
- Wrong information. Pulling in irrelevant data leads to confident but wrong answers.
- No checking. The agent says “done” when it isn’t.
- No guardrails. The agent does something it can’t undo.
For companies: avoid “agent sprawl”
Big companies don’t build one agent. They build dozens. If every team builds its own harness, nobody can track, secure or improve them all. That mess is called agent sprawl.
The fix is a shared harness layer: one common place for permissions, monitoring and testing that works with any model.
Will better models make harnesses useless?
Not likely. Models will get better at planning and fixing their own mistakes, so some work will move into the model. But they will still need safe workspaces, tools, rules and logs.
Two ideas to watch:
- Disposable harnesses: small, quick setups built for one task and then thrown away.
- Plain-English harnesses: describing how an agent should behave in normal language instead of code.
The takeaway
The model is the intelligence. The harness turns that intelligence into real work.
Strong harnesses make average models useful. Weak harnesses waste great ones. If you are building with AI agents, the harness is where much of the real engineering, and the real value, now lives.
