术语演变与 Harness 架构解构
从生成式 AI 的发展脉络来看,行业角色与核心概念经历了一场深刻的重构:2023 年初,提示词工程(Prompt Engineering: 编写和优化输入指令以引导大模型输出期望结果的技术)曾是最炙手可热的岗位;到 2025 年中,这一角色演化为上下文工程(Context Engineering: 通过程序化方式动态整合并向模型输入最精准上下文的技术);而直到今年初,整个行业才正式确立了 Agent Harness(智能体脚手架/运行载体: 包裹在模型外部、负责连接真实世界并控制其行为的系统框架)以及相应的 Harness 工程体系。从架构本质而言,Harness 扮演着模型的眼睛与双手——它负责引导模型走向,通过应用程序接收用户意图,并将底层模型与操作系统、外部计算环境以及各类 MCP(Model Context Protocol: 模型上下文协议,连接第三方服务与数据源的标准化通信协议)第三方服务无缝接入。
在技术架构划分上,完整的 Harness 可清晰地拆解为两大核心层级:
- 运行时层(Runtime Layer):整个 Harness 的工程地基。它严格控制 Agent 核心循环的执行环境、运行状态的持久化存储以及任务的中断恢复机制。这部分的工程构筑与传统软件工程的底层系统建设高度一致。
- 上下文与编排层(Context and Orchestration Layer):行业中最常讨论且变化极为剧烈的部分。该层级负责动态决策何时调用特定模型、精准注入何种上下文信息(涵盖提示词、工具集、内存压缩策略),并包含大量用于纠正模型不良行为的专有工程技巧。
今年年初,整个生态一度迎来了 Harness 的狂热巅峰:Cursor 曾发布通过名为 Grind Swarm 的长周期多模态 Harness 从零构建完整浏览器的案例,该架构编排调度了庞大的多智能体与物理机器集群,算力开销极其惊人,甚至在实机演示期间多次导致服务过载。
英文原文
My name is Jedidiah and I joined Cursor early in 2025 as the longest tenured engineer working on our agent harness and recently I came along to SpaceX as part of the acquisition of Cursor. So, today I want to talk to you all about how the agent harness has evolved to where we are today and where I think things are going. And there's a motivating question that I have for us to answer today, which is is the agent harness dead? So, let's get started.
Here's a more natural and flowing version of that script which reads like a cohesive conference talk rather than a series of short points. Oops. Just making sure everyone's still got their soft detectors on before lunch. Um no, for real. So, the story starts in early 2023 when prompt engineer was the hottest title out there. By mid-2025, that had evolved to context engineer, someone who programmatically puts the best context for the model together on the fly. And then only at the beginning of this year did the industry land on the term agent harness and harness engineering to describe work that my team and I have been doing for a while.
So, what's in an agent harness? The harness is like the eyes and the hands for the model. It wraps around the model, steers it, and connects it to the world. Users connect to our harness through apps and then the harness connects the model to computers and also to third-party services like MCPs.
I like to divide the harness into two layers, the runtime and the context and orchestration layers. The runtime is kind of like the foundation of the harness. It controls where the core agent loop runs and how state is stored so that work can resume. Building this foundation is a lot like traditional software engineering. And then, the context and orchestration layers are kind of like the wild west. This is what a lot of people refer to when they talk about the harness. These parts of the harness control which models are called when and what context they see. That includes things like prompts and tools, of course, but also memory compaction and a bunch of tricks you might not know that we do to make the agent behave in the way that we want. So, this is the area that I primarily work in.
In the new year, we kind of hit peak harness. Cursor announced that we had created a browser entirely from scratch using a new long-running harness called Grind Swarm. This was a multimodal harness that orchestrated a lot of agents and a lot of machines and it was very expensive to run. It actually took down Cursor maybe once or twice to get this demo.
模型进化与代码能力平庸化:Harness 的消亡假说
在经历 Harness 的巅峰期后,业界迅速掀起了一股“Harness 已死”的反思思潮。Anthropic 的工程师 Tariq 曾公开表示他们在 Claude Code 中大幅精简乃至剔除了大量原本复杂的系统提示词;Y Combinator 的 Garry Tan 亦断言复杂的 Harness 将逐渐淡出舞台,未来唯有轻量化的 Skills 具有核心价值。即便是 Cursor 团队自身,也逐步剥离了早期为了修补基础模型智力短板而设置的大量硬性防护栏——例如过去为了准确应用文件代码修改而额外调用的轻量代码专用模型,以及硬编码在提示词中指导模型如何检索代码库、如何自我校验的繁琐指令。
多项严谨的基准评估也为这一趋势提供了量化支撑:
- SWE-bench Light 基准测试:加州大学伯克利分校(UC Berkeley)针对七大前沿模型在不同 Harness(包括 Pi、Codex、Claude Code)下的表现进行了全面横评。结果表明,在最新一代更聪明的模型加持下,底层 Harness 的复杂程度与测试得分之间已不存在显著的统计学差异。
- MLE-bench 评估实验:来自苹果公司(Apple)与洛桑联邦理工学院(EPFL)的联合研究同样揭示,专为机器学习工程打造的专用 MLE Harness 并未对基准测试结果带来实质性的提升。
这些事实清晰地证明:在当前技术阶段,复杂的 Harness 已不再为编码任务注入额外的纯模型智力。过去人类工程师在 Harness 中精心设计的“思维补丁”——教导模型如何分步探索大型代码库、如何通过持久循环长时间坚守任务、如何执行单元测试以验证交付结果——如今已被前沿大模型的原生权重与推理链路完整吸收内化。
英文原文
Now, like anything in the world of agents, it only took a few months of peak harness for people online to start saying that the harness was dead. Tariq from Anthropic talked about how they had killed much of the system prompt from Claude Code. Garry Tan from YC thought that the harness would fade away and only skills would matter. Even myself and my colleague Stefan, we wrote about how we had removed all these guardrails that we had in cursor to patch over gaps in the model's intelligence. We used to have things like a small model just to apply code edits to a file because the frontier models weren't good at this. We also had all sorts of coding specific instructions like how to explore the codebase and how to check your work.
So, if all these people are saying the harness is dead, they were saying that smarter models are what killed it. And there's a lot of evidence for that. I want you all to think about a very simple harness where the model only has access to the shell and to all of my secrets. Please don't screenshot this slide by the way. This one's off limits. So, who here thinks that this really simple harness would do just as well on coding evals as a more sophisticated one? Maybe some hands who thinks it would? Raise your hand if you think it would. A few hands, but most of you know.
So, a few recent studies tried to investigate exactly that question. The first one out of UC Berkeley tried seven different frontier models on a series of harnesses including Pi, Codex, and Cloud Code. And what they found, particularly on the newer smarter models, is that the choice of harness did not actually make a difference significantly in the score on SweetBench light. And then another study from Apple and EPFL found similarly that a dedicated MLE harness did not make a big difference on MLEBench.
So, what is going on here? Is it actually true that the harness is dead? Are they right? Here's what I think that the evidence shows. A fancy harness in this day and age, no longer adds coding intelligence. I think that is true. I know that's surprising. But, these things that we used to do in the harness to patch over gaps in the raw coding muscle memory of the model, like teaching it how to explore the code base, how to work persistently for very long time with things like slash goal, how to run tests to check your work. The model has natively absorbed these skills.
数据飞轮效应:旧 Harness 的自我消解机制
为什么旧式专注于补全模型智力的 Harness 会不可避免地走向自我消亡?这源于系统层面的数据飞轮(Data Flywheel: 技术工具降低高难度任务门槛,产生高质量交互数据反哺基础模型,从而使工具本身被模型替代的正向反馈循环)。这种演进遵循着高度确定性的因果链条:
- 拓宽解决边界:在特定历史阶段,工程团队构建高度复杂的 Harness 与规则补丁,使模型能够勉强胜任原本无法独立完成的硬核编程任务;
- 释放用户生产力:更广阔的能力边界吸引了海量真实开发者在日常工程中深度使用 Agent 解决复杂代码问题;
- 高质量数据回流:海量用户在复杂任务中的探索轨迹与修复记录回流至各前沿 AI 实验室;
- 模型原生吸收能力:各大前沿实验室通过后训练(Post-training)与强化学习将这些工作范式完整内化为基础模型的原生直觉;
- 脚手架冗余淘汰:最终,模型在脱离复杂约束的情况下依然能高效完成任务,原先 Harness 中用于维系这些任务的冗余逻辑和外挂补丁便可被安全删除。
由此可见,Harness 在特定领域内的消亡并非技术的退步,而是其成功履行历史使命的必然结果。然而,这绝不意味着 Harness 本身失去了存在价值——当纯粹的基础编码能力被模型彻底平庸化(Commoditized)后,Harness 必须且正在承担起全新的战略使命:开拓模型尚未征服的下一代未知任务前沿,并承担起大模型无法独立内化的生产级基础设施与工程底座。
英文原文
So, why is this happening? It turns out the harness is actually making itself obsolete through what I call the data flywheel. So, in this process, the harness brings harder and harder coding tasks within reach. At that point, more users can productively attempt those tasks with agents. That means more coding data is shared with the labs. And eventually the models learn natively how to do these skills as well. Eventually, the models get so good that the harness can actually delete the things it needed to do to make those tasks work in the first place. It's a very interesting process.
So, that's how you get people saying that the harness is dead. And if the models are good enough to code well in any harness, then why should you care? Does it really matter which harness you use? Is the harness really dead? I say no, and there's two reasons why. First of all, and I'm going to go into both these points, the harness actually opens the new frontier of tasks for the model to solve. And then, second, there are some tasks or some parts of the harness, especially outside the context layer, which the model cannot absorb.
开辟未知前沿:从 GrokBot 架构看第二曲线
当单一的代码生成逐渐标准化,新一代产品如 GrokBot 正在展示 Harness 的破局之路。GrokBot 被定义为一个全自动化的协作数字同事,其覆盖范围已远远跨越了传统的代码补写,拓展到了全维度的复合型知识工作。其底层的 Harness 彻底摒弃了传统的“单次短对话”范式,转向由长期驻留的协调智能体(Coordinator Bot)统领离散工作智能体集群(Fleet of Worker Agents)的编排架构。其分工协作类似于资深合伙人律师负责与客户高层直接对接、把控整体战略方向,而将具体的法律调研与案头文书分发给一众初级律师团队执行。
极为耐人寻味的是:在 Cursor 的后期演进中,工程团队一直在持续删除 Harness 层的提示词与规则栏;但在开发 GrokBot 时,团队却反向大量重新引入了严密的提示词约束与行为护栏。其根本原因在于,在这个全新的交互范畴中,模型在面对现实复杂协作时暴露出海量未经锤炼的新型缺陷:
- 复合网页交互流:自主协调制作完整的演示文稿(Slide Decks)或处理跨平台的商务差旅预订;
- 非侵入式进度通报:智能体必须具备高维度的自我汇报纪律,在保持异步前行的同时向人类透明反馈关键进展,避免信息轰炸;
- 行动与询问的边界博弈(Acting vs. Asking):在涉及给真实同事发送电子邮件等高风险行为时,自主决断在何种阈值下应主动执行、何种情况下必须挂起确认;
- 跨周期记忆网络(Long-term Memory):持续感知并内化特定人类用户的隐性协作偏好与组织惯例。
这些挑战补齐了数据飞轮的最后一环:一旦模型平庸化了上一代核心能力(如纯粹的局部编码),唯有依靠新型 Harness 构建脚手架,才能带领模型强行涉足尚未被数据充分覆盖的高难度新任务,进而重新引爆新一轮的数据积累与能力内化循环。在全生命周期的软件开发中,资深工程师的核心时间原本就极少消耗在单纯的敲代码上,代码之外的架构抉择、端到端协作与排障调度才是更大的蓝海。
英文原文
So, to first talk about how the harness unlocks the next frontier, I want to talk about Grokbot. Who here has tried Grockbot? Can I see some hands? Awesome. Let's go. That's great. Um so, for those of you who haven't, Grockbot is our autonomous colleague who gets work done for you. Not just coding, but all kinds of knowledge work. And I really recommend you try it. I'm not going to sell too much, but it's a groundbreaking new product. It's already created a new category. Let's just talk about the harness, though.
So, Grockbot has a new kind of harness that operates not based off of one-off chats, but long-lived coordinator bots that orchestrate a fleet of worker agents. You can kind of think of it like hiring a high-powered lawyer who deals with you, you know, directly and owns strategy, but they farm out their tasks to a team of paralegals. It's like that.
Now, something interesting about the Grockbot harness is I mentioned how in Cursor we found ourselves removing things from the harness, removing prompting, removing guardrails as the models got smarter. But, curiously in Grockbot, we've actually found ourselves putting back a lot of these things, adding new prompting, adding new guardrails. And that's because there's a lot of new tasks in this new way of working, in the new domains that Grockbot is meant to solve, that the models have not nailed yet.
To give a few examples of those kind of things, just a few things that we're focused on right now when it comes to Grockbot, there's key website flows like making slide decks and booking travel, communication. An autonomous colleague needs to keep you up to date on what it's been doing without overwhelming you. Acting versus asking is another big one. Grockbot can do a lot of things which are kind of risky in some sense, like emailing your colleagues. You want us to be able to do that, but you only want us to do it in the way that you intended. And then, of course, learning over time the way that you work through memories is another big focus.
So, those of you who might have pushed the boundaries with coding agents might have noticed that none of these tasks are new. But, for GrokBot, they're much more important because everybody is needing them in some way. And right now in GrokBot, it is the harness that is making these tasks feasible. Of course, the model is a big part of that, but the harness is helping bring them into its own reach.
So, going back to our data flywheel, GrokBot, that example, lets us fill in the last the last arrow in our cycle, which is when a capability like coding gets commoditized by the model, it's actually the harness which unlocks a new frontier for the model to then solve and kicks off that flywheel again. So, that might look like, you know, taking on new tasks outside of the coding domain, as we just saw with GrokBot, or it could just mean taking on tasks in the software engineering job beyond pure coding. I'm sure some of you here are, you know, pretty senior in your software careers, and you might know the more senior you get, the less coding you're actually doing. So, there's a lot of other things in the job that matter.
This is the core idea that I would like you to understand, this flywheel and how the model and the harness together drive it.
软件工厂与不可替代的基石:环境、信任与工程效率
除了驱动未知场景,Harness 另一个不可被模型吞噬的维度体现在软件工厂(Software Factory: 多个自主智能体分工协同、闭环覆盖软件工程全生命周期的工业化生产体系)所要求的实体工程底座上。在企业内部实践中,一个标准的自治链路正在形成:当用户在协作频道中提出 Bug 时,自动化模块完成首次分类与定级;紧接着触发云端独立的修复 Agent 编写补丁,并通过专用工具链生成修改前后的录屏视频以证实修复结果;一旦补丁合入主干并触发自动化发布流程,Rollouts 监控产品将立即唤醒另一个专门的生产观察 Agent,全天候守护线上指标。这种跨阶段、跨工具编排的系统正是典型的元级 Harness(Meta Harness)。
这些支撑现代工业化 Agent 运行的核心能力,是底层大语言模型无论如何进化都无法单凭文本概率吸收的基石要素:
- 真实世界环境支撑(Environment):模型本身无法自我生成隔离的云端容器、网络虚拟化拓扑与物理沙箱。没有这些坚固的环境隔离机制,任何试图脱离开发者本地笔记本长效运行的 Agent 都无从谈起。
- 确定性安全与信任(Trust & Safety):尽管前沿模型号称能理解代码安全性,但企业绝不可能完全信任由非确定性神经概率生成的自主动作——将未做隔离的线上凭证、敏感密钥直接暴露给无防护的终端,无疑是灾难性的安全隐患。真正的安全防护必须由 Harness 在操作系统与执行流层级建立绝对确定的硬性拦截机制。
- 规模化能效工程(Efficiency & Cost):此前引用测试虽然表明不同 Harness 在通过率上差异不大,但它们在**单任务执行成本(Cost per Task)**上却存在惊人的鸿沟。过去一个月在 GrokBot 上的实战优化显示,仅仅通过精细调节缓存命中率(Cache Hit Rate)、优化 Token 传输结构以及引入动态模型分流组合(Model Mix),便在不损耗任何交付质量的前提下,断崖式降低了使用成本并显著拉升了系统吞吐速度。随着 Agent 调用的指数级放大,底层的工程化能效比将直接决定商业闭环的生死。
英文原文
One more example of how the harness can unlock new frontiers is some of you may have heard of this idea of the software factory, where you have multiple agents coordinating together to solve the full software development life cycle. Now, this is far from a solved vision, but there's a lot of industry or there's a lot of innovation happening across the industry at the harness.
To give an example of how this might manifest, you know, internally, we have a lot of channels where someone might report a bug to that channel, and then an automation immediately auto triages that bug. Then it might kick off a cloud agent to try to fix the bug, and that agent will use our tooling to show before and after videos to prove that it's fixed. And then, once that fix is deployed and or is merged in and starts deploying, we have our rollouts product, which kicks off another agent to watch in production for any issues. So, you can think of all this as almost like a meta harness, which is orchestrating many agents together.
So, beyond unlocking the frontier, the other big reason the harness is not dead is that there are many other parts of the harness that the model cannot natively absorb. Now, I have three of them here. I don't have too much time to talk about them, but environment is one. There is no way that the model is going to natively absorb running a cloud container for you. And if you're not running a cloud container, then you're running on your laptop. And running a 12-hour agent run on your laptop is not a great experience.
Second is trust. You know, you might think, "Oh, the models are getting smarter. I can just trust them with all my secrets." Well, I hope that you don't. Um or if you're okay with that, I'm sure that your head of security would have something to say. There are many aspects of building trust that cannot be solved by a smarter model. You need deterministic safety guardrails. You can't have a model with a 99% accuracy rate deciding whether to confirm or to take a really catastrophic action or to a $10,000 API fee, right?
And then finally, there's efficiency. If you think back to to two studies I showed, where the choice of harness did not make a significant difference in eval scores, both of those studies actually found that there was a significant difference in cost per task. I have personally been focused over the past month on optimizing the efficiency of the Grok Bot harness. Now, through tweaking variables like cache hit rate, improving that, token efficiency, model mix, we were able to bring down the costs and the speed of Grok Bots significantly for users without any hit to quality. Users have really, really been appreciating this. It's been awesome to see.
Now, it could be an entire different talk about how we did this, but the key takeaway here is that the more and more that you use agents to do your work, the more it matters, the more valuable it will be for you to have the most efficient harness.
未来演进:抽象升维、事件原语与云端化未来
站在当前节点展望,整个智能体生态正步入一个全新周期:产品创新的迭代速度再次大幅领先于底层模型的迭代速度。在这段充满探索的混乱期,Harness 的设计架构正在发生几项决定性的范式转移:
- 信息黑盒化与海姆定律的抗衡:依据海姆定律(Hyrum's Law: 只要系统的任何内部实现细节被接口暴露出来,无论文档如何规定,最终都会有外部用户依赖它),早期产品过早暴露内部状态极大制约了系统重构。在 GrokBot 等新一代方案中,底层 Harness 的复杂运转逻辑被最大程度地收敛在黑盒内部,不再直接对终端暴露细节,从而使团队能够高速发布和下线实验性功能而无需承受巨大的向下兼容包袱。
- 构建可复用原语(Primitives):与其为不同业务拼装离散的专用逻辑,团队正将通用需求沉淀为高度抽象的原语工具。以**订阅原语(Subscriptions Primitive)**为例:无论唤醒 Agent 的是 Slack 消息、CI 产线挂掉的警报、还是到达了特定物理时间,系统均通过统一的事件订阅框架提供原生工具接口,使 Agent 能以极简方式接入事件流。
- 自愈型 Shim 治理机制:为了应对模型在特定边缘场景下的响应迟缓或异常,工程上不可避免需要编写一些确定性兜底补偿逻辑(被称为 Shim,如在模型延迟过高时代替用户发出微小提示)。为了防止代码库因临时补丁腐化,团队将所有 Shim 统一接入中央监控日志。部署专职机器人每日监控面板,一旦发现某项 Shim 长期零触发(意味着新版模型已自然修复该缺陷),机器人便会自动向仓库提交清理 PR,实现技术债务的自我清理。
- 抽象层级的结构性跃迁:上一代 Harness 是将零散的基础 LLM 文本调用组合在一起;而下一代 Harness 则以完整的 Agent 作为基础积木块进行更高维度的元编排。
最终的决胜点在于运行载体的根本转变:在未来 6 个月内,90% 的生产级 Agent 任务将彻底迁离开发者的个人笔记本,全面上云运行。因为只有脱离个人设备的电量与网络限制,在弹性的云端环境中常驻,数字同事才可能达成真正的全天候自主协作。
面对最初的问题:Harness 死了吗?答案是清晰的——过去那些仅仅用来教大模型写代码的旧式脚本与琐碎防护,确实因数据飞轮而被更聪明的模型彻底淘汰;但作为连接物理世界、承载生产信任、提供极致能效比并调度多智能体未知前沿的新一代基础设施,Harness 的黄金时代才刚刚拉开序幕。
英文原文
So, by now you might be convinced that the harness still matters. Then you might be asking, "What's next?" Here's a few trends that I'm anticipating.
First of all, that flywheel is speeding up, and right now we've entered a new age where the product is once again moving faster than the model. That means that the harness is going to get more messy before it gets cleaned up. There's going to be more things shipped. So, because of this, we're expecting people to build their harnesses, design them so it's easier to ship and unship new features.
One way we're already seeing that manifest is with both Grok Bot and other similar products, less and less of the harness inner workings are being exposed to the user. Some of you may have heard of Hyrum's Law, which says that anything that you expose to users, they will come to depend on. Now, obviously there are tradeoffs to giving users less, you know, less visibility into what's happening, but one advantage is that there's less change management to deal with, and you can iterate much faster.
Now, another way that we've been seeing this trend manifest is a bigger focus on designing primitives for agents. Primitives are like building block interfaces that can be composed and extended into powerful features. When you have primitives, you can add new features without making things more complicated for the agent, and you can remove features without having to do a complicated refactor in your code base. It's just good engineering. One example across our agent harnesses of a primitive we've added is called subscriptions. Agents need a way to wake up in response to events. Those might be someone posting in Slack, CI going red on a PR that the agent cares about, or just a certain time of day. Now, rather than having one separate integration, you know, having separate integrations for each of these things, we have one framework and one tool that the model can use or the agent can use to subscribe to an event.
And then another cool thing that we do, I mentioned earlier that we have these deterministic guardrails to patch over bad behaviors in the model. That might be, for example, if GrokBot doesn't respond to the user fast enough, and we might give it a little nudge and say, "Hey, user's waiting on you." Now, we'd rather not do these things. They're kind of like hacks, but we would rather fix them now than, you know, wait for the next model checkpoint to to get released. So, in order to make our code base, you know, be less messy and and have less of a worse time iterating the future, we track all these things, which we call shims centrally, and every time the model uses one, it gets logged. So, now we have a bot who watches this dashboard, and whenever a shim stops firing, that model or that agent will put up a PR and say this shim can be cleaned up.
Another thing that I think is next for the harness is it is moving up to a higher level of abstraction. Yesterday's generation of harnesses were built from composing a bunch of LLM calls. Now, the new harnesses we're seeing, like GrokBot and the software factory, are using agents as the core building block.
And then finally, I predict that within 6 months, 90% of agent work is going to run off the laptop. This is already where things are going, and I think there's just no way that, you know, this is this is not necessary in order to have truly autonomous agents who can, you know, really work with us in in the way that we want.
So, is the harness dead? The parts that made it smarter at coding, yes, that is the flywheel at work. That is the flywheel at work. But, the harness, as we saw, is how the agents can unlock the next frontier of work. And then also the trust, the efficiency, the infrastructure that the harness brings, those things are not going anywhere. So, yesterday's harness may be dead, but long live the agent harness of tomorrow. Thank you.