AI Terms Illustrated TERM HARNESS / Agent Harness
HARNESS · Explained from Scratch

The model can only answer.
Harness lets it get things done.

A harness is the whole "operating system" wrapped around a large language model: it keeps the model working in a loop, calling tools, remembering progress, and staying within limits.

Model (the brain) Harness (everything around it)
00

Same model,
two completely different results.

You ask an AI to "put this week's invoices into a spreadsheet." The difference isn't how smart the model is. It's whether there's something around it to pick up where it leaves off.

Model only · Chat box

It tells you what to do

It can't see your folders or open a spreadsheet. All it can do is write you some text; the rest is up to you.

AI replyFirst, open your inbox and download the emails with invoices attached. Then create a new spreadsheet with three columns: date, amount, merchant...
Model + Harness

It does the job itself

The system around it opens the files, reads them, and writes the spreadsheet for it. After each step it hands the result back, and the model decides what to do next.

  1. 01Lists the 12 files in the "Invoices" folder
  2. 02Reads the date, amount, and merchant from each one
  3. 03Spots 1 duplicate and skips it
  4. 04Writes the spreadsheet and hands it to you to check
01
Origin

A harness was originally
horse tack.

However strong a horse is, without reins, a harness, and a cart, it can't haul goods or know where to go. Tack doesn't make the horse any stronger; it turns that strength into something useful.

HORSE CART Horse supplies power Tack reins · straps · cart → goods delivered ONE-TO-ONE AI AGENT Model thinks Harness loop, tools, memory, rules → task completed

In English it's usually just called an "agent harness"; you'll also see it described as an agent wrapper or agent scaffolding.

02
Inside

A harness holds
four things.

The model sits in the middle, and each time it only "thinks of the next step." Everything else is done by these four parts around it.

HARNESS Model decides next step 01 Execution loop think → act → check → repeat 02 Tools read files, run code, browse 03 Context management what to keep, what to drop 04 Guardrails what's allowed, what to ask
01 · Loop
Execution loop

The model says "I want to read this file," the loop reads it, passes the contents back, and asks "what's next?" It keeps going until the task is done or someone stops it.

02 · Tools
Tools

On its own, the model can only output text. What actually touches files, the terminal, or the browser are the tools the harness provides.

MCP is a universal plug for connecting tools
03 · Context
Context management

There's a limit to how much the model can see at once. On long tasks, the harness has to compress old records and hold on to what matters, so the model doesn't "lose its memory."

04 · Guardrails
Guardrails

Should it ask a person before deleting files, making payments, or sending emails? Which folders can it touch? These rules are written into the harness, not left to the model's good behavior.

03
See It in Motion

Step by step,
watch the loop turn.

Click "Next step." Notice: each time, the model only says what it wants to do. The actual doing, recording, and blocking is all the harness.

TaskPut the invoices into a spreadsheet, then clean up the original files
Not started yet. Click "Next step."
04
Why It Matters

Swap the harness,
and the same model feels like someone else.

Many of the AI products you've used are, at heart, "some model + some harness." The model can be the same and the experience still very different; the difference is in the layer around it.

Claude Code

Anthropic's harness for coding tasks: it can read and write code and run commands, and asks you before risky operations.

Codex

OpenAI's coding agent, likewise a model wrapped in a layer of loop, tools, and sandbox.

Cursor and other AI editors

They plug the model into an editor; the harness decides how much code it can see and which files it can change.

A real example: in April 2026, Anthropic published a postmortem. Users had reported that Claude Code got worse, and the investigation traced it to several changes in the harness and product layer, not to the model itself. Once those were reverted, performance came back. Read the original →

Easily confused termWhat it isRelation to the harness
ModelThe "brain" that thinks and writesSits in the middle of the harness
AI AgentAn AI that works toward a goal on its ownAgent = Model + Harness
Tools / MCPThe hands that let AI reach the outside worldOne component of the harness
SkillAn instruction manual written for the AILoaded into context by the harness when needed
05
Formal Definition

Back to the formal wording.

Agent Harness: the software scaffolding around a large language model, including the execution loop, tool calling, context management, and guardrails, that turns the model from "answering questions" into "completing tasks on its own."

The definition above is a synthesis of these two articles: one focuses on the loop and context, the other on instructions and guardrails, and they don't fully agree on whether tools count as part of the harness. The industry generally uses the broader sense: everything outside the model that lets it do work.

The model is the brain;
the harness is the body and the rules that let the brain get work done.

AI Terms Illustrated / HARNESS Explained from Scratch
Anonymous vote, takes one second

0 discussions

What is still unclear? Or do you have a more precise explanation?
You
AI glossary Skill |Reviewed 11/23/2026 | Yiding Huiziyou