Agent Harness

AI

AI

An agent harness is the software around an AI model that supplies context, executes tools and returns results. It enables an agent to carry out a task across multiple steps.

A language model can produce an answer or request a tool call. It does not execute that tool itself. The agent harness handles execution: it sends the task and relevant information to the model, processes tool requests and returns their outputs for the next step.

A harness typically includes instructions, context management and a loop of model calls and tool results. Depending on the application, it may also handle permissions, human approval, saved progress and action logs. Not every harness includes the same components.

For example, you ask a coding agent to fix a bug. The harness provides access to the appropriate files and a test environment. The model chooses which files to inspect and which tests to run. The harness executes those actions and returns the results, until the agent finishes or reaches a configured limit.

The model makes decisions; the harness coordinates execution around it. Together with tools and a working environment, they form the agent system. An agent framework or SDK is a toolkit that can supply parts of a harness. ReAct describes an approach to reasoning and acting, not the software that manages execution.

Tip

A harness does not automatically make a model reliable. Limit access and define stopping conditions. Require human approval where appropriate before actions such as sending messages or deleting data.

Our page on this

Related terms

← All terms