# What Is an Agent Harness? What Harness Means in AI | QQuantum.ai

> An agent harness is the software around a language model that makes it an agent: loop, tools, context, memory, permissions and checks. Examples, and how to choose one.

Source: https://qquantum.ai/agent-harnesses/what-is-an-agent-harness

[Home](https://qquantum.ai) [agent-harnesses](https://qquantum.ai/agent-harnesses) what-is-an-agent-harness

Definition

# What is an agent harness?

An agent harness is the software wrapped around a language model that turns it into an agent. The model only predicts text. The harness runs it in a loop, gives it tools, decides what it sees and remembers, limits what it may do, and checks the result. Claude Code, Codex and the agent inside a support desk are all a model in a harness.

- Reviewed December 2026

All Agent Harness Development →

## The short answer

In AI, a harness is everything around the model: the code that calls it, the loop that lets it act over many steps, the tools it can use, the context and memory it is given, the permissions and sandbox that contain it, and the checks that judge its work. Agent = model + harness.

A useful picture is a horse and its tack. The horse supplies the power. The harness, reins and bit decide where that power goes, how fast, and what it is attached to. A strong horse in poor tack is dangerous; the same horse in good tack ploughs a field. Swap the model and the harness stays; swap the harness and the same model behaves very differently.

The word is borrowed from software testing, where a test harness is the code that runs a program under controlled conditions and checks its output. An [evaluation harness](https://qquantum.ai/agent-harnesses/evaluation-harness) still means that today. An agent harness is the wider idea: the controlled conditions an agent lives in all the time, not only during a test.

WHAT IS INSIDE A HARNESS

## The anatomy of an agent harness.

01

### The agent loop

Call the model, run the tool it asked for, give it the result, repeat until it says it is done or a limit is hit. This loop is what makes a chatbot an agent.

02

### Tools

Functions the model may call: read a file, search, query a database, send a draft, run a command. Often exposed through MCP, the Model Context Protocol.

03

### Context management

The system prompt, rules files, retrieved documents and earlier results, kept within the model’s context window by summarising, trimming or delegating to subagents.

04

### Memory and state

What survives between steps and between runs: notes, task lists, files, a database. Without it every run starts from nothing.

05

### Permissions and sandbox

What the agent may read, change or run, and where. Approvals before anything irreversible. The boundary that keeps a mistake small.

06

### Checks and logs

Tests, validators and evaluation sets that judge the output, and traces of every step so a failure can be found and fixed.

EXAMPLES

## Harnesses you may already use.

Most well-known AI agents are best understood as a harness around someone’s model:

- Claude Code is Anthropic’s harness for coding and computer work around Claude models. The same harness is available to developers as the Claude Agent SDK.
- Codex is OpenAI’s coding agent harness; the OpenAI Agents SDK is a lighter toolkit for building your own.
- LangChain Deep Agents, Goose, OpenCode and other open-source projects are harnesses you can run with many models.
- The chat app you type into is a harness too: a loop, a few tools such as search and code execution, memory and safety checks around the model.

That is why “is Claude Code a harness?” has a simple answer: yes. Claude is the model; Claude Code is the harness. Using existing harnesses like these in business work is covered on [Claude Code and agent SDKs for business](https://qquantum.ai/agent-harnesses/claude-code-for-business).

WHY IT MATTERS

## Same model, different harness, different agent.

Public coding benchmarks now list results per model and harness, because the same model scores differently in different harnesses. The harness decides which files the model reads, whether it runs the tests, how it recovers from an error and when it stops. Those choices often matter more than a model upgrade.

For a business the effect is larger still. A general harness knows nothing about your CRM, your refund rules or who may approve a payment. Until those are built into the harness — as tools, permissions, rules and checks — even the best model is guessing. That work is [harness engineering](https://qquantum.ai/agent-harnesses/harness-engineering).

CHOOSING ONE

## What is the best agent harness?

There is no single best harness, only the best one for a job. These are the questions we ask first.

01

### What is the work?

Coding and file work suit a coding harness such as Claude Code or Codex. Work inside business systems usually needs a harness with your own tools and approvals, built on an SDK or written from scratch.

02

### Where must it run?

A laptop, your CI, your cloud account or an air-gapped server. Some harnesses run anywhere; some depend on a vendor service.

03

### Which models?

Some harnesses are tied to one provider’s models, others accept many, including open-weight models you host yourself.

04

### How much control do you need?

Hooks, permissions and settings may be enough. If you need to own the loop, the state and every log line, you need a custom harness.

Questions

## Questions about agent harnesses.

### What does harness mean in AI?

In AI, a harness is the software around a model that runs it and controls it. For an agent it is the loop, tools, context, memory, permissions and checks. For evaluation it is the code that runs a model on a set of test cases and scores the results.

### What is the difference between an AI agent and a harness?

An AI agent is the whole working system. A harness is the part of it that is not the model. Put a model in a harness and you have an agent; change the harness and the same model becomes a different agent.

### Is Claude Code a harness?

Yes. Claude Code is Anthropic’s agent harness around Claude models: it supplies the loop, file and terminal tools, context management, permissions, hooks and subagents. Its core is also available as the Claude Agent SDK for building your own agents.

### Is ChatGPT a harness?

ChatGPT is a product built from OpenAI models running inside a harness: a chat loop with tools such as search and code execution, memory and safety checks. The model and the harness together make the product.

### What is an LLM harness?

LLM harness is another name for the code around a large language model. It is used both for agent harnesses, which let the model act, and for evaluation harnesses, which test it, such as EleutherAI’s lm-evaluation-harness.

### What is an example of a harness?

A support agent harness might give the model three tools — look up an order, read the help centre, draft a reply — let it act for up to ten steps, forbid it from issuing refunds, require a person to approve each reply, and log every step for review.

### Do I need to build my own harness?

Often not. For internal and coding work an existing harness fitted with your tools and rules is usually enough. A custom harness is worth it when the work is customer-facing, regulated, must run on your own servers, or is part of the product you sell.

Keep reading

- [The service Agent Harness Development](https://qquantum.ai/agent-harnesses)
- [The discipline Harness Engineering](https://qquantum.ai/agent-harnesses/harness-engineering)
- [Comparison Agent vs Harness vs Framework](https://qquantum.ai/compare/agent-vs-harness-vs-framework)
- [Resource What Are AI Agents?](https://qquantum.ai/resources/what-are-ai-agents)
