Skip to main content

What is an agent harness, and what is harness engineering?

Agents and tools · Pro 2

Short answer

An agent is a model plus a harness. The harness is everything around the model: the loop and its stop rules, the tools and their descriptions, how context is managed, state kept on disk, checks such as tests, permissions and budgets. Harness engineering is designing, testing and measuring those parts so the agent works reliably.

Deeper answer

The model only predicts the next message. The harness decides what the model sees, which actions it can take, when its work is checked and when it must stop. Two products on the same model can behave very differently because their harnesses differ.

The main parts are: the agent loop and stop conditions; a small set of well-described tools; context management, such as compaction, resets and fetching files only when needed; memory on disk, such as a progress file, a todo list and git history; verification, such as tests, linters, type checks or a separate evaluator agent; permissions, a sandbox and hooks; sub-agents; and time and cost budgets.

The term follows prompt engineering and context engineering. Prompt engineering shapes one request. Context engineering shapes what goes into the window. Harness engineering covers the whole system that runs the model over many steps. You treat a harness change like any code change: run the same model on the same task set before and after, and compare.

What a strong answer covers

Answer it out loud in the mock interview about 1.5 min

Follow-ups to expect

Common mistakes

Learn it

Advanced harness engineering

Today's AI turns are used

Lessons, roadmaps, videos, practice cards and the code playground stay free with your account, with no limit.