Thursday, July 23, 2026
HomeTechnologyCease Overengineering Your Agent Harness – O’Reilly

Cease Overengineering Your Agent Harness – O’Reilly

The next initially appeared on Hugo Bowne-Anderson’s Vanishing Gradients Substack and is being republished right here with the creator’s permission.

The dialog round harness engineering is dominated by issues from coding and private brokers resembling OpenClaw, however most brokers are less complicated. Builders ought to keep away from over-engineering for capabilities that newer fashions might soak up anyway, the “Kirby impact,” and deal with sturdy fundamentals.

Statisticians typically use a intentionally crude query to point out how a abstract statistic can mislead: what number of testicles does the typical human have? The numerical reply could also be defensible, nevertheless it describes virtually no person. Harness engineering has the same downside. Ask, “What strategies do I want?” and the typical reply turns into an extended listing: context administration, reminiscence, compaction, sub-agents, hooks, and orchestration. Few techniques want all of it and the suitable harness is determined by the job.

On this essay, you’ll study:

  • What an agent harness is and the way it differs from immediate and context engineering.
  • How motion complexity and context complexity decide the harness you want.
  • Why coding and deep-research brokers require extra context administration than many help, gross sales, and enterprise brokers.
  • How instruments, state, routing, guardrails, traces, sub-agents, hooks, and human handoffs match into the structure.
  • Why harness options expire as fashions enhance, and easy methods to construct the minimal viable harness for the job.

What’s an agent?

An AI agent in widespread parlance is an AI system that may do issues: ship emails, question databases, ping APIs, make appointments, write and execute code, and so forth. AI engineers outline them barely otherwise: AI brokers are LLMs with instruments in a loop.

Take into account what occurs while you ask a coding agent to edit a file: it should first learn the file, ship the end result again to the LLM, then edit it, then maybe learn it once more, and so forth, till the LLM “decides” it’s completed and tells you.

A coding agent cycles between the LLM and its tools. Here, it reads app.py, incorporates the result, and then edits the file.
Determine 1. A coding agent cycles between the LLM and its instruments. Right here, it reads app.py, incorporates the end result, after which edits the file.

This distinction is essential as a result of commonest parlance brokers don’t have such reasoning loops and are extra aptly described as LLM workflows: take a gross sales workflow that

  1. Transcribes gross sales calls utilizing a speech-to-text mannequin;
  2. Extracts structured information from the transcript for the salesperson to confirm;
  3. Populates your CRM or database with the prospect’s info, subsequent steps, and so forth.

That is an AI workflow: basis fashions are used at every step, however for every gross sales name the workflow itself is deterministic. A name is transcribed, the related information is extracted, and the CRM is populated. When the subsequent name occurs, the workflow runs once more as a separate job; no result’s fed again to an earlier step, so there isn’t a model-directed reasoning loop (any particular person step might comprise one, nevertheless, and agentic reasoning loops inside deterministic workflows are a typical sample).

A deterministic AI workflow follows a fixed sequence: transcribe the call, extract structured data, verify it, and populate the CRM.
Determine 2. A deterministic AI workflow follows a hard and fast sequence: transcribe the decision, extract structured information, confirm it, and populate the CRM.

All trendy AI chat merchandise, resembling ChatGPT and Claude, nevertheless, are agentic: they’ve entry to Internet Search instruments and picture era instruments, for instance, and can use them when deemed needed. You work together with brokers daily.

What’s an agent harness?

If an LLM is the mind, you’ll be able to consider the agent harness because the physique. It consists of all of the instruments and infrastructure the mind depends upon at runtime to get the job performed.

In observe, the harness handles 5 core jobs:

  • Loop: Immediate the mannequin, parse its response, execute its software calls, and feed the outcomes again.
  • Device execution: Run the instructions, code, APIs, and different actions requested by the mannequin.
  • Context administration: Determine which directions, dialog historical past, recordsdata, and power outcomes enter every mannequin name.
  • State: Observe the dialog, job progress, recordsdata touched, and something that should persist throughout turns.
  • Security: Sandbox execution, require affirmation for delicate actions, and block disallowed operations.

Immediate engineering shapes a person mannequin name. Context engineering determines what the mannequin sees. Harness engineering governs the entire system round these calls.

How advanced does the harness should be?

One approach to determine how a lot harness engineering a job requires is to separate two sorts of complexity:

  • Motion complexity: What number of instruments, selections, dependencies, and handoffs should the agent coordinate?
  • Context complexity: How a lot info should the agent collect, retain, and retrieve to finish the duty?

The 2 can transfer independently. A help agent might full a dialog in a single flip whereas nonetheless routing throughout a number of instruments and security checks. A deep-research agent might obtain just one person request whereas accumulating a big physique of supply materials.

Harness requirements vary across two independent dimensions: the complexity of the actions an agent coordinates and the context it must gather, retain, and retrieve. Personal assistants can span much of this space.
Determine 3. Harness necessities range throughout two unbiased dimensions: the complexity of the actions an agent coordinates and the context it should collect, retain, and retrieve. Private assistants can span a lot of this house.

Harnesses for coding brokers?

The dialog round harness engineering has exploded just lately and far of the main focus is on context administration, reminiscence, compaction, software offloading, and more and more elaborate instruments and strategies. In the event you’re constructing a coding agent (or utilizing one!), it’s essential to learn about these. Usually, they’re essential to contemplate when constructing brokers that customers are inclined to have lengthy conversations with.

The core could be surprisingly small, although: A coding agent could be in-built 131 traces of Python, whereas a search agent utilizing the identical primary loop takes simply 61. The instruments change, however the underlying sample doesn’t. A coding agent may even learn its personal software definitions, write a brand new software, hot-reload it, and apply it to the subsequent step. Capabilities could be added with out completely baking all the things into the core harness.

A inventory coding agent can write code, nevertheless it doesn’t mechanically perceive your information, spot leakage, select the suitable validation technique, clarify uncertainty, or join a mannequin to a enterprise resolution. In observe, customers hold extending the harness round it: they add area directions to AGENTS.md, package deal recurring workflows as abilities, and add instruments, evals, and reproducibility checks. The shipped harness is simply the start line. It’s one thing builders actively work on. In a phrase, when utilizing a coding agent, you’re at all times actively concerned in shaping and constructing your harness.

So what are widespread harness patterns for coding brokers? Lance Martin (Anthropic, then at LangChain) recognized 3 fundamental context engineering patterns, that are basic for harness engineering:

  1. Cut back: Actively shrink the context handed to the mannequin
  2. Offload: Transfer info and complexity out of the immediate.
  3. Isolate: Use multi-agent architectures to delegate token-heavy sub-tasks.

Then when conversations get longer than the context window of the LLM, it is advisable to suppose via easy methods to go the mandatory context to it: compaction was once cutting-edge, then hand-off turned distinguished, and now compaction is again, as a result of capabilities of extra highly effective fashions.

Deep analysis is one other case the place context engineering issues. In a workshop with Ivan Leo, who beforehand constructed brokers at Manus and is now at Google DeepMind, we constructed a deep analysis agent from scratch. The harness retains analysis findings and job state obtainable throughout many mannequin calls. It generates a plan, provides search sub-agents separate queries and iteration budgets, runs them concurrently, then returns their findings to the principle agent for synthesis and quotation. The implementation additionally makes use of hooks, which let different elements of the system reply to occasions within the agent loop. A hook can render a software name, log its end result, or file a hint with out placing that conduct contained in the core loop. Deep analysis raises each motion and context complexity: the agent should coordinate many searches whereas retaining sufficient proof to supply a coherent, cited report.

When working with private brokers, resembling OpenClaw or Hermes, managing context and reminiscence can also be essential, notably as the quantity of knowledge they create and have entry to grows over time. Pi provides a helpful baseline for coding-agent harnesses. It provides repository context via AGENTS.md, persistent classes that customers can resume or department, and extensions for instruments, abilities, and prompts. OpenClaw builds on Pi and pushes the harness into personal-agent territory with an always-on daemon, chat interfaces, file-based reminiscence, scheduled heartbeats and cron jobs, and instruments for searching, sub-agents, and system management. That extra infrastructure is smart as a result of the agent should persist and act over time, somewhat than full one brief job. Its reminiscence system is intentionally plain: compaction summaries are appended to timestamped Markdown recordsdata, with no vector database or embeddings.

I do suppose these are all essential and tremendous attention-grabbing, however I wish to assist builders perceive that most brokers you’ll construct don’t want any of them. However first: the Kirby impact and the way frontier fashions are absorbing all of our agent harnesses.

The Kirby impact

New mannequin releases typically pressure us to rebuild our harnesses. In truth, we frequently have to tear them out and rebuild them utterly. In the event you don’t rip out your harness, it constrains the brand new mannequin. As Nick Moy, an AI researcher at Google DeepMind who constructed the primary multi-hop AI agent at Windsurf advised me, “we should always simply unleash [the model], unfetter it, and let it flex its wings!”

Manus has been re-architected 5 instances in a yr, LangChain’s Open Deep Analysis was rebuilt a number of instances in a yr to maintain tempo with mannequin enhancements, and even Anthropic rips out Claude Code’s agent harness as fashions enhance (see right here for extra particulars). Why is that this occurring? As a result of the fashions are sucking up the harnesses round them.

Bear in mind chain-of-thought (CoT) prompting the place we might see higher efficiency from LLMs if we requested them to clarify their reasoning? Properly, it seems that if you happen to do reinforcement studying on CoT traces, you’ll be able to construct reasoning fashions! Plan mode adopted the identical path. AMP briefly shipped it as an experimental function, then eliminated it when fashions might reliably obey “plan, however don’t edit.” As Nicolay Gerold (Amp Code) put it, “Having a separate mode for that, and having extra load on the person to recollect, ‘Hey, I at all times have to enter plan mode,’ isn’t needed anymore, as a result of it’s only one easy instruction.” Claude Code nonetheless has it, although, as does Codex! In November 2025, the discharge of Opus 4.5 and GPT-5.2 signalled a step change in how succesful coding brokers had grow to be. Simon Willison even wrote “It genuinely feels to me like GPT-5.2 and Opus 4.5 in November symbolize an inflection level”. Why was this attainable then? The labs had been capable of practice their new fashions on sufficient of our agent traces, specifically utilizing RLVR, that they had been capable of grow to be much more correct at software calling, amongst different issues.

Nicolay Gerold (Amp Code) calls this the Kirby impact: each element in a harness encodes an assumption about one thing the mannequin can’t do by itself. As fashions enhance, these assumptions expire, and the corresponding harness options could be eliminated.

Harnesses for help brokers

Most AI builders is not going to be constructing coding brokers or deep-research techniques. They are going to be constructing help brokers, gross sales brokers, and enterprise brokers that sit low on not less than one in all these dimensions. Many of those techniques full a job in a single to 5 turns (time to decision is vital right here!). Their harnesses nonetheless want cautious software design, structured outputs, routing, guardrails, traces, and handoffs, however they could want far much less reminiscence and compaction.

William Horton (AI Engineer, Maven Clinic) and his staff constructed Maven Assistant to assist members navigate appointments, suppliers, help info, and girls’s well being content material. When the agent first reached exterior customers, each preliminary dialog was accomplished in a single flip. Compaction was not often related, though one Zendesk retrieval returned far an excessive amount of textual content. The structure nonetheless accommodates a number of essential harness parts:

  • Area routing: A lead agent delegates requests to sub-agents for appointments, supplier search, well being content material, and Maven help.
  • Bounded software entry: The system has roughly 15 to twenty instruments distributed throughout these domains. Every sub-agent receives solely the instruments related to its job.
  • Device interfaces designed for brokers: Inner APIs are wrapped in safer interfaces. The applying injects the person ID immediately as a substitute of asking the mannequin to offer it.
  • Deterministic guardrails: Off-topic and prompt-hacking checks run earlier than the principle agent. When triggered, the system returns a hard and fast response with out asking the LLM to improvise.
  • Specific human handoffs: Expressions of self-harm set off an computerized switch to help. Different transfers require the person to ask or affirm.
  • Managed scope: The agent offers well being info however doesn’t diagnose. The staff withheld high-cost advantages questions till the system might reply them reliably sufficient.

Maven Assistant has low context complexity and average motion complexity. Its harness work is concentrated in routing, software design, guardrails, analysis, and human handoffs somewhat than reminiscence or compaction. However don’t overlook in regards to the Kirby impact. As these techniques grow to be extra refined, so will the fashions, and what you wanted to engineer into your harness yesterday shall be a part of the mannequin tomorrow.

The basics will stay:

  • Constructing LLM reasoning loops with instruments, state, and management stream.
  • Designing prompts and power schemas.
  • Managing context and reminiscence.
  • Utilizing structured outputs, traces, and power suggestions to examine and debug the loop.
  • Making use of guardrails and human handoffs.
  • Utilizing Agent SDKs and MCP with out outsourcing the system design.
  • Operating scheduled and event-driven work with hooks and cron jobs.
  • Constructing evals that check job success, software use, guardrails, and human handoffs.

Evals additionally elevate a boundary query. Vivek Trivedy’s account of the agent harness is runtime-oriented: it consists of the instruments, state, context, execution atmosphere, orchestration, and management logic used whereas an agent completes a job. Hamel Husain has argued to me (in personal correspondence) that the eval harness is a part of the agent harness too. That extends the definition past runtime to incorporate the infrastructure that runs check circumstances, captures traces and artifacts, and scores outcomes. We’ll focus on this, amongst different issues, in an upcoming dwell dialog.

When constructing brokers, earlier than reaching for compaction, reminiscence, handoffs, or sub-agents, map the job on two axes: what number of actions should the agent coordinate, and the way a lot context should it carry throughout the duty? If each are low, hold the harness small. Give the mannequin the few instruments it wants, check the loop, and add infrastructure solely when an actual failure calls for it. Revisit these additions at any time when a stronger mannequin arrives, as a result of yesterday’s needed workaround could also be tomorrow’s lifeless weight.

Need to go deeper? Try our assortment of agent-harness sources, together with papers, talks, instruments, and sensible examples. I’m additionally operating a four-hour workshop quickly, Construct AI Brokers from First Rules, the place we’ll construct a working customer support agent from scratch and canopy instruments, state, context, reminiscence, guardrails, SDKs, and MCP.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments