# Agent Harness

> **TL;DR.** An agent harness is the middleware between a large language model and the real world — code that runs the agent loop, calls tools, manages memory, enforces guardrails, and recovers from errors.

- **Category:** AI / Developer Tools / Infrastructure
- **Stage:** rising
- **Age:** 112 days
- **Origin date:** 2026-02-11
- **First detected:** 2026-04-16
- **Canonical URL:** https://earlyterms.com/term/agent-harness
- **Sources:** 9 primary URLs

## Definition

An agent harness is the middleware between a large language model and the real world — code that runs the agent loop, calls tools, manages memory, enforces guardrails, and recovers from errors. Practitioners now quote a single formula: "Agent = Model + Harness. If you're not the model, you're the harness."

The term crystallized through [OpenAI's Feb 11, 2026 Harness Engineering post](https://openai.com/index/harness-engineering/) (three engineers shipped ~1M lines of Codex-generated production code in five months), [LangChain's Anatomy of an Agent Harness](https://www.langchain.com/blog/the-anatomy-of-an-agent-harness), and Birgitta Böckeler's Martin Fowler piece. By mid-April a Show HN wave (OpenRig, Gambit, [OpenHarness](https://github.com/HKUDS/OpenHarness)) was pitching harnesses, not frameworks.

## Example

[HKUDS/OpenHarness](https://github.com/HKUDS/OpenHarness) (10.2k stars, MIT) ships 43+ tools, persistent memory, multi-level permissions, and a loop engine that routes to Claude, GPT, Codex, Kimi, or any OpenAI-compatible endpoint — users wire it to Slack/Telegram and get a personal agent that writes code and opens PRs.

## Analogy

The model is the horse; the harness is the reins, the bit, and the cart — everything that turns raw power into useful work.

## Why it's emerging now

Between Feb and April 2026, OpenAI, LangChain, Anthropic, and Martin Fowler all published canonical posts using "agent harness" as a noun. OpenAI's Harness Engineering post (1M lines via Codex, 3 engineers, 5 months) supplied the naming event; a Show HN wave claimed the label; Böckeler's Fowler piece carried it into the consulting-partner audience.

## Related terms

- *competitor:* Managed Agents
- *competitor:* LangGraph
- *competitor:* CrewAI
- *competitor:* agent framework
- *child:* Hermes Agent
- *child:* OpenHarness
- *child:* Claude Code
- *related:* harness engineering
- *related:* agent loop
- *related:* Claude Agent SDK
- *related:* context engineering
- *related:* spec-driven development

## Sources

1. [OpenAI — Harness engineering: leveraging Codex in an agent-first world](https://openai.com/index/harness-engineering/)
2. [LangChain — The Anatomy of an Agent Harness (Vivek Trivedy)](https://www.langchain.com/blog/the-anatomy-of-an-agent-harness)
3. [Anthropic — Effective harnesses for long-running agents](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents)
4. [Martin Fowler — Harness engineering for coding agent users (Birgitta Böckeler)](https://martinfowler.com/articles/harness-engineering.html)
5. [HumanLayer — Skill Issue: Harness Engineering for Coding Agents](https://www.humanlayer.dev/blog/skill-issue-harness-engineering-for-coding-agents)
6. [Daily Dose of DS — The Anatomy of an Agent Harness (Avi Chawla)](https://blog.dailydoseofds.com/p/the-anatomy-of-an-agent-harness)
7. [HKUDS/OpenHarness on GitHub](https://github.com/HKUDS/OpenHarness)
8. [Show HN: Gambit — open-source agent harness](https://news.ycombinator.com/item?id=46641362)
9. [InfoQ — OpenAI Introduces Harness Engineering](https://www.infoq.com/news/2026/02/openai-harness-engineering-codex/)

---
_Generated by EarlyTerms · https://earlyterms.com/term/agent-harness_
