What is an AI harness?
"AI harness" gets thrown around a lot. In engineering posts, in product copy, in pitch decks, in conference talks. The term means something specific. Worth understanding if you're going to keep hearing it, or build one yourself.
The plain-English definition
An AI harness is everything between you and the model. The model itself takes a prompt and produces a response. That's all the model does. Everything else (tool calls, file edits, multi-step plans, context that doesn't fit in one window) runs in the harness.
If you've used Claude Code, you've used an AI harness. Same for Cursor, Aider, ChatGPT's deep-research mode, every agent benchmark you've seen on Twitter. The model varies. The harness is what makes the model useful for a real task.
What's inside one
A working harness has a few moving parts. The categories below blur into each other in practice — most real harnesses fold context management into the loop, or wrap evaluation around tools — but the list is stable enough to be useful.
The loop. Send the prompt. Read the response. If the response asks for a tool (run this command, read this file, search the web), run the tool. Feed the result back into the next prompt. Repeat until the model says "done" or hits a stop condition. The loop is what makes the harness feel agentic. The model iterates instead of answering once.
Tools. A defined set of things the model can do beyond producing text. Read a file. Edit a file. Run a shell command. Query a database. Hit a web search. The harness exposes the tools, parses the model's tool calls, runs them, and returns results in a shape the model can use.
Context management. A model has a context window. Real tasks exceed it. The harness decides what to keep in the active window, what to summarize, what to throw away, what to recall later. Compaction, retrieval, sub-agent handoffs all live in the harness, not the model.
Sandbox. When the model wants to run code or commands, the harness decides where they run. A scratch directory. A Docker container. A virtual machine that can be reset to zero in milliseconds. The sandbox keeps the model from breaking things outside its lane.
Evaluation. Most production harnesses include some way to check whether the model's work was correct: test runs, schema validation, self-critique loops. The harness is where the "did this actually work?" question gets asked.
Most harnesses today are built on top of other harnesses. The loop is the part you actually design, and the part most people miss.
What it looks like to build one
If you're attempting to build a harness, you're almost certainly building on top of one. Claude Code, the Anthropic SDK, LangGraph. These ship the loop primitives, the sandbox, and most of the context plumbing. The model is a fixed-shape API call: pick one, plug it in, swap it later if you want.
The work that's left is the loop shape. How many turns. When to stop. Which tools to expose. What "done" looks like. What the model sees on each new iteration.
Each of those choices encodes an assumption about what the model can't do on its own. Give it too few tools and it asks you for help. Give it too many and it picks the wrong one. The stop condition is its own problem — let it loop forever and it wanders; stop it too early and it gives up halfway.
Most of the iteration in agent engineering is iteration on these choices, not the prompt. That took me longer than it should have to internalize.
What to listen for when someone uses the term
When you hear "AI harness" in the wild, the question worth asking is which part of the harness they mean.
If they're describing the loop and the tools, they're talking about software engineering. There's a concrete artifact behind the word.
If they're describing context management or evaluation, they're talking about the hard problems in agent design. These are where most production failures hide.
If they're using "AI harness" as a synonym for "AI product" or "AI feature," they're using the term for vibe. There might be a real harness behind the term, or it might be a sidebar chatbot. The word alone won't tell you.
You don't need to build a harness to benefit from knowing what one is. The next time an AI tool shows up in your business, you'll know what to ask about, and what a vague answer is hiding.
If you've got an AI tool or vendor pitch on your desk that you can't quite tell is the real thing, an AI Strategy Session is a 90-minute call where we go through it together.