What is an AI harness?
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
| Part | What it does | In AZET |
|---|---|---|
| Tools | Files, terminal, browser and outside services the model can call | azet 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 memory | What the model sees each step and what it keeps between tasks | azet agent keeps notes as plain files you can edit; passwords are never kept |
| Permissions | What it may do without asking | Read-only, ask-first or full access per task in azet agent; payments and posts wait for approval in azet |
| Guardrails | Checks on each action before it runs | azet-guard on Claude Code and Codex CLI hooks |
| Verification | Checking the work instead of trusting the claim | azet-guard sends an agent back when it claims tests pass and none ran |
| Logs | A record of what was decided and done | azet-guard's append-only audit log; a screenshot after every browser step in azet agent |
| Orchestration | Splitting work and running pieces in parallel | azet agent hands pieces to scout, planner, reviewer and worker subagents; tasks can run on a schedule |
| Cost control | Keeping repeated context cheap | azet 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
- Can you see each step? A harness that shows what it did, such as a page picture after each browser step, is easier to correct.
- Are permissions per task? Read-only for research, ask-first for changes.
- Are secrets kept out of context? Look for redaction and separate credentials.
- Does it check its own claims? Tests that actually run beat a message saying they passed.
- Can you change models? azet agent uses 28 models on AZET credit or your own keys for Claude, GPT, Gemini, Grok and others.
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.