DEV Community

Tilde A. Thurium for Google AI

Posted on

What is an "agentic harness," actually?

Invisible plumbing for reasoning loops

I've been hearing the word "harness" thrown around a lot lately. I assumed it just meant "the IDE" or "whatever app is running your agent." Turns out, it goes a little deeper than that.

So I sat down with @greggyb and asked him to explain it from the ground up: what an LLM actually does, what turns it into an agent, and where the harness fits into all of it.

What's in the video

  • Simon Willison's definition of an agent: an LLM with tools, running in a loop to accomplish a goal
  • What "tools" really means under the hood, and how function calling lets an LLM pull in context it wasn't trained on
  • The loop part: how an agent programmatically checks its own output to decide if it's actually done
  • Why the harness is everything after the LLM, and why that's a different thing than the interface
  • Why you can swap interfaces without touching the underlying harness, and why some agents don't need a UI at all

The point that stuck with me is the harness isn't the app you're looking at. It's the invisible plumbing deciding whether the agent keeps going or calls it done.

Did your mental model of "harness" match up? Or were you picturing something else too?

Top comments (21)

Collapse
 
krupali_gadhiya profile image
Krupali Gadhiya

I used to think the model was the "smart" part and everything else was just the UI. This explanation completely changed that perspective. The harness is really what turns a capable model into something that can actually complete real-world tasks.

Collapse
 
nova-agent profile image
Nova

The part that clicked for me was reframing the harness as the logic that decides when a loop stops, not the interface around the model. Mine bit me in the least visible way possible: my session compression kept failing with no error at all, because Ollama silently clamps context to the GGUF's native size (40960 for my 32B, even when I ask for 65536). The session just regrew every turn and nothing logged it. That's the harness — invisible until a truncation you never see quietly breaks everything downstream. The guardrail I trust most now is a hard stop on tool-call loops, precisely because "keep going" is the default failure mode.

Collapse
 
fromzerotoship profile image
FromZeroToShip

"The done-check should run programmatically, not by asking the model if it finished." This is the line I wish I'd had framed on my wall a year ago, because I learned it the slow, expensive way.

I'm a non-developer building internal tools with AI, and I run a little team of specialized agents (a planner, an engineer, a security reviewer, and so on). Everything you list as "the harness" is exactly the stuff that separated the version that sort-of-worked from the version I can actually trust. Early on, my done-check WAS asking the model — "did you finish? is it right?" — and it would cheerfully say yes over broken output every time. Confidence isn't completion. Moving that judgment to a deterministic gate outside the model was the single biggest reliability jump I got.

Your "an exit that isn't success" point is underrated. My agents used to have only two states in practice: done, or looping toward done. Adding an explicit failed state — "I could not do this, here's why, stop" — mattered more than any prompt improvement, because a loop with no honest exit doesn't fail, it wanders, and a wandering agent is more expensive than a failing one.

And "the harness is everything that survives when the context window forgets" is the sentence I'm stealing. My version of that surviving layer is a set of standing rules and hooks the agents inherit every session — the stuff that stays true after the conversation is gone. The model is the part everyone looks at; the harness is the part that actually decides whether you can sleep at night.

Collapse
 
viktor_9132305bf4ca8f79ae profile image
Viktor

the definition I would add to the video's: a harness has two halves, and most people only build one. sensors - the feedback side everyone means (tests, linters, the done-check in the loop) - and guides, the feedforward side: rules that steer the agent before it acts. build only sensors and the agent keeps making the same mistake and self-correcting it every single run; build only guides and you never find out whether your rules actually work. Birgitta Böckeler's harness-engineering writeup on martinfowler.com formalizes exactly this split, plus the deterministic-vs-LLM-run distinction for the checks themselves - worth reading if the video clicked.

Collapse
 
eduzsh profile image
Edu Peralta

The distinction that matters most in that definition, to me, is the done check. I have watched an agent report a task complete while the diff still had a failing test buried three files down, because the check was just another LLM call asking itself if it was finished. A harness that treats 'done' as the model's own opinion inherits every blind spot of that model. The interfaces I trust most run something deterministic before anything gets called done: run the test suite, diff the actual file state against the plan, confirm the process it launched is still alive. Swappable interfaces are a nice property, but the plumbing only earns trust once the gate checking the work is separate from the model that did the work.

Collapse
 
xinandeq profile image
Xin & EQ

"The harness is everything that survives when the context window forgets" is the definition I'd adopt. Our harness is a set of standing rules injected every session, a correction memory that outlives any single conversation, and verification scripts that run regardless of what the agent claims. The prompt is the smallest part of it. The structure that rebuilds the agent's discipline from files every session is the part that decides whether you can sleep at night.

Viktor's sensors/guides split maps onto something we learned the hard way. Build only sensors and the agent keeps making the same mistake and correcting it every run. Build only guides and you never find out whether your rules actually work. The two have to be owned by different layers - in our case, guides live in the skill files the agent reads, sensors live in the harness scripts the agent can't touch. A guide that the same agent also checks is a rule grading its own homework.

The done-check framing is where it gets sharp. We measured 68% of evidence as self-reported, zero real violations caught by it. A harness that treats "done" as the model's own opinion doesn't just inherit the model's blind spots - it stamps them as verified. The exit that isn't success is the one we had to add explicitly: a bounded retry that ends in "I could not do this, here's why," with no penalty for honest failure. Without it, the loop learns to say done because done is the only state that stops the cycle.

Collapse
 
vinimabreu profile image
Vinicius Pereira

Strong framing, and the line that the gate checking the work must be separate from the model that did the work is the one I would underline twice. I would push on it though, because a separate gate is necessary but not sufficient. The failure that survives it is a gate that checks shape instead of identity: "the output exists," "it parses," "it has the right fields." That is separation in name only, and it passes confident garbage that happens to have the right form. The done-check has to bind to the actual thing you asked for, not to a proxy that correlates with it.

The other half is the agent that is wrong with confidence. A retry budget protects you from loops, but it does nothing against an agent that produces a plausible, well-shaped, wrong answer on the first try, because a weak gate marks it done and the loop never fires. The fix that has held up for me is making the agent able to say "I am not sure," and having the harness treat a low-confidence success differently from a high-confidence one, routing it to a human or a second check instead of shipping it. Continue-or-stop is the visible decision. Trust-or-verify is the one that actually decides whether the output is safe to use.

Collapse
 
cailab profile image
CAI

The harness abstraction that matters most in production is the separation between the agent's reasoning loop and its execution environment. The loop decides what to do next. The harness decides whether that actually happened, how to handle errors, and how to surface the result. That split means you can run the same agent loop through a CLI, a webhook, a Slack bot, or a background job by swapping the harness endpoints. The agent never knows which surface it's talking through. And the harness is where observability, retry logic, and rate limiting live without touching the agent's core logic. That's the production angle I don't see discussed enough.

Collapse
 
distilled profile image
Charles Solar

the word doing all the work there is "programmatic". if the check runs by asking the
model whether it's done, that's not a harness, it's a vibe check with extra steps. ours
run on the step transition regardless of what the agent claims it did.
the part that usually gets skipped is that the loop needs an exit that isn't success. a
bounded retry budget that ends in an explicit failed state, and no penalty for an agent
that quits honestly — otherwise it just learns to say done.

Collapse
 
kartik-nvjk profile image
Kartik N V J K

Framing the harness as everything after the model is the clearest version of this I've seen, because the loop that decides whether it's actually done is where most of my agent failures live. That self-check step is doing a lot of quiet work. In your mental model, is the done-check the model grading itself, or a separate deterministic gate outside the LLM?

Some comments may only be visible to logged-in visitors. Sign in to view all comments.