heyjonny

What is an agent harness?

2025 was the year of the agents. I did a little Google Trends search to provide some proof to that. As you can see since Gartner labeled agentic AI as the number one trend, the chart mostly knows one direction. And when OpenClaw went viral in early 2026, it might have sparked the interest of a lot of non-technical people too.

A line chart showing the rise of the search term agentic AI

However, what is an agent actually? A definition that I came across very often says agent = model + harness.1 That’s a nice little trick. We know what the model is, it’s basically the brain of the agent, but leaves us with the next question: what is a harness?

The harness

You could as well define a human as being made out of a brain and a body. The brain is what gives us the ability to think and make decisions. The body is what provides information about and allows us to interact with our environment. For example, our eyes allow us to see, ears to hear, nose to smell, and our skin to feel. All these sensors provide information to our brain.

So what if, all of a sudden, a chest spawned in front of you? Your eyes send that info to your brain, which recognizes it as a chest and infers it might contain something interesting. So it decides to open the chest and sends signals to your arms and legs.

The harness is pretty much all that.2 It provides context (information) as well as tools (abilities) to the model. The model can then decide whether it wants to use one of the available tools (e.g., move to the chest, open the chest) or return text (maybe the chest looks dangerous).

However, this is also just an analogy and has its limitations. The harness itself can not only be viewed as something extending the model, but also something that limits it. Maybe the model decides to recursively delete all files on your computer. You’d be very happy if something in the harness prevented that.

So now we know what the model is and the harness, but what does the ”+” in that equation actually mean?

The agent loop

The model and the harness are connected by something called the agent loop. And it’s pretty much just that: a loop. When you start up an agent with a prompt, it sends a request to the model. This request contains not only the prompt itself, but also the tools available for the model to use. The model can then decide to either call a tool or reply to the prompt.

A flowchart of the agent loop: the harness checks whether the model's response contains a tool call, executes it if so, and otherwise replies to the user.

If it wants to call a tool, it sends that reply to the harness. The harness then calls the tool and feeds the result back to the model. This continues until the model decides to not use a tool anymore. The harness then forwards this response to the user and waits for another input.

Conclusion

So that’s the answer: an agent is a model and a harness, connected by a loop. The model does the thinking. Everything else is the harness: feeding the model context, handing it tools, running the loop, and stopping it from deleting your files. So the next time an agent impresses you, remember that you’re not just looking at a smart model. You’re looking at a model in a well-built harness.

Footnotes

  1. The equation is most closely associated with LangChain’s framing “if you’re not the model, you’re the harness” in The Anatomy of an Agent Harness.

  2. The word is borrowed from software testing, where a test harness is the scaffolding that feeds inputs to code and captures its outputs.