Harness Engineering
From Using AI to Controlling AI
Harness Engineering tutorial | AGENTS.md design · hooks implementation · AI agent operations
Overview
Harness Engineering, mapped across the 5 interpretations from OpenAI, Anthropic, LangChain, Martin Fowler, and academia. The first systematic guide that distills the 6 building blocks, the AGENTS.md/CLAUDE.md/hooks implementation patterns, and Self-Evolving Agents — the practical reference for the 2026 keyword.
What you will be able to do
- Decompose any harness into the 6 building blocks framework
- Choose between AGENTS.md, CLAUDE.md, and hooks for each task
- Compare interpretations from OpenAI Codex, Anthropic, LangChain, Martin Fowler, and academia in one place
- Implement Self-Evolving Agent patterns (self-improving harness)
- Place tools like Vibe Coding, Spec Coding, and Agent Frameworks on a clear technology map
Who is this book for
- [AI Agent Developer] Want the systematic view of harness as the 2026 keyword
- [Claude Code User] Ready for the layer above CLAUDE.md
- [Tech Lead] Designing AI agent ops across an entire team
- [Researcher] Comparing OpenAI, Anthropic, and LangChain interpretations side-by-side
- [Self-Evolving Curious] Looking to build self-improving agents
- [Tool Picker] Mapping Vibe Coding, Spec Coding, and Agent Frameworks
Problems this book solves
- I hear 'Harness Engineering' a lot but can't actually explain what it is
- OpenAI and Anthropic seem to define it differently
- The line between AGENTS.md and CLAUDE.md feels blurry
- I don't know when to reach for hooks
- Self-Evolving Agent design patterns aren't clear to me
- The boundary between harness and Agent Frameworks (LangChain etc.) is murky
Where this book stands
- Cross-vendor (5 interpretations compared in one book — first of its kind)
- Implementation-focused (not just theory — concrete AGENTS.md / hooks examples)
- Intermediate to advanced (Claude Code / CLAUDE.md basics assumed)
- Harness-specific (single topic, 19 chapters of depth)
Why this book
- First book to integrate the 5 interpretations from OpenAI, Anthropic, LangChain, Martin Fowler, and academia
- Six-building-block framework for systematizing 'what is harness?'
- Goes all the way to Self-Evolving Agents (self-improving harness) and future predictions
- Real implementation patterns for AGENTS.md / CLAUDE.md / hooks with concrete examples
- Built on a Zenn article that drew 12,000 views — this is the full-fledged version
How this differs from other AI books
| Compared to | This book's difference |
|---|---|
| Vendor docs (OpenAI / Anthropic / LangChain) | Not single-vendor view. This integrates 5 interpretations and explains why they disagree. |
| Prompt / Context Engineering books | Tackles the layer above prompt and context — the third tier of the stack. |
| Agent Framework guides (LangChain Agents etc.) | Not framework-specific. Maps the boundary between harness and Agent Frameworks. |
Table of contents
- 01 Preface — Why 'Harness' now Free preview
- 02 The Three Engineerings (Prompt → Context → Harness) Free preview
- 03 Harness Engineering: Definition and Big Picture Free preview
- 04 OpenAI's Take — Codex and the million-line experiment
- 05 Anthropic's Take — Harness for long-running agents
- 06 LangChain's Take — Agent = Model + Harness
- 07 Martin Fowler's View — The implicit harness in every codebase
- 08 The Academic View — arXiv papers and formal specification
- 09 The Six Building Blocks — Anatomy of a harness Free preview
- 10 Technology Map — Vibe Coding / Spec Coding / Agent Framework
- 11 Reconciling the Differences — What everyone agrees and disagrees on
- 12 AGENTS.md / CLAUDE.md Practical Design
- 13 Hooks / Lifecycle / Feedback Loops
- 14 Self-Evolving Agent — A harness that improves itself
- 15 The Future of Harness Engineering
- 16 Afterword
- 17 References Free preview
- 18 About the Author Free preview
- 19 Colophon Free preview
The phrase Harness Engineering is everywhere, and means something different to everyone. OpenAI talks about scaling Codex. Anthropic talks about long-running agents. LangChain frames it as Agent = Model + Harness. Martin Fowler points out that every codebase already has an implicit harness.
Each of them is right. But until now, no book has stitched these views into a single system.
This book maps what a harness is, how to design one, and how to operate it. It synthesizes the 5 interpretations into 6 building blocks, then walks through implementation with AGENTS.md, CLAUDE.md, and hooks, all the way to Self-Evolving Agents.
“Prompt was 2024. Context was 2025. Harness is 2026.”
Related books
Dive deeper with related articles
Read on Kindle
Available on Kindle Unlimited
Buy on Kindle