Agent harness
An agent harness is the software infrastructure surrounding a large language model (LLM) that enables it to operate as an AI agent: it manages tool use, memory, state persistence, execution environments and feedback loops, as opposed to the model's own reasoning.[1] A shorthand popularised in 2026 expresses the relationship as Agent = Model + Harness.[2]
Because an LLM is stateless and, unaided, produces only text, the harness is what allows a model to take actions over multiple steps, use external tools, and sustain a long-running task across sessions. Rather than repeatedly re-reading an ever-growing transcript inside the context window, a harness can offload record-keeping into a structured software environment that manages the agent's state.[1] A minimal harness is unnecessary for a single prompt-and-response exchange, but becomes important as tasks grow multi-step, tool-oriented, or long-running.[3]
Architecture
The mechanisms that a harness coordinates predate the term. The pattern of a model alternating between reasoning and acting in a loop was introduced in the peer-reviewed ReAct framework,[4] and the ability of a model to call external tools was demonstrated in Toolformer.[5]
Components commonly grouped under a harness include tool dispatch, memory and state persistence, an isolated sandbox or workspace, context management, and guardrails such as scoped permissions, approval tiers and monitoring. In a 2026 engineering write-up, Anthropic described a worked example built from an initialiser agent that prepares the environment and a coding agent that repeatedly selects the next unfinished task, commits, and updates a progress record before stopping.[6]
Birgitta Böckeler of Thoughtworks distinguishes an inner harness shipped by the model's builder (for example an agent SDK or a coding tool such as Cursor or Codex) from an outer harness that the user assembles on top, such as instruction files, Model Context Protocol servers and custom skills. She further separates guides, which steer the agent before it acts, from sensors, which observe the result and let the agent self-correct; each may be computational (deterministic checks such as linters or tests) or inferential (semantic checks such as an "LLM as judge").[2]
History and terminology
Related notions of scaffolding around a model exist in software testing (the test harness), in LLM benchmarking (evaluation harnesses), and, in reinforcement learning, in the environment and wrapper that surround a learning agent.[2] The nouns agent harness and LLM harness circulated among practitioners before the associated discipline was named.
The vocabulary of "harness engineering" emerged in early 2026, and attribution of the specific phrase is contested. Several accounts trace it to a February 2026 blog post by Mitchell Hashimoto, co-founder of HashiCorp, who described a practice of engineering a permanent fix into an agent's environment each time it makes a mistake;[2] other accounts credit Vivek Trivedy of LangChain, whose "Anatomy of an Agent Harness" post derived the harness components from the Agent = Model + Harness formula.[7] A widely cited OpenAI engineering report describing a large codebase built largely by coding agents, together with follow-on writing from Thoughtworks, LangChain and Anthropic, helped spread the term.[2][6]
By mid-2026 the harness had become an object of academic study. Independent reporting described research such as Self-Harness, in which an agent iteratively mines its own failures to propose and validate changes to its harness,[3] and Harness-1, an open-source search agent that improved retrieval accuracy chiefly by redesigning the software environment around the model rather than by enlarging the model.[1]
Relationship to prompt and context engineering
Harness engineering is often positioned as a broader layer than prompt engineering, which optimises a single interaction, or context engineering, which governs what information the model sees at a given moment; in this framing the harness designs the whole operational environment and contains the other two as parts.[2] A distinguishing feature is that the component being wrapped is non-deterministic, so a harness is designed to recover gracefully when the model fabricates an action or reports a task as finished when it is not.[3]
See also
References
- ^ a b c Nuñez, Michael (8 June 2026). "Researchers trained an open source AI search agent, Harness-1, that outperforms GPT-5.4 on recalling relevant information". VentureBeat. Retrieved 13 July 2026.
- ^ a b c d e f Böckeler, Birgitta (2 April 2026). "Harness engineering for coding agent users". martinfowler.com.
- ^ a b c Ramachandran, Sri Krishna (June 2026). "Researchers introduce Self-Harness, a framework that lets AI agents rewrite their own rules". VentureBeat. Retrieved 13 July 2026.
- ^ Yao, Shunyu; Zhao, Jeffrey; Yu, Dian; Du, Nan; Shafran, Izhak; Narasimhan, Karthik; Cao, Yuan (2023). ReAct: Synergizing Reasoning and Acting in Language Models. International Conference on Learning Representations (ICLR).
- ^ Schick, Timo; Dwivedi-Yu, Jane; Dessì, Roberto; Raileanu, Roberta; Lomeli, Maria; Zettlemoyer, Luke; Cancedda, Nicola; Scialom, Thomas (2023). Toolformer: Language Models Can Teach Themselves to Use Tools. Advances in Neural Information Processing Systems (NeurIPS).
- ^ a b "Effective harnesses for long-running agents". Anthropic Engineering. Anthropic. 2026.
- ^ Osmani, Addy (15 May 2026). "Agent Harness Engineering". O'Reilly Radar. O'Reilly Media.
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.