Clicked Gallery

What is an agent harness?

Highlighted from a real engineering doc. Explained by Clicked.

Used in a sentence

Engineering Notes · AI Systems

Most of the gain came from the agent harness, not from swapping in a larger model.

The reader highlighted one word in the docs. Clicked explained the technical term “agent harness” in simple terms:

Explained in three depths

Same facts, different vibe — Slang mode 😎

The Clicked way

●○○

Overview

An agent harness is the program wrapped around an AI model that turns the model's answers into actions. The model itself only produces text, so when it says to run a command or open a file, the harness is what runs it, feeds the result back, and asks the model what to do next. It also picks which earlier results are worth showing the model again, retries the steps that fail, and decides when the job is finished.
●○○

Overview

An agent harness is the code wrapped around a model that turns its words into things actually happening. The model can only type, so when it says run this or open that, the harness is what goes and does it, then reports back. It also handles the retries, remembers what already happened, and works out when the job is actually finished. 😎

A quick take — often all you need.

●●○

Detail

Ask a model on its own to fix a bug and all you get is text describing a fix, because reading and writing text is everything a model does. Wrap it in a harness and the same request plays out differently. The harness sends the request, sees the reply asking to open a file, opens it, sends the contents back, applies the edit it gets, runs the tests, and goes round again until they pass. Coding tools like Claude Code and Cursor work exactly this way, with the model inside doing only the reading and writing. Why not hand the model the keys and let it get on with it? Because these jobs have to come out identically every time, while a model writes its answer fresh on every call, so ordinary code does the running, the record keeping and the stopping precisely because it never improvises. This is why one model can fail a task alone and finish it inside a good harness, and why scores often jump when only the surrounding software changed. MCP gets confused with this: it is the agreed format for describing a tool, while the harness is the software doing the calling.
●●○

Detail

A model has no hands. You ask it to fix your broken website and it types out a lovely plan, and that is where it ends, because typing is the entire skillset. The harness is the code standing next to it that reads the plan, opens the file, pastes the change, runs the site, sees it crash, hands the error back and says try again. That last part is the whole trick, since one round of guessing is useless and twenty rounds with feedback is a tool that works. Why not hand it the keys and walk off? Because a model writes everything fresh each time, so ask twice and you can get two different answers, which is fine for ideas and useless for pressing buttons, whereas plain code does the identical thing every single run. Swap in a fancier model with a sloppy harness and you get a smart thing flailing, which is why teams keep upgrading models and wondering why nothing improves. Also not MCP, which is just the plug shape for tools while the harness is the thing plugging them in. 😎

Want more? One click digs deeper.

●●●

Analogy

A brilliant expert is on a phone line and cannot see the room. You describe the situation, they tell you which drawer to open, you open it and read out what is inside, they tell you what to change, and around it goes until the job is done. The expert supplies the thinking and nothing else, while you supply the hands, the eyes, the decision about what is worth reading out and the judgement about when to stop. In that setup the model is the voice on the phone, and the harness is you.
●●●

Analogy

A blindfolded chess grandmaster plays through a helper who knows nothing about chess. Neither can win alone here, because the grandmaster cannot touch the board and the helper cannot pick a move, so one supplies the thinking and the other supplies the hands. The grandmaster calls a move, the helper plays it and describes what the opponent did back, and round it goes. Swap in a helper who grabs the wrong piece and forgets to describe the board, and the genius loses to a beginner. 😎

Unfamiliar concept? A real-world example makes it click — fresh analogies on tap.

AI explanations may contain errors · Not professional advice

Formal definition — The same term, explained the usual way

An agent harness is the software layer surrounding a language model that converts its outputs into executed actions, comprising the orchestration loop, tool invocation, context and memory management, error handling, guardrails, and termination criteria. The model supplies reasoning over text; the harness supplies execution, state, and control, and together they constitute what is described as an agent.

Want Clicked to explain terms like “agent harness” directly in your browser — including on PDFs?

Add to Chrome — Free

50 free Explanations · No credit card required