# What is an agent harness?

_Updated 2026-08-21._

The harness is the layer most agent directories omit entirely, which is odd, because in practice it is the first thing you choose. The model thinks; the harness is what reads files, runs commands, calls tools, keeps the session, and decides when to stop and ask a human.

## Harness versus framework

A framework is a library you write orchestration in — you own the loop, and the library gives you graph execution, checkpointing or type-safe outputs. A harness is a loop that already exists, which you configure and drive.

The practical test: if you are writing the while-loop that calls the model and dispatches tools, you are using a framework. If something else runs that loop and you supply tools, prompts and permissions, you are using a harness.

In the registry: [Claude Code](https://newagent.build/c/claude-code), [Claude Agent SDK](https://newagent.build/c/claude-agent-sdk), [LangGraph](https://newagent.build/c/langgraph), [Mastra](https://newagent.build/c/mastra)

## What the harness decides for you

Choosing a harness settles more than it appears: how tools are declared, how sessions persist, what the approval model looks like, how context is compacted when it overflows, and how far the agent can go before a human intervenes. These are the properties you will care most about in production, and they are harder to change later than the model.

## The 2026 harness wave

The category expanded sharply in 2026. Alongside the vendor coding agents, several harnesses now treat the loop itself as the product: one where prompts, skills, sub-agents and memory are state the agent can create and revise mid-run; one where every part including the agent loop is a swappable plugin; and several self-hosted gateways that put a single agent into Slack, Telegram and WhatsApp at once.

Two properties are worth weighing directly. Whether the harness is model-agnostic, since a harness tied to one vendor's models is a harness tied to that vendor's pricing. And whether it improves with use — some now write their own skills from experience and carry them into later sessions.

In the registry: [Hermes Agent](https://newagent.build/c/hermes-agent), [Prime Agent](https://newagent.build/c/prime-agent), [DeepSeek Harness](https://newagent.build/c/deepseek-harness), [OpenClaw](https://newagent.build/c/openclaw), [OpenCode](https://newagent.build/c/opencode)

## Common questions

### What is an agent harness?

An agent harness is the runtime that executes the agent loop: it reads files, runs shell commands, calls tools, manages the session and handles approvals. The model supplies the reasoning; the harness connects it to the real world.

### What is the difference between an agent harness and an agent framework?

A framework is a library you use to build your own loop. A harness is a loop that already exists, which you configure. If you are writing the code that calls the model and dispatches tools, that is a framework; if something else runs that loop for you, that is a harness.

### Do I need a harness to build an AI agent?

No, but it is usually the faster path. Writing your own loop with a model API and a tool dispatcher is entirely viable and gives you full control. A harness saves you the session management, context compaction and approval plumbing you would otherwise build yourself.

## Machine interfaces

- `GET https://newagent.build/api/registry` — every component as JSON
- `GET https://newagent.build/api/vendors` — vendors, with the repo and releases feed to watch
- `GET https://newagent.build/api/advise?q=<plain english>` — recommended stack for a description
- `GET https://newagent.build/api/stack?<layer>=<id>&format=sh|json|md|yml|agents|env` — a stack as files
- `GET https://newagent.build/llms.txt` — the whole registry in one fetch

Any page here also returns markdown if you send `Accept: text/markdown`.