← Learn

Agent harness

The scaffolding around an AI model — tools, loops, intake gates, policies, and evaluation — that turns a raw model into a usable agent system without changing the model weights themselves.

Learn

When to use it

Use an agent harness when a raw model call to "answer this prompt" is not enough. Agent harnesses bring together tools, retries, model guardrails, and bigger checkpoints to do things like "open the repo, run tests, and stop when the PR is green."

Quick example

In Claude Code, the model gets a shell, a file tree, and a loop that keeps going until tests pass. Claude Code is the agent harness: the model stays the same; that scaffolding is what turns it into a coding agent.

prompt → agent harness → tools/files → loop until tests pass → stop

Ecosystem

These sit around the same control loop — tools and memory hang off the harness; the model stays inside.

        ┌─ tools ↺─┐
prompt →│ agent harness │→ stop
        └─ memory ──┘

Misconceptions

MisconceptionRebuttal
It changes the model weightsIt only wraps how the model is called and constrained
Any wrapper is a harnessA harness owns the loop, tools, and stop conditions

Trade-offs

  • Control — more places to stall or burn tokens
  • Model reuse — harness config becomes its own failure surface

Seen in