What is an AI harness?

AZET · Updated November 20, 2026 · 한국어

An AI harness, or agent harness, is the software around a model that turns its answers into work. The model decides the next step; the harness gives it tools, feeds it context, holds its permissions, checks its actions and records what happened. Claude Code, Codex and Gemini CLI are harnesses; so is azet agent. This guide explains the parts and how to judge them.

1. Model versus harness

A model takes text in and gives text out. On its own it cannot open a file, run a test or click a button. The harness runs the loop: it shows the model the task and the current state, lets it call a tool, runs the tool, shows the result and repeats until the work is done or a person has to decide. Two products on the same model can differ a lot, because the harness decides what the model sees and what it may do. The word comes from the harness that lets a horse's strength pull a cart in a chosen direction.

2. The parts of an agent harness

PartWhat it doesIn AZET
ToolsFiles, terminal, browser and outside services the model can callazet agent opens and drives a real browser (open, click, fill, upload, download) and connects MCP servers such as GitHub, a database or Notion
Context and memoryWhat the model sees each step and what it keeps between tasksazet agent keeps notes as plain files you can edit; passwords are never kept
PermissionsWhat it may do without askingRead-only, ask-first or full access per task in azet agent; payments and posts wait for approval in azet
GuardrailsChecks on each action before it runsazet-guard on Claude Code and Codex CLI hooks
VerificationChecking the work instead of trusting the claimazet-guard sends an agent back when it claims tests pass and none ran
LogsA record of what was decided and doneazet-guard's append-only audit log; a screenshot after every browser step in azet agent
OrchestrationSplitting work and running pieces in parallelazet agent hands pieces to scout, planner, reviewer and worker subagents; tasks can run on a schedule
Cost controlKeeping repeated context cheapazet agent bills repeated input at the provider's cache price and shows each task's cache hit rate

3. One window for several harnesses

Many people already pay for more than one harness. azet agent runs its own tasks side by side and opens real terminals for Claude Code, Codex, Gemini CLI or azet in the same project folder, so you keep the subscriptions you have in one place. AZET Desktop does the same from your phone: if Claude Code or Codex is signed in on your Mac, it runs it with your own subscription, and when your AZET credits run out mid-task it carries the task on with an AI that is signed in and still has room.

4. Adding guardrails to a harness you already use

Claude Code and Codex CLI expose hooks: points where outside code can inspect a tool call before and after it runs. azet-guard uses them. Install it with pipx install azet-guard, then azet-guard install for all Claude Code projects or azet-guard install --project . for one repository (a settings file you can commit for your team), or azet-guard install --codex. Policies can be tuned per rule to deny, ask or warn, and mode = "monitor" logs what it would do without blocking.

5. Harness engineering: what people still do

Harness engineering is designing the environment an agent works in: the tools it gets, the rules it follows and the checks that catch its mistakes. In practice that means writing down project conventions the agent reads, keeping tests and type checks fast so the agent can run them, deciding which actions need a person, and reading the logs when something goes wrong. The model gets better on its own; the harness is the part you control.

6. How to judge an AI harness

Frequently asked questions

What is an agent harness?

The software around an AI model that runs the agent loop: it gives the model tools, context and permissions, runs the actions the model picks, checks them and logs them. Claude Code, Codex, Gemini CLI and azet agent are agent harnesses.

What is harness engineering?

Designing the environment an agent works in: its tools, its rules, the checks that catch mistakes and the points where a person decides.

Is a harness the same as a framework?

Not quite. A framework is a library for building agents in code; a harness is the running system around the model, often a finished app such as a coding agent. Some frameworks are used to build harnesses.

Can I use Claude Code and Codex in one place?

Yes. azet agent opens real terminals for Claude Code, Codex and Gemini CLI next to its own tasks, and AZET Desktop runs Claude Code or Codex with your own subscription and lets you send them work from your phone.

How do I add guardrails to Claude Code?

Through its hooks. azet-guard is a free, open-source set of hooks for Claude Code and Codex CLI that stops destructive commands, keeps API keys out of the model, asks before risky moves and keeps an audit log.

Questions? Write to hello@azet.io and the AZET team will answer.