An AI harness, also called an agent harness, is all the software around a language model that turns it into an agent that can do work. The model predicts text. The harness gives it a loop to work in, tools to act with, memory to remember with, a safe place to run code and the rules it has to follow. The shortest way to put it is the formula that has become standard in 2026: agent = model + harness.

That second half matters more than most people expect. The same model can score very differently depending on the harness around it, and several research teams now improve agents without touching the model at all. This guide explains what an AI harness is, what it is made of, which kinds exist, how to choose one and where the field is heading. We keep it up to date as new harnesses appear.

What is an AI harness?

A large language model on its own is stateless. You send it text, it sends text back, and then it forgets. It cannot open a file, run a test, search the web or remember what it did yesterday. Everything that makes an agent useful happens outside the model, in code that calls the model, reads its answer, executes what it asked for and feeds the result back in.

That surrounding code is the harness. LangChain describes it as every piece of code, configuration and execution logic that is not the model itself. Microsoft calls it the runtime scaffolding that drives model and tool calls, manages state and context, applies approval policies and keeps an agent moving through a task with many steps. Older papers use the word scaffolding for the same idea: the UK AI Security Institute already described an agent as a model plus scaffolding in October 2023.

Animation: a bare language model gets six harness parts around it and becomes an agent
A model only turns text into text. The harness around it, with the loop, tools, memory, sandbox, checks and logs, turns it into an agent.

The word is borrowed from the physical world. A harness lets you direct the power of a horse, or wire the electrics of a car so that each part gets the right signal. An AI harness does the same for a model: it channels raw capability into useful, controlled work.

Why the harness matters as much as the model

For years, progress in AI meant a bigger or better model. In 2026 a second lever became visible. Three results show it clearly.

  • LangChain moved its coding agent from roughly 30th to roughly 5th place on Terminal-Bench 2.0 by changing only the harness, with the same model.
  • Google’s Harness² rewrites the prompts, guardrails, memory, skills and tool guidance around a frozen model. One improvement step added up to 11.5 points on WorkBuddy-Bench, and the open model GLM-5 with an improved harness outscored the stronger Gemini 3.5 Flash running on its standard harness.
  • Meta-Harness, from researchers at Stanford, MIT and KRAFTON, lets an AI coding agent rewrite the harness by reading raw execution logs of earlier attempts. The harness it found beat the best hand-built harnesses it started from.
Animation: LangChain's coding agent climbs from about 30th to about 5th on Terminal-Bench 2.0 after a harness change
Same model, new harness: LangChain moved its coding agent from roughly 30th to roughly 5th place on Terminal-Bench 2.0. Source: LangChain, March 2026.

The lesson for anyone building or buying agents is simple. Models are increasingly interchangeable through standard APIs. The harness is where your instructions, your data, your tools and your rules live, and that makes it the part you actually own.

What an agent harness does: the main parts

Different vendors draw the lines differently, but almost every harness has the same six parts.

1. The agent loop

The loop is the heart of the harness. It sends the task and the context to the model, reads the answer, runs any tool the model asked for, adds the result to the context and asks the model again, until the task is done or a limit is hit. Deciding when to stop is harder than it sounds, which is why loop engineering became a discipline of its own.

Animation of an agent loop: context, model, tool and result, repeated until the tests pass
The loop keeps going until the checks pass. Here the first round fails two tests, the second round passes and the task is done.

2. Tools and connections

Tools are what let an agent act: a shell, a file editor, a browser, web search, a database query or an API call into a business system. The harness describes each tool to the model, checks the arguments, executes the call and returns the result. The Model Context Protocol (MCP) has become the common way to plug tools into a harness.

3. Context and memory

A model only knows what is in its context window. The harness decides what goes in: instructions, earlier steps, relevant files, retrieved knowledge and long-term memory. It also compacts or offloads context when the window fills up. Getting this right is the work of context engineering. Persistent memory across sessions, such as the memory stores in Claude Managed Agents, is a harness feature, not a model feature.

4. Sandbox, permissions and guardrails

An agent that can run code can also break things. The harness runs commands in an isolated workspace, limits which files and systems the agent can reach, and asks a human for approval before risky actions. These controls are where security and compliance teams should look first.

5. Verification and evaluation

Good harnesses check the agent’s work before it is called done: running tests, a linter, a second model as reviewer or a validation script. Thoughtworks’ Birgitta Böckeler calls these sensors, as opposed to guides that steer the agent before it acts.

6. Observability and logs

Every prompt, tool call, result and decision should be traceable. Logs make agents debuggable and auditable, and as Meta-Harness showed, they are also the raw material for improving the harness itself.

Examples: the main kinds of AI harness

Harnesses come in four broad kinds. The boundaries blur, but the distinction helps when you compare products.

Kind What it is for Examples
Coding harnesses Agents that read, write and test code in a repository or terminal Claude Code, Codex, OpenCode, Cursor’s agent, Pi and Omp
Open source runtimes Building blocks to assemble your own agent DeepSeek Harness, Amazon’s Strands, TrueForge, Hermes Agent, LangChain Deep Agents
Managed harnesses A hosted runtime from a model or cloud provider Claude Managed Agents, AWS’s managed agent harness, Cohere North
Company harnesses A harness for a whole organisation and its knowledge work, not one developer Zaela (see below), enterprise agent platforms

The contrast between Pi and Omp shows how much design choice there is. Pi argues that a modern model needs only four tools and a system prompt under 1,000 tokens. Omp, which started as a fork of Pi, ships 32 built-in tools and wires a language server and a debugger into the loop. Both can run the same models; they are different bets on the harness.

Inner harness and outer harness

Böckeler also distinguishes two layers. The inner harness comes from the vendor: the loop, tools and defaults that ship with Claude Code, Codex or an agent SDK. The outer harness is what you add on top: instruction files such as AGENTS.md or CLAUDE.md, MCP servers, skills, hooks, memory and your own checks.

Animation: a model inside the vendor's inner harness and your outer harness; the model is swapped, the outer harness stays
Your outer harness, with instructions, MCP servers, skills, memory and checks, survives a change of model.

For most organisations the outer harness is where the value is. It is where your way of working, your data and your rules are written down. It is also the part that survives when you switch models or vendors, which is the core of our argument that models are rented, context is owned.

Harness, framework, SDK, runtime, agent: what is the difference?

The terms overlap, and vendors use them loosely. This is how they relate in practice.

Term What it means
Model The language model itself: weights behind an API. Stateless, text in and text out.
Harness Everything around the model that makes it an agent: loop, tools, context, sandbox, checks, logs.
Agent Model plus harness, configured for a job.
Framework or SDK A library to build a harness, such as LangChain, Strands or the Claude Agent SDK. Some ship a ready harness.
Runtime The environment that runs agents in production: sessions, scaling, sandboxes. Often used as a synonym for a hosted harness.

Harness engineering, context engineering and loop engineering

As harnesses became the lever, the work of designing them got a name. Harness engineering took off in early 2026. The credit is disputed: some point to a blog post by Mitchell Hashimoto, others to LangChain’s writing on the anatomy of a harness, and OpenAI’s report on a codebase built largely by coding agents helped spread it, together with work from Thoughtworks and Anthropic. It means treating the harness as a real engineering artefact: you design it, test it and tighten it every time the agent slips.

Two narrower disciplines sit inside it. Context engineering decides what the model sees. Loop engineering decides how the agent iterates and when it stops. At the scale of a whole delivery process, the same ideas lead to context-driven software factories and dark software factories.

Harnesses that improve themselves

If the harness matters this much, the next step is to let AI improve it. Several projects now do exactly that.

  • Meta-Harness searches offline for a better harness, with an agent that reads up to about ten million tokens of raw logs per round.
  • Harness² from Google proposes changes, probes them against each other and keeps only what wins, for each task.
  • MiniMax M2.7 is a model trained to help improve its own agent environment.

For organisations the practical takeaway is to keep your agent logs and your evaluations. They are what any of these methods, or your own team, will use to make tomorrow’s agent better than today’s.

Harnesses for companies, not only for coders

Almost everything written about harnesses so far is about coding agents. That is where the term was born, and where results are easiest to measure. But the same idea applies to the rest of a company. A sales team, a marketing department or a service desk also needs a model that knows its rules, its tone, its customers and its systems, that can act in its tools and that stays within agreed limits.

A company harness differs from a coding harness in a few ways:

  • Memory is shared knowledge: house rules, tone of voice, products, prices and earlier work, used by everyone rather than one developer’s repository.
  • Procedures replace code tasks: a way of working is written down once as a skill and reused by the whole team.
  • Agents are roles: a content writer, an analyst, a reporting assistant, each with its own instructions and tools.
  • Tools are business systems: CRM, analytics, advertising, publishing and data sources, rather than a shell and a file editor.
  • Separation and governance are strict: each organisation’s memory and agents stay its own, which matters under GDPR and the EU AI Act.

Zaela is one example of such a company harness. It is built around exactly these four building blocks: memory (what it knows), skills (how it is done), agents (who does it) and tools (the hands that do the work). Its starting principle is that every organisation gets its own Zaela, with its own memory and agents, and that anything you ask for twice can become an agent. Disclosure: Zaela is made by Edge, the team behind i-scoop.eu. You can read more at zaela.com.

How to choose an AI harness

Whether you pick a coding harness, a managed runtime or a company harness, the same questions separate a good fit from a costly one.

  1. Which models can it run? A harness tied to one model locks you in. Most open runtimes now support several providers.
  2. Where does your data live? Check where context, memory and logs are stored, for how long, and in which jurisdiction.
  3. What can the agent touch? Look at sandboxing, permissions and human approval for risky actions.
  4. Who owns the outer harness? Your instructions, skills and memory should be portable, in plain files or exportable formats.
  5. How is work verified? Ask which checks run before a task counts as done.
  6. Can you see what happened? Full traces of prompts, tool calls and results are a must for debugging and audits.
  7. What does a task cost? Caching, context compaction and model routing can change token costs considerably.

Not to be confused with

Harness is also the name of a software delivery company, Harness.io, which sells a DevOps platform with its own AI agents. That product is unrelated to the general concept of an AI harness. And an evaluation harness, such as EleutherAI’s lm-evaluation-harness, is a tool to benchmark models rather than a runtime for agents. When people talk about an LLM harness, they can mean either an evaluation harness or an agent harness, so check the context.

Frequently asked questions about AI harnesses

What is an AI harness in simple words?

It is the software that lets a language model act instead of only talk. If the model is the brain, the harness is the body and the hands: it gives the model tools, memory, a place to work and rules to follow.

What is the difference between an agent and a harness?

An agent is the combination of a model and a harness. The harness is everything except the model. Swap the model and you still have the same harness; swap the harness and the same model behaves like a different agent.

Is Claude Code an agent harness?

Yes. Claude Code is a coding harness from Anthropic around Claude models, and so are Codex for OpenAI models and open projects like OpenCode. Benchmarks show that the same model can score differently in Claude Code than in other harnesses.

Is an agent harness the same as an agent framework?

Not quite. A framework is a library you use to build an agent. A harness is the working system around the model. Many frameworks now ship a ready harness, which is why the terms are often mixed up.

What is the best open source agent harness?

It depends on the job. For coding in a terminal, Pi and Omp sit at opposite ends of minimal and fully loaded. For building your own agents, DeepSeek Harness, Strands and LangChain Deep Agents are strong starting points. Check model support, sandboxing and licence before you choose.

Does a better harness beat a better model?

Sometimes. Harness² showed an open model with an improved harness outscoring a stronger model on its default harness. In practice you need both, but the harness is the part you can change today without waiting for a new model.

What is harness engineering?

It is the work of designing, testing and improving the harness, so that agents become reliable. Read our full guide to harness engineering.

Is an AI harness related to Harness.io?

No. Harness.io is a company with a DevOps platform. An AI harness is a general concept that applies to any agent.

All articles about AI harnesses on i-scoop.eu

Dit artikel is ook in het Nederlands beschikbaar op artificial-intelligence.be: wat is een AI harness?

Sources: LangChain, The anatomy of an agent harness (March 2026); Microsoft Learn, Agent harness; Wikipedia, Agent harness; our own coverage of Harness², Meta-Harness, Pi and Omp linked above.