Harness Engineering 精读笔记
基于 2025.11 — 2026.03 期间 Anthropic、OpenAI、LangChain、Google DeepMind、Stanford 发布的九篇核心文章的精读整理。 目标:理解 Harness Engineering 是什么,以及大公司和学术机构在实践中做了哪些探索。 一、什么是 Harness Engineering? 1.1 Harness 的定义 LangChain 给出了最清晰的公式化定义: Agent = Model + Harness “If you’re not the model, you’re the harness.” “A harness is every piece of code, configuration, and execution logic that isn’t the model itself.” 具体来说,Harness 包括: System Prompts — 系统提示词,定义 Agent 的行为边界 Tools / Skills / MCPs — 工具集及其描述(文件读写、代码执行、浏览器操作等) Bundled Infrastructure — 捆绑基础设施(文件系统、沙箱、浏览器) Orchestration Logic — 编排逻辑(子 Agent 派生、任务交接、模型路由) Hooks / Middleware — 确定性执行逻辑(压缩、续行、lint 检查等) Anthropic 不给 Harness 下抽象定义,而是通过实践来展示:他们用 “harness design” 和 “harnesses for long-running agents” 来描述围绕 Agent 执行循环的编排层。Anthropic 在博客中明确说:“harness design is key to performance at the frontier of agentic coding”。 ...