Technical Blog
Harness
When we talk about AI agents or multi-agent systems, we often hear the word harness. But what exactly does it mean?
An agent harness is the system surrounding an LLM that allows it to interact with tools and its environment in order to accomplish a specific objective.
These tools can include things such as read, grep, glob, web search, APIs, databases, terminals, and many others depending on the problem we are trying to solve.
We can think of an agent harness like the human body. Our hands, legs, and eyes are tools, while the brain decides how and when to use them in order to achieve a specific goal.
In this analogy, the LLM acts like the brain, while the harness provides the tools and the mechanism that allows the LLM to use them.
For example, imagine asking Claude Code to find a particular function inside a codebase. The LLM understands our request in natural language and may decide to use tools such as grep, glob, or read to locate the relevant file and inspect its contents.
A simplified flow might look like this:
User Request
↓
LLM
↓
Select a Tool
↓
Execute the Tool
↓
Observe the Result
↓
LLM
↓
Continue or Return an Answer
The important part is that the LLM does not directly search the filesystem itself. Instead, it decides which tool should be used, provides the appropriate arguments, observes the result, and then decides what to do next.
This repeated process is often referred to as an agent loop:
Reason → Act → Observe → Reason → ...
The explanation above gives us a simple view of an agent harness, but a real-world harness usually contains much more than just an LLM and a collection of tools.
It may also handle concepts such as context management, memory, tool permissions, multi-agent coordination, error handling, model routing, and context engineering techniques such as compaction and summarization.
These components are what make an LLM capable of behaving more like an autonomous agent rather than simply responding to a single prompt.