# What is a harness? AI agents explained simply | P-CATION Blog

> An AI model can only write text. The harness turns that text into actions: reading files, running programs, returning results. Model plus harness makes an agent.
> Source: https://p-cation.de/en/blog/what-is-a-harness/
> Language: en

[Back to blog](https://p-cation.de/en/blog/)
November 18, 2026 AI use cases

# What is a harness? Why an AI model on its own is not an agent

An AI model can only write text. The harness turns that text into actions: reading files, running programs, returning results. Model plus harness makes an agent.

**Author:** P-CATION Editorial Team

![A dark-blue core in a metal kitchen workstation, connected to a knife, whisk, ladle, tool modules and a pot](https://p-cation.de/_astro/hero.BmXExbvK_Z29fsUp.webp)

AI-generated image

In this article

- [TL;DR](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#tldr)
- [A model can only write text](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#a-model-can-only-write-text)
- [Tools, and a way to call them](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#tools-and-a-way-to-call-them)
- [The harness does the rest](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#the-harness-does-the-rest)
- [So what is an agent?](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#so-what-is-an-agent)
- [Isn’t Claude Code a harness?](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#isnt-claude-code-a-harness)
- [And MCP?](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#and-mcp)
- [What this means for companies](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#what-this-means-for-companies)
- [Where the picture stops](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#where-the-picture-stops)
- [Frequently asked questions](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#frequently-asked-questions)[Is a chatbot an agent too?](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#is-a-chatbot-an-agent-too)
- [Do we need our own harness?](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#do-we-need-our-own-harness)
- [Can you combine any model with any harness?](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#can-you-combine-any-model-with-any-harness)

In this article

- [TL;DR](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#tldr)
- [A model can only write text](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#a-model-can-only-write-text)
- [Tools, and a way to call them](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#tools-and-a-way-to-call-them)
- [The harness does the rest](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#the-harness-does-the-rest)
- [So what is an agent?](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#so-what-is-an-agent)
- [Isn’t Claude Code a harness?](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#isnt-claude-code-a-harness)
- [And MCP?](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#and-mcp)
- [What this means for companies](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#what-this-means-for-companies)
- [Where the picture stops](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#where-the-picture-stops)
- [Frequently asked questions](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#frequently-asked-questions)[Is a chatbot an agent too?](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#is-a-chatbot-an-agent-too)
- [Do we need our own harness?](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#do-we-need-our-own-harness)
- [Can you combine any model with any harness?](https://p-cation.de/en/blog/what-is-a-harness/?format=markdown#can-you-combine-any-model-with-any-harness)

Almost every conversation about AI agents now includes the word “harness”, and almost nobody explains it. We need it for our post on [how we build software with AI agents today](https://p-cation.de/en/blog/agentic-engineering-how-we-work/), so here is the short explanation first.

The one sentence to take away: **An AI model can only write text. The harness is the program that turns that text into actions. Model plus harness makes an agent.**

This explanation largely follows [“What is a harness?”](https://t3.gg/blog/post/what-is-a-harness) by Theo Browne, a developer and YouTuber who built T3 Code, one of the interfaces we work with every day.

## TL;DR

- A language model only produces text. On its own it cannot open a file or start a program.

- The harness gives the model tools, spots in the text when the model wants to use one, runs it and hands back the result.

- An agent is model plus harness. Neither does anything useful alone.

- Claude Code and Codex are interface and harness in one. That is why the two are so easy to confuse.

- For companies, the harness decides what an agent is allowed to do. That is a security question, not a model question.

## A model can only write text

Start at the bottom. A language model like Claude or GPT receives text and writes text back. That is all. It cannot read a file, send an email or run a test.

When a model writes “I am opening the file now”, nothing happens. Theo compares it to typing on a keyboard while the computer is off. The input is there, but nothing processes it.

## Tools, and a way to call them

For the model to do anything, it needs tools. Typical tools for software development are called something like `read_file`, `edit_file`, `bash` and `search`. Each is a small piece of code that does exactly one thing.

But the model cannot press buttons. It can only write. So it needs an agreed way of writing that requests a tool. In a real session it looks roughly like this:

`Model: read_file("backend/office/deadlines.py") Harness: [contents of the file] Model: edit_file("backend/office/deadlines.py", …) Harness: file changed Model: bash("pytest tests/office -q") Harness: 48 passed in 6.2s`

Every “Model” line is just text. Every “Harness” line is something that actually happened.

## The harness does the rest

What is missing is the program that takes those lines seriously. That is the harness. It has five parts:

- the **tools** themselves,

- a **description** of the tools that the model receives up front, so it knows what exists,

- the **syntax** the model uses to call a tool,

- a **reader** that goes through the model’s text, recognizes calls and starts the matching tool,

- a **way back** that delivers the result to the model.

Then the model keeps writing, calls the next tool, reads the next result. This loop can run for minutes or for days.

In practice a good harness does more. It summarizes the conversation so far when the model’s memory fills up. It starts further agents for subtasks. And it asks before something risky happens. Much of what was manual work in early 2026 has moved into the harness.

## So what is an agent?

An agent is what you get when you connect a model to a harness. The model alone writes text that does nothing. The harness alone has tools but nobody to use them.

Theo explains it with a kitchen. The model is the chef. The harness is the kitchen with stove, knives and pots. A chef without a kitchen cannot cook, and a kitchen does not cook by itself. Good kitchens let the chef bring their own tools.

Many “different agents” are really the same model in differently equipped kitchens: other tools, other instructions, other permissions.

## Isn’t Claude Code a harness?

Partly. Claude Code has two parts: the **interface** you see in the terminal or the app, and the **harness** underneath, which Anthropic also offers separately as the Agent SDK. Codex is the same: an app plus a harness called the Codex App Server.

That is where the confusion comes from. Both products ship interface and harness together, and you only see the interface. Humans see interfaces, models see harnesses.

You notice they are separate parts as soon as someone uses the harness elsewhere. T3 Code, for example, is not a harness itself but an interface that uses the harnesses of Claude Code and Codex. In Theo’s picture, T3 Code is the restaurant you bring your own kitchen to.

To be honest, the term is not used consistently. Some people call all of Claude Code a harness. The distinction still helps you understand what is going on.

## And MCP?

Through MCP (Model Context Protocol) a harness can use tools that run somewhere else, such as a mailbox or web analytics. A normal tool is code on your own machine, similar to a browser extension. An MCP server is more like a website: you only need the address. It does not change the basic idea. It just puts more tools in the kitchen.

## What this means for companies

Models change every few weeks. The harness, on the other hand, determines what an agent can actually do in your company: which files it may read, which programs it may start, whether it can send data outside and when it has to ask a person.

If you decide on the use of agents, don’t only ask which model is inside. Which harness it is, and which tools it unlocks, matters at least as much.

## Where the picture stops

- The kitchen is a comparison, not a blueprint. In real harnesses the lines blur, because models are trained specifically for certain harnesses.

- A good harness does not make a weak model smart. It only lets a good model get things done.

- Tools are real permissions. An agent with access to `bash` can do almost anything on the machine that you can.

## Frequently asked questions

### Is a chatbot an agent too?

Only if it has tools and uses them on its own. A chatbot that only answers is a model with an interface but no real harness. More in [AI agent vs. chatbot](https://p-cation.de/en/blog/ai-agent-vs-chatbot/).

### Do we need our own harness?

Usually not. For software development the harnesses of Claude Code and Codex are very mature. Your own effort pays off in the tools and rules you add, not in the basic framework.

### Can you combine any model with any harness?

Partly. Many harnesses work with models from several providers. But models work best in the harness their provider trained them for.

The next time someone presents you with an “AI agent”, ask about three things: which model, which harness, which tools. How we put this together in our own development is in our field report.

[How we work with agents](https://p-cation.de/en/blog/agentic-engineering-how-we-work/) · [Request a workshop](https://p-cation.de/en/ki-speaker-workshops/)

- Agent basics
- Best practices

[← Back to blog](https://p-cation.de/en/blog/)