Definitions

How computers for agents work, from the hardware to the sandbox.

Definitionsa

Agent harness

An agent harness is the software around a language model that runs the agent loop and carries out the actions the model chooses.

An agent harness is the program that turns a language model into an agent. The model only produces text, so it cannot act on its own. The harness sends the model a prompt, reads the reply, and carries out any tool calls in it. It then adds the results to the conversation history and calls the model again.

The harness owns everything around the model call. It defines which tools the model can see and passes their names, descriptions and schemas to the model. It manages the context window, for example by trimming or summarizing old history when the conversation grows too long. It also decides when the loop stops, such as when the model gives a final answer or a step limit is reached.

Coding agents, chat assistants and research agents all run inside some kind of harness. The same model can behave very differently in two harnesses, because the tools and prompts differ. A harness often runs tool calls that execute code in a sandbox, so that untrusted code stays away from the harness and its credentials. Permission checks, logging and retries usually live in the harness as well.

Related terms