Agent harness
Also: harnesses
The code that runs an agent's tools. It can keep logs and limit what the agent may do.
The fuller definition
An agent harness is the surrounding software that runs and supervises an agent: supplying context, executing tool calls, tracking state, handling errors, and enforcing operational limits.
- Model
Propose the next step
- Harness
Validate, execute, record
- Environment
Files and authorized services
A simplified relationship, not a screenshot or a complete design.
A concrete example
A document-review harness checks source IDs, saves progress, and stops an attempted rename outside the approved scope.
The distinction that matters
The model proposes or selects actions; the harness and permission system determine how those actions are executed.
Try it: step through a controlled agent run
Step through this deterministic teaching simulation. No real agent runs and no files are changed. Compare an allowed read with a proposed rename that exceeds the permissions.
Read A01 and prepare a source-linked summary. No renaming or sending.
- Task received
What belongs to the model?
Interpreting the request, proposing a next tool call, and generating a candidate answer. A proposal is not evidence that an operation has executed.
What belongs to the harness?
Passing the right context, applying permission checks, running authorized tools, recording results, and stopping at a defined limit. A robust design enforces important boundaries outside the model's prose.
Related terms
AI agent
An AI system that takes steps to do a task. It may choose tools, search, or work with files. Its access should have clear limits.
Reliability & securityPermission
What an AI system is allowed to see or do, set by the people who run it.
Agents & automationCheckpoint
A saved point in a long task that work can be resumed from.
Where it is taught
Prompts, skills, workflows, and agentsSource and further reading
Anthropic · Effective harnessesThe definition and example are written for this library. The link gives background, official documentation or legal authority as labelled. Legal scope depends on the jurisdiction and current text; product features depend on release and settings.