An AI harness is the software around an AI model that turns it into an agent: the loop that calls the model, the tools it can use (files, a shell, a browser), the memory it keeps and the rules on what it may do. Wikipedia calls it “the software infrastructure surrounding a large language model (LLM) that enables it to operate as an AI agent”. The short version that spread in 2026: agent = model + harness.
Claude Code, Codex, Cursor, OpenCode and OpenClaw are all harnesses. This guide explains what a harness is and ranks the 10 best AI harnesses in 2026, then compares all 36 we checked on November 17, 2026, with GitHub stars, downloads, prices and benchmark scores.
The 10 best AI harnesses in 2026
Ranked by adoption: revenue and users where the maker publishes them, then GitHub stars and downloads. Benchmarks are further down.
# | Harness | Best for | Maker | Open source | Models | Price | Adoption |
|---|---|---|---|---|---|---|---|
1 | Coding | Anthropic | No | Claude | Pro $20/mo | $2.5B+ revenue run-rate (Feb 2026) | |
2 | Coding | OpenAI | Yes (Apache-2.0, CLI) | OpenAI; local via --oss | Free with ChatGPT | 5M+ weekly users (Jun 2026) | |
3 | Coding (editor) | Anysphere (SpaceX) | No | Many vendors | From $8/mo | ~$4B annualized revenue (Jun 2026, reported) | |
4 | Coding, any model | Anomaly | Yes (MIT) | Any, incl. local | Free + model | 16M developers a month (Oct 2026) | |
5 | Personal agent | OpenClaw Foundation | Yes (MIT) | Any, incl. local | Free + model | 394.6K GitHub stars, the most of any harness | |
6 | Personal agent | Nous Research | Yes (MIT) | Any, incl. local | Free + model | 264.2K GitHub stars | |
7 | Minimal coding harness | Earendil (Mario Zechner) | Yes (MIT) | Any provider | Free + model | 6.4M npm downloads a week | |
8 | Plugin runtime | DeepSeek | Yes (MIT) | Any, incl. local | Free + model | 282.9K GitHub stars in 3 months | |
9 | Build your own | Anthropic | Partly | Claude | Free + API | 19.5M npm downloads a week | |
10 | Agentic terminal | Warp | Yes (AGPL, client) | Many, own keys | Free; $20/mo | Nearly 1M active developers (Apr 2026) |
Key numbers
Claude Code is the biggest harness business: Anthropic said in February 2026 that it passed a $2.5B revenue run-rate.
Codex has the most published users: more than 5 million a week in June 2026, and the most npm downloads of any harness (26.4M a week).
Open-source personal agents get the most attention: OpenClaw (394.6K stars), DeepSeek Harness (282.9K) and Hermes Agent (264.2K) are the three most-starred harness repos on GitHub.
The harness can move a score by double digits: LangChain raised its agent from 52.8% to 66.5% on Terminal-Bench 2.0 by changing only the harness, with the model fixed.
But on the newest models, good harnesses converge: on the same open models, 8 of 11 harnesses on the Harness Leaderboard scored within about 3 points of each other.

What is an AI harness?
A language model on its own only turns text into more text. It can't open a file, run a test or remember yesterday. The harness is everything that lets it do those things. LangChain puts it most simply: “A harness is every piece of code, configuration, and execution logic that isn't the model itself” (LangChain).
Anthropic defines an agent harness as “the system that enables a model to act as an agent: it processes inputs, orchestrates tool calls, and returns results”, and adds: “When we evaluate ‘an agent,’ we're evaluating the harness and the model working together” (Anthropic). Philipp Schmid uses a computer analogy: the model is the CPU, the context window is the RAM, the harness is the operating system and the agent is the app.
What's inside an AI harness
The agent loop: call the model, run the tool it asks for, feed the result back, repeat until the task is done.
Instructions: the system prompt plus files like AGENTS.md or CLAUDE.md, skills and subagent prompts.
Tools: reading and editing files, a shell, a browser, web search and MCP servers.
A sandbox: a safe place to run code, often a container or a cloud VM.
Context management: compacting long sessions and taking notes so the model doesn't lose track.
Memory: what the agent keeps between sessions.
Permissions: what the agent may do on its own and what needs your OK.
Orchestration: subagents, handoffs and picking the right model for each step.
Hooks, checks and logs: tests and linters that verify the work, and traces of what the agent did and what it cost.
Harnesses differ a lot in size. Pi, by Mario Zechner, gives the model just four tools (read, write, edit and bash) and keeps its system prompt and tool definitions under 1,000 tokens. Claude Code is far bigger: when its source leaked in March 2026, it ran to about 512,000 lines of TypeScript.
AI harness vs agent, framework, SDK and MCP
Term | What it is | Examples |
|---|---|---|
Agent | The model and the harness working together | Claude Code running Claude |
Harness | Everything around the model that lets it act: loop, tools, memory, permissions | Claude Code, Codex, OpenCode, OpenClaw |
Agent framework | Building blocks for writing your own agent; its main value is abstractions (LangChain's Harrison Chase) | LangChain, CrewAI |
Agent runtime | Infrastructure that runs agents in production: durable state, retries | LangGraph, Temporal |
Agent SDK | A harness you can call from code | Claude Agent SDK, OpenAI Agents SDK |
Scaffolding | Older word for the layer around the model; now mostly used as a synonym | SWE-agent |
MCP | A standard for connecting tools and data to any harness | MCP servers for GitHub, Slack |
Context engineering | Choosing what goes into the model's context; one job a harness does | Compaction, memory files |
Two other things share the name. An evaluation harness runs benchmark tests on a model, such as EleutherAI's lm-evaluation-harness; that's what most “LLM harness” results on GitHub are. And Harness (harness.io) is a software delivery company; in October 2026 it bought Augment Code's assets.
Does the harness matter as much as the model?
It can, but less with the newest models. The evidence both ways:
For: LangChain took its agent from 52.8% to 66.5% on Terminal-Bench 2.0 with the same model, gpt-5.2-codex: “We only tweaked the harness and kept the model fixed”.
For: Epoch AI found that switching the scaffold changes SWE-bench Verified scores by up to 11 points for GPT-5 and 15 for Kimi K2 Thinking.
For: on Princeton's CORE-Bench Hard, Claude Opus 4.5 solved 77.8% of tasks in Claude Code but 42.2% in the benchmark's own agent.
Against: the Terminal-Bench team ran each lab's model in its own CLI and in a simple neutral harness, and found no significant difference (June 2026).
Against: Anthropic warns that leaderboard gaps under 3 points “deserve skepticism” because test setups alone can shift scores.
Anthropic's own advice is to keep harnesses light: “every component in a harness encodes an assumption about what the model can't do on its own”, and those assumptions can “quickly go stale as models improve”.
AI harnesses ranked by benchmark
The fairest harness comparison is the Harness Leaderboard by Joel Niklaus, launched in November 2026. It runs the same open-weight models in 11 harnesses with the same settings, three attempts per task, and treats results within the margin of error as ties.

On its combined score-and-cost view, Pi comes first, because it solves as much as the others for the lowest cost per task. OpenClaw comes last on every model: it's built to be a personal assistant in chat apps, not a coding agent.

Most other leaderboards rank a harness and a model together, which tells you which product works best but not which harness. The Artificial Analysis Coding Agent Index, checked November 17, 2026:
# | Harness | Model | Index score | Cost per task |
|---|---|---|---|---|
1 | Claude Code | Claude Fable 5.2 | 58.5 | $15.47 |
2 | Antigravity CLI | Gemini 4 Carbon | 55.5 | $7.13 |
3 | Muse Code | Muse Wonder Full | 54.5 | — |
4 | Codex | GPT-6 Astra | 53.1 | $7.63 |
5 | Kimi Code CLI | Kimi K3.1 Pro | 48.6 | $2.94 |
6 | Grok Build | Grok 4.7 | 41.6 | $15.35 |
7 | Mistral Vibe | Mistral Large 4 | 40.6 | $1.34 |
8 | OpenCode | GLM-5.3 | 40.1 | $5.41 |
On Terminal-Bench 2.0, the best result checked by the Terminal-Bench team is Codex CLI with GPT-5.5 at 82.2%. With the same model, harness choice moves scores by up to 18 points there, but many top entries were submitted by the harness makers and not re-run, and two agents were removed for cheating in April 2026.
The top 10 AI harnesses in detail
1. Claude Code
Anthropic's coding agent reads your code, edits files, runs commands and handles git, in the terminal, IDEs, a desktop app and the web.
Adoption: passed a $2.5B revenue run-rate in February 2026, with weekly users doubling since January 1. It has 156K GitHub stars on its issues repo and 18.2M npm downloads a week.
Models: Claude only, officially. Ollama documents running it with open models through an Anthropic-compatible API.
Benchmarks: first on the Artificial Analysis Coding Agent Index (58.5, with Claude Fable 5.2); tied third on the Harness Leaderboard with open models.
2026: its full source leaked through an npm source map on March 31.

2. Codex
OpenAI's coding agent runs in the terminal, a desktop app, IDEs and the cloud, and you sign in with a ChatGPT plan, including the free one. The CLI is open source.
Adoption: more than 5 million weekly users in June 2026, about 20% of them knowledge workers rather than developers; 26.4M npm downloads a week.
Models: OpenAI models; open models run locally with the --oss flag through Ollama or LM Studio.
Benchmarks: the top score verified by the Terminal-Bench team on Terminal-Bench 2.0 (82.2% with GPT-5.5).
2026: OpenAI now pitches the Codex harness as a platform others can build on: “That surrounding execution system is the harness”.
3. Cursor
Cursor is an AI code editor whose agent also runs headless as the Cursor CLI. It hosts models from many vendors in one subscription.
Adoption: about $4B in annualized revenue in June 2026 (reported).
2026: SpaceX completed its roughly $60B purchase of Cursor's maker, Anysphere, on August 14. Its cheapest $8 plan now offers only Grok models.
Harness work: Cursor tunes its harness for each model: “removing reasoning traces from GPT-5-Codex caused a 30% performance drop”.

4. OpenCode
The most popular open-source coding harness. It runs in the terminal, as a desktop app and on mobile, and works with almost any model: 200+ providers, local models included.
Adoption: 227.5K GitHub stars, the most of any coding harness; the company said in October 2026 that 16 million developers use it monthly.
Benchmarks: tied first on the Harness Leaderboard with open models (52.5%).
2026: a breach of its legacy Console exposed API keys stored by 1.4% of Console users in October; the open-source agent itself wasn't affected.

5. OpenClaw
OpenClaw is a self-hosted personal assistant: it runs on your own machine and works through WhatsApp, Telegram and other chat apps, clearing your inbox, sending emails and booking things.
Adoption: 394.6K GitHub stars, the most of any harness, and 3.2M npm downloads a week.
Models: any, including local ones. It's free, with no subscription or hosted tier.
2026: creator Peter Steinberger joined OpenAI in February, and OpenClaw moved to an independent foundation.

6. Hermes Agent
Nous Research's open-source personal agent learns new skills from experience and runs from the terminal, desktop apps and messaging apps.
Adoption: 264.2K GitHub stars since its launch in February 2026, one of the fastest-growing repos of the year.
Models: any, including local. Its docs say it needs at least 64,000 tokens of context, far above Ollama's default.
Benchmarks: tied third on the Harness Leaderboard (49.3%), well ahead of OpenClaw on coding.

7. Pi
Pi is a deliberately minimal coding harness: four tools, a tiny system prompt and no built-in MCP, made to be extended. Many other agents are built on top of it.
Adoption: 122.5K GitHub stars and 6.4M npm downloads a week.
Local models: the most-mentioned harness (49% of mentions) in a big Hacker News thread on replacing Claude or GPT with a local model, by Tom Tunguz's count.
2026: its creator joined Earendil, and Pi 1.0 shipped on October 1.

8. DeepSeek Harness
DeepSeek's open-source agent runtime, where the model, tools, sandbox and even the agent loop are swappable plugins. It comes with a desktop app and a local web UI.
Adoption: 282.9K GitHub stars in the three months since its August 13 launch, second only to OpenClaw.
Models: any, including local models through Ollama.
Status: still a preview (version 0.2); tied third on the Harness Leaderboard.

9. Claude Agent SDK
The Claude Code harness as a library: the same agent loop, tools and permissions, for building your own agents in Python or TypeScript. Anthropic calls it “a powerful, general-purpose agent harness”.
Adoption: 19.5M npm downloads a week, more than the Claude Code CLI itself, plus 9.5M on PyPI.
Models: Claude only. For a model-agnostic alternative, see the OpenAI Agents SDK or LangChain Deep Agents below.
10. Warp
Warp started as a terminal and is now an “agentic development environment” with its own coding agent, which can also run Claude Code, Codex and Gemini CLI side by side.
Adoption: “nearly a million active developers”, and its client became open source (AGPL) in April 2026, with OpenAI as a founding sponsor.
Models: frontier and open models, or your own API keys. Free, or $20 a month.
Best AI harness for…
Coding: Claude Code if you use Claude, Codex if you use ChatGPT; both lead the benchmarks with their own models. Our ranking of AI coding agents covers 75 coding tools in detail.
Any model (open source): OpenCode, which tied first on the Harness Leaderboard and works with 200+ providers.
Local models: OpenCode and Pi. OpenCode finds Ollama and LM Studio models on its own; Pi is the lightest and cheapest to run. Whatever you pick, raise the model's context window: Ollama's default of 2,000–4,000 tokens is too small for agent work.
A personal agent: OpenClaw or Hermes Agent if you want it free and on your own machine; Claude Duet, OpenAI Dots or Meta Muse if you want it managed.
A Mac desktop app: the Codex app, the Claude desktop app with Cowork, OpenCode Desktop, or Hermes Agent's macOS app.
Building your own agent: the Claude Agent SDK for Claude, the OpenAI Agents SDK or LangChain Deep Agents for any model, and Vercel's eve for durable agents on Vercel.
All 36 AI harnesses compared
GitHub stars and npm or PyPI downloads (last week) as of November 17, 2026. Downloads count installs, CI runs and updates, not people. * = an issues-only repo, not the source code.
Harness | Maker | Type | Open source | Models | Price | GitHub stars | Weekly downloads |
|---|---|---|---|---|---|---|---|
Claude Code | Anthropic | Coding CLI, IDE, desktop | No | Claude | Pro $20/mo | 156.0K* | 18.2M npm |
Codex | OpenAI | Coding CLI, desktop, cloud | Yes (Apache-2.0, CLI) | OpenAI; local via --oss | Free with ChatGPT | 135.7K | 26.4M npm |
Cursor | Anysphere (SpaceX) | Code editor and CLI | No | Many vendors | From $8/mo | — | — |
OpenCode | Anomaly | Coding CLI, desktop, mobile | Yes (MIT) | Any, incl. local | Free + model | 227.5K | 4.0M npm |
OpenClaw | OpenClaw Foundation | Personal agent | Yes (MIT) | Any, incl. local | Free + model | 394.6K | 3.2M npm |
Hermes Agent | Nous Research | Personal agent | Yes (MIT) | Any, incl. local | Free + model | 264.2K | PyPI |
Pi | Earendil (Mario Zechner) | Coding CLI and toolkit | Yes (MIT) | Any provider | Free + model | 122.5K | 6.4M npm |
DeepSeek Harness | DeepSeek | Agent runtime, desktop | Yes (MIT) | Any, incl. local | Free + model | 282.9K | 680K npm |
Claude Agent SDK | Anthropic | SDK | Partly | Claude | Free + API | 8.6K | 19.5M npm |
Warp | Warp | Agentic terminal | Yes (AGPL, client) | Many, own keys | Free; $20/mo | 66.0K | — |
Coding CLI | Yes (Apache-2.0) | Gemini | Enterprise only | 108.9K | 477K npm | ||
Desktop app and CLI | No | Gemini, Claude, GPT-OSS | Free tier | 2.9K* | — | ||
OpenHands | CLI, GUI, cloud, SDK | Yes (MIT) | Any | Free + model | 93.7K | — | |
Cline | Editor extension, CLI | Yes (Apache-2.0) | Any, incl. local | Free + model | 71.7K | 11M+ installs | |
Agentic AI Foundation | Desktop and CLI | Yes (Apache-2.0) | Any, incl. local | Free + model | 56.7K | — | |
Aider-AI | Coding CLI | Yes (Apache-2.0) | Any, incl. local | Free + model | 50.2K | 115K PyPI | |
GitHub | Coding CLI | No | Many vendors | Free; Pro $10/mo | 11.4K* | 1.7M npm | |
Factory | Coding CLI, desktop | No | Any, own keys | Free; Pro $20/mo | — | 36K npm | |
Amp | Coding CLI and apps | No | Any, own keys | Free; $20/mo | — | 25K npm | |
Kilo | Editor extension, CLI | Yes (MIT) | Any, incl. local | Free + model | 28.0K | 61K npm | |
Alibaba | Coding CLI | Yes (Apache-2.0) | Any, incl. local | Free + model | 30.7K | 150K npm | |
Charm | Coding CLI | Source-available | Any, incl. local | Free + model | 29.1K | 12K npm | |
Moonshot AI | Coding CLI | Yes (MIT) | Kimi, others | Free + model | 8.2K | 110K npm | |
Meta | Coding CLI | No | Muse Spark only | From $5/mo | — | — | |
AWS | Code editor and CLI | No | Hosted models | Free; Pro $20/mo | 4.5K* | — | |
Cognition | Code editor, cloud agents | No | — | — | — | — | |
Anthropic | Desktop app | No | Claude | Pro $20/mo | — | — | |
Anthropic | Personal agent | No | Claude | Pro $20/mo (US) | — | — | |
OpenAI | Personal agent | No | OpenAI | ChatGPT Pro | — | — | |
Meta | Personal agent | No | Muse Spark | Free; $20/mo | — | — | |
Manus | Cloud agent | No | Third-party | — | — | — | |
OpenAI | SDK | Yes (MIT) | Any | Free + model | 30.7K | 2.4M npm | |
OpenAI | SDK | Yes (Apache-2.0) | OpenAI | Free + model | in Codex | 2.4M npm | |
LangChain | SDK | Yes (MIT) | Any, incl. local | Free + model | 31.4K | 652K npm | |
SDK | Yes (Apache-2.0) | Any (Gemini-first) | Free + model | 22.2K | 447K npm | ||
Vercel | SDK | Yes (Apache-2.0) | Any via AI Gateway | Free + model | 5.9K | 2.3M npm |
Left out: Roo Code, which shut down on May 15, 2026; Windsurf, now Devin Desktop; and Moonshot's old Kimi CLI, replaced by Kimi Code CLI. Gemini CLI stopped serving consumer accounts on June 18, 2026, when Google moved them to Antigravity CLI.
What is harness engineering?
Harness engineering means improving the agent by improving everything around the model: instructions, tools, checks and feedback. Mitchell Hashimoto, co-founder of HashiCorp, described it in February 2026: “anytime you find an agent makes a mistake, you take the time to engineer a solution such that the agent never makes that mistake again” (Mitchell Hashimoto).
OpenAI described building a product with “0 lines of manually-written code”: its engineers designed the environment and Codex wrote the code (OpenAI, February 2026).
LangChain: “Harness Engineering is about systems, you're building tooling around the model to optimize goals like task performance, token efficiency, latency”.
Anthropic splits long tasks across a planner, a generator and an evaluator, and removes pieces as models improve.
Cursor: “harness engineering has always been important for agent success, it's only going to be more critical going forward”.
Thoughtworks made “harness engineering at scale” a theme of its Technology Radar in November 2026, calling the harness “a product in its own right”.
Researchers now automate it: Stanford's Meta-Harness has an agent search for better harness code, and Shanghai AI Laboratory's Self-Harness lets an agent improve its own harness.
What happened to AI harnesses in 2026
February: “harness engineering” took off in two weeks, with posts from Mitchell Hashimoto, OpenAI and LangChain. Peter Steinberger, OpenClaw's creator, joined OpenAI.
March 31: Claude Code's source leaked through a source map in an npm release.
May–June: Roo Code shut down, and Google replaced Gemini CLI with Antigravity CLI for consumers.
August: DeepSeek open-sourced DeepSeek Harness, SpaceX closed its purchase of Cursor, and Meta launched Muse Code.
September–October: personal agents arrived from the big labs: Meta Muse, OpenAI Dots and Claude Duet. Pi reached 1.0.
November: the Harness Leaderboard launched as the first neutral harness-only benchmark.
FAQ
What is an AI harness?
The software around an AI model that turns it into an agent: the loop that calls the model, the tools it can use, its memory and the rules on what it may do. Agent = model + harness.
What is a harness in AI agents?
The part of the agent that isn't the model. It runs the model in a loop, executes the tools it asks for (files, shell, browser, MCP servers), manages its context and memory, and asks you before risky actions.
Is Claude Code a harness?
Yes. Claude Code is Anthropic's harness for Claude, and the Claude Agent SDK packages the same harness for developers. Codex, Cursor, OpenCode and OpenClaw are harnesses too.
What is the difference between an agent harness and an agent framework?
A harness is a ready-to-run agent minus the model, with tools, memory and permissions built in. A framework such as LangChain gives you building blocks to write your own agent.
What is the best AI harness?
For coding, Claude Code (with Claude) and Codex (with OpenAI models) lead on adoption and benchmarks. OpenCode is the best open-source harness for any model, and OpenClaw and Hermes Agent are the most popular personal agents.
What is the best open-source agent harness?
OpenCode for coding: 227.5K GitHub stars, any model, and tied first on the Harness Leaderboard. For a personal agent, OpenClaw and Hermes Agent; for building your own, LangChain Deep Agents or the OpenAI Agents SDK.
What is the best AI harness for local LLMs?
OpenCode and Pi are the most used with local models. Give the model a large enough context window (Hermes Agent's docs ask for at least 64,000 tokens), since Ollama's default is far smaller.
Can I use Claude Code with other models?
Not officially: Claude Code is built for Claude. Ollama documents a way to run it with open models through an Anthropic-compatible API; for full model choice, use OpenCode, Pi or Cline.
What is harness engineering?
Improving an agent by changing everything around the model (instructions, tools, checks, feedback) rather than the model itself. The term spread in February 2026 through posts by Mitchell Hashimoto, OpenAI and LangChain.
How this list was built
The list: 36 harnesses: coding agents, personal agents and SDKs that wrap a model into a working agent. We left out pure frameworks, and tools that are dead or renamed.
The ranking: by adoption, using revenue and weekly users where the maker publishes them, then GitHub stars and weekly downloads. Benchmarks are shown separately, because most rank a harness and a model together.
The facts: checked on November 17, 2026: GitHub stars from the GitHub API, downloads from npm and PyPI, prices and models from each maker's site and docs, and usage figures from the makers' own posts or the press (marked “reported”). Benchmarks from the Harness Leaderboard, Artificial Analysis and Terminal-Bench.
Selling to AI companies?
LeadWave's list of AI companies covers 9,000 AI companies with CEO details, including the makers of every harness on this page. See also the best AI coding agents, the best LLMs that run inside these harnesses, our list of AI labs and the SaaS trends for 2027.
About this list
Compiled by LeadWave from the makers' sites, GitHub, npm and public benchmarks, checked November 17, 2026.



