Inside the Loop: How an AI Harness Actually Runs a Task
In part one of this series, we made the case that an AI agent is really two things: a language model (the engine) and a harness (the car built around it). This post opens the hood. What actually happens, step by step, when an agent takes on a real piece of work?
The answer matters even if you never build one. Once you can picture the loop, vendor demos stop being magic shows. You'll know exactly which part does what, which questions to ask, and where the weak points hide.
The Loop: Propose, Execute, Observe, Repeat
Here's the surprise at the center of every agent: the model never touches anything. It can't. As we covered in part one, a model only turns text into text. So the harness runs a cycle that looks like this:
- The harness briefs the model. It assembles a package of text: the standing instructions, the task ("process this invoice"), and any relevant material, like the text extracted from the invoice PDF.
- The model proposes an action. It replies with something like: "Look up vendor 'Belmont Supply Co' in the accounting system to check whether this invoice number already exists."
- The harness executes it. The harness, using its own vetted connection, performs that lookup. The model waits.
- The harness reports back. The result ("found a matching invoice number, paid on June 3") gets added to the briefing package, and the model proposes the next action based on what it just learned.
Steps 2 through 4 repeat, sometimes a handful of times, sometimes dozens, until the model concludes the job is done or the harness stops it. That's an agent: a model proposing, a harness executing and observing, around and around.
Notice who holds the power. The model suggests. The harness decides what's executable at all, performs it, and controls what the model gets to see next.
Tools: Hands With Rules Attached
Each action the harness can execute is called a tool: read a document, search an inbox, create a calendar hold, draft a ledger entry. A tool sounds simple, and the concept is. The engineering care lives in the rules attached to each one.
Good harness builders spend a striking share of their effort here. When Anthropic built its own harness for a software benchmark, the team reported "error-proofing" its tools, like requiring exact full file paths after discovering the model could get confused by shortcuts, and rejecting any file edit unless the text to be replaced matched exactly one location. Tiny rules like that are the difference between an agent that quietly edits the wrong record and one that stops and asks.
The same post notes that agent performance "can vary significantly based on this scaffolding, even when using the same underlying AI model." Tool design is a big reason why.
In your next demo, ask the vendor to name the exact tools their agent has. "It integrates with your systems" is marketing. "It has five tools: read inbox, extract document data, match against open POs, draft a bill in QuickBooks, and flag exceptions for review" is engineering. Vendors with real harnesses can produce that list instantly.
Context: The Model Only Knows What the Briefing Contains
Every trip around the loop, the model sees exactly one thing: the briefing package the harness assembled. That package is called context, and it has a hard size limit. The harness must constantly choose what makes the cut: which instructions, which document excerpts, which results from earlier steps, which facts about your business.
This explains two things owners notice about AI products:
- Why agents "forget." If a detail from step 3 didn't get carried into the briefing for step 14, the model has never seen it. Memory in an agent is a harness feature, built from notes the harness saves and re-supplies, never something the model does on its own.
- Why answers are only as good as the data pipeline. If the harness can't pull your vendor list or your booking history into context, the model reasons without them, no matter how capable it is. Garbage in isn't even the risk here. Nothing in is.
steps a single agent task can take before completion, with each step re-briefed from scratch by the harness (Anthropic engineering report, 2025)
Guardrails: Where the Loop Stops for a Human
The last part of the harness is the one we consider most important for small businesses: the checkpoints where the loop pauses and a person decides.
A well-built harness classifies actions by consequence. Reading a document? The loop proceeds. Sending an email to your customer, paying an invoice, changing a price? The loop stops, the proposed action lands in a queue, and a human approves or rejects it. We've written before about why approval queues are the most underrated feature in business AI, and this is where they live: in the harness, at the exits of the loop, exactly where mistakes would otherwise leave the building.
Guardrails also cover failure. When a tool errors out or a document doesn't parse, the harness decides whether to retry, work around, or escalate to a person. Products that skip this design work don't fail loudly. They fail silently, which is far more expensive.
Next Steps
You now know more about how agents work than most people selling them. Put it to use:
- Walk one of your own workflows through the loop. Take invoice handling or appointment scheduling and ask: what would the briefing contain, what tools would each step need, and which steps should require an approval?
- Use the loop to grade demos. Ask where the loop stops for a human, what the agent does when a step fails, and how information from early steps survives to later ones. Weak harnesses show themselves within these three questions.
- Read part three of this series. Next we look at the evidence that harness quality, more than model choice, determines whether agents pay off, and turn it into a buyer's checklist.
Before you evaluate any agent's loop, it helps to know which of your own workflows leak the most money. Our free AI Readiness Assessment takes 4 minutes and shows you where automation would pay off first, with dollar amounts and a prioritized plan.
Written by
Michael Sweeting
Is your business leaking revenue?
Take our free 4-minute assessment to find out exactly how much you're losing to manual processes, and get a personalized action plan to fix it.
Start Your Free Assessment