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.
Related terms
- AI agentAn AI agent is a system that uses a language model not only to answer but to act: fetch data, use tools and perform actions in other systems.
- LLMAn LLM (Large Language Model) is an AI model that learns language patterns from large amounts of data to process and generate text. It works with tokens: pieces of text.
- ReAct (Reason and Act)ReAct (Reason and Act) is an approach in which an AI agent alternates between reasoning about the next step, taking an action with a tool and checking the result, until the task is done.
- PromptA prompt is the instruction you give an AI model. The clearer the role, goal, context and required format, the more usable the answer.
