What is Harness?

The code 'scaffolding' that wraps a model and turns it into an agent that can act.

// Explanation

An LLM on its own only predicts text: it can't run code, read files, or remember what it did three steps ago. The harness is all the software surrounding the model so it can act: it defines which tools it can use and how to call them, builds the 'observe → decide → execute → repeat' loop, manages context and memory, enforces permissions and safety limits, and translates the model's responses into real actions. The same model behaves very differently with two different harnesses: much of what makes an agent good isn't just the model, but the quality of its harness. Claude Code, for example, is a harness around Claude.

// Example

Two people use the same Claude model, but one calls it via the 'bare' API and the other uses Claude Code. The second gets an agent that edits files, runs tests, and navigates the project on its own — that difference is the harness, not the model.

← See all 42 glossary terms