concepts
Updated July 2026

Agent harness: what it means in 2026

An agent harness is the software around a language model that turns the model into an agent: the loop that calls tools, the code that assembles context, the sandbox the model acts in, the permissions that bound it, and the retry and stop logic that decides what happens after a failure. Wikipedia's Agent harness article defines it as "the software infrastructure surrounding a large language model (LLM) that enables it to operate as an AI agent." LangChain's Vivek Trivedy draws the boundary more bluntly in The Anatomy of an Agent Harness (March 2026): "A harness is every piece of code, configuration, and execution logic that isn't the model itself." If you are not the model, you are the harness.

Written by Pebble, a machine intelligence lab that builds the environments agents get graded in. The word "harness" names three different things in AI engineering as of 2026, and the search results have not sorted them out. Most of this page is that disambiguation.

What does Agent = Model + Harness mean?

It means an agent is a model plus everything else, and the "everything else" is a named engineering object rather than glue code. The formula circulated widely in 2026 and is the framing Trivedy's post builds from. Its practical value is accounting: when an agent gets better or worse, the change came from one of two places, and you can say which.

Trivedy enumerates the parts: system prompts, tools and skills and MCP servers along with their descriptions, bundled infrastructure such as a filesystem and sandbox and browser, orchestration logic for spawning subagents and routing between models, and hooks or middleware that run deterministically around the model call. Lilian Weng's Harness Engineering for Self-Improvement (July 2026) adds the verbs: a harness "orchestrates execution and decides how the model thinks and plans, calls tools and acts, perceives and manages context, stores artifacts, and evaluates results."

What is the difference between an inner harness and an outer harness?

The inner harness ships with the model builder and the outer harness is what you assemble on top of it. The distinction is Birgitta Böckeler's, from Harness engineering for coding agent users (April 2026). Wikipedia summarizes her split as an inner harness "shipped by the model's builder (for example an agent SDK or a coding tool such as Cursor or Codex)" and an outer harness "that the user assembles on top, such as instruction files, Model Context Protocol servers and custom skills."

The split matters because you cannot patch the inner harness. When it changes under you, the outer harness absorbs the change. Böckeler adds a second axis inside the outer harness: guides, which steer the agent before it acts, and sensors, which observe the result and let the agent correct itself. Each can be computational, meaning a deterministic check such as a linter, or inferential, meaning a model asked to judge. That guide and sensor pair is the closest thing in the coding-agent literature to what an environment does for a business process.

Agent harness vs eval harness vs execution harness

Three different objects, one word:

Agent harness Eval harness Execution harness
What it is The system that runs a model as an agent on real work A benchmark runner that scores models against fixed tasks The plumbing connecting a model's outputs to a sandbox
Canonical example Claude Code, the Claude Agent SDK, OpenAI Codex, LangChain deepagents EleutherAI/lm-evaluation-harness The harness shipped with Terminal-Bench
Primary job Get the work done Produce a comparable number Apply actions, return observations
Who operates it The team deploying the agent Researchers and leaderboard maintainers The benchmark or environment author
Output Completed work plus a trace A score State changes in a sandbox
Does it grade? Sometimes, through checks it carries Yes, that is the entire point No, grading sits elsewhere

The middle column is the older usage. EleutherAI's repo calls itself "a framework for few-shot evaluation of language models" and "the backend for Hugging Face's popular Open LLM Leaderboard." The third is narrower: Terminal-Bench ships "a dataset of tasks, and an execution harness," where "the harness connects language models to a sandboxed terminal environment."

They overlap. An agent harness usually contains an execution harness, and an eval harness has to wrap an agent harness to benchmark an agent rather than a model. But they answer different questions, and conflating them is why "the harness" is ambiguous in most arguments about agent performance. See the glossary for surrounding vocabulary.

Where did the term "agent harness" come from?

The attribution is contested and Wikipedia reports it that way. Two claims sit close together in early 2026.

Mitchell Hashimoto, co-founder of HashiCorp, published My AI Adoption Journey on February 5, 2026, and named the practice: "I've grown to calling this 'harness engineering.' It is the idea that anytime you find an agent makes a mistake, you take the time to engineer a solution such that the agent never makes that mistake again." His examples are updating an AGENTS.md file and writing scripts the agent can run to check its own work.

Vivek Trivedy's LangChain post, dated March 10, 2026, is the one that derived the component list from Agent = Model + Harness and gave the noun its current shape.

Between them, OpenAI published Harness engineering: leveraging Codex in an agent-first world in February 2026, an account of building a product with a team of Codex agents (InfoQ's writeup). Thoughtworks, LangChain, and Anthropic carried the term from there. Anthropic's use predates the naming: Effective harnesses for long-running agents, November 26, 2025, calls the Claude Agent SDK "a powerful, general-purpose agent harness adept at coding."

What are some agent harness examples?

Real, shipping ones as of July 2026:

  • Claude Code and the Claude Agent SDK. A coding agent plus the library that exposes the same harness to other applications. This is the answer to "agent harness Anthropic" and "agent harness Claude." Anthropic's published pattern for long-running work uses an initializer agent that writes an init script and a structured feature list, then a coding agent invoked repeatedly, each session leaving a progress note and a commit behind.
  • OpenAI Codex. The CLI, cloud, and editor surfaces share one agent loop, and OpenAI's harness engineering post is a first-party account of building around it.
  • LangChain deepagents. Trivedy describes harness research being used to improve it, including agents that analyze their own traces.
  • Research harnesses. Harness-1 is a 20B open search agent trained inside a harness that keeps candidate pools, evidence, and verification records outside the model's transcript.

Searching GitHub for "agent harness" is where the senses collide. EleutherAI/lm-evaluation-harness and harbor-framework/terminal-bench own the word, and neither is an agent harness in the 2026 sense.

Is there an agent harness framework?

There is no single standard, and the closest thing to one is an agent SDK: the Claude Agent SDK, LangChain's deepagents, and the CLI agents model providers ship. There is also now an argument that a harness should not be framework code at all. Natural-Language Agent Harnesses (March 2026) writes harness policy as editable documents a runtime interprets, and reports comparable task outcomes to code implementations with much shorter static policies.

Is there an agent harness benchmark?

Yes. Harness-Bench (May 2026) is a diagnostic benchmark of 106 sandboxed tasks built to measure the harness rather than the model, run across 5,194 trajectories. Its conclusion: "agent capability should be reported at the model-harness configuration level rather than attributed to the base model alone." On safety, Auditing Agent Harness Safety introduces HarnessAudit-Bench, 210 tasks across eight domains under ten harness configurations, and finds violations accumulate as trajectories lengthen even when tasks complete.

How does an agent harness relate to an environment?

A harness runs the agent and an environment grades it. The harness executes actions and manages context. The environment defines the task, holds the state the actions land on, and applies the checks that say whether a step was done correctly. Get that boundary right, because harnesses churn every few months and verification does not. We cover it in harness vs environment, what an environment must expose to a harness, and harness engineering as a discipline.

Pebble builds environments around real business processes: a machine does the steps on your systems, a check you approved grades each one, and the graded runs become training data for a model you own. If your agent works in a demo and cannot be trusted in production, the missing piece is usually on the environment side. Write to [email protected] for a scoping call.