- Type
- Software architecture component
- Common formula
- Agent = Model + Harness
- Typical components
- System prompts, tools and MCP servers, memory, sandbox, orchestration loop, hooks, guardrails, observability
- Emerged
- Term popularised 2025–2026
- Examples
- Claude Code, Cursor, Codex CLI, Cline, Aider, Claude Agent SDK
- Related
- Agentic AI, AI Agents, Tool Use, Context Engineering
- Type
- Software architecture component
- Common formula
- Agent = Model + Harness
- Typical components
- System prompts, tools and MCP servers, memory, sandbox, orchestration loop, hooks, guardrails, observability
- Emerged
- Term popularised 2025–2026
- Examples
- Claude Code, Cursor, Codex CLI, Cline, Aider, Claude Agent SDK
- Related
- Agentic AI, AI Agents, Tool Use, Context Engineering
An agent harness is everything around the model in an AI agent: the loop that calls it, the tools it may invoke, the environment where actions execute, the memory and context that accumulate, and the rules and observability that keep the whole thing controllable. The shorthand practitioners use is Agent = Model + Harness — a raw model answers prompts; it becomes an agent only once a harness gives it state, execution and feedback loops.[1][2]
Background
The term spread through practitioner writing in 2025 and 2026 as teams discovered that model choice alone did not determine how well an agent performed. LangChain's anatomy-of-an-agent-harness framing, Databricks' explainer, Anthropic's engineering work on harnesses for long-running agents and managed-agent architectures, and Martin Fowler's "harness engineering" writing all converged on the same observation: with the underlying model held constant, behaviour differences come from the harness.[1][3][4]
Anthropic's own descriptions split the system into a session (an append-only log of what happened), a harness (the loop that calls the model and routes its tool calls to infrastructure) and a sandbox (where code actually runs) — a decomposition that lets the model provider decouple "the brain from the hands".[2] By 2026, agent harnesses had become a product category in their own right, sold as SDKs (Claude Agent SDK, Codex SDK, OpenAI Agents SDK) that ship the loop, tools and context management out of the box.[4]
Key Concepts
- Inner vs outer harness — the product supplies a base harness (system prompt, built-in tools, retrieval); users add an outer layer: project instructions, skills, hooks, lint and test gates tuned to their own workflow.[4]
- Orchestration — subagent spawning, handoffs between agents, and model routing (cheap models for triage, frontier models for hard steps).[1]
- Execution environment — filesystem, terminal, browser and sandboxes; what an agent may touch is defined here, which makes the harness the natural place for permission checks.[2]
- Feedback and verification — tests, linters, screenshots and structured results fed back to the model so it can self-correct before a human reviews the work.[4]
- Hooks and middleware — deterministic code around the loop (compaction, continuation, budget limits, content filters) that runs regardless of what the model decides.[3]
- Observability — traces, tool-call logs, token and cost metering; without them a failing agent cannot be diagnosed.[1]
- Natural-language harnesses — an emerging variant in which agent behaviour is configured by plain-language instructions interpreted by a shared runtime instead of hand-written configuration code.[1]
Applications and Impact
Most recognisable coding tools are harnesses built around someone else's model: Claude Code, Cursor, Codex, Cline, Aider and Replit Agent differ far more in loop design, context management and verification than in the models they call.[4] The same pattern governs enterprise agents in support, security and operations. Two consequences follow: harness quality is now a competitive moat that survives model switching, and harness engineering — choosing what the agent can see, do and be judged by — has become a distinct skill alongside prompt engineering.[4] Practitioners describe the frontier as agents that analyse their own traces to fix harness-level failures, and harnesses that assemble tools and context just in time for each task.[3]
>See Also
🇲🇾 Relevance to Malaysia: harnesses are the practical entry point for Malaysian developers and enterprises building on AI. A local team does not need to train a model to ship an agent that works on its own systems — it needs a harness with the right tools, Malay- and English-language context, and permission boundaries, and most of that work is engineering rather than research.[5]
This matters for adoption policy: MDEC and the National AI Office's guidance emphasises controlled, auditable AI systems, and the harness is where those controls are actually implemented — scoped credentials, approval gates for irreversible actions, and logging that satisfies the Personal Data Protection Act and sector rules such as Bank Negara Malaysia's expectations for financial services.[5] Data residency also depends on harness design, since the harness decides where context is fetched from and where tool calls execute. Local capability-building — HRD Corp-funded training, university programmes and community groups working with agent SDKs and open-weight models — increasingly treats harness configuration and evaluation as the skill employers look for.[5]
References
- ↑Databricks. What is an AI Agent Harness? https://www.databricks.com/blog/ai-harness
- ↑Anthropic. Effective harnesses for long-running agents; Scaling Managed Agents: Decoupling the brain from the hands. https://www.anthropic.com/research/effective-harnesses-for-long-running-agents
- ↑Fowler, M. Harness engineering for coding agent users. https://martinfowler.com/articles/harness-engineering.html
- ↑Osmani, A. Agent Harness Engineering. https://addyosmani.com/blog/agent-harness-engineering/
- ↑MDEC / National AI Office. (2026). Malaysia AI adoption and governance guidance. https://www.mdec.my/