Warp 如何在 Claude 上构建自我改进的智能体 | Claude by Anthropic
原题How Warp builds self-improving agents on Claude | Claude by Anthropic
推荐理由Warp 展示了一条可审计的 Agent 改进路径:基础 Skill 承载稳定的领域知识,外层改进器定期归纳用户在 PR 和 issue 中留下的反馈,提出修改后仍由人审查并合并,下一轮执行才会生效。团队强调写原则而非死规则,并让反馈自然留在已有工作流里。它把「从失败中学习」从口号变成版本化工程:信号收集足够轻,修改过程可见,错误更新能够拒绝或回滚。这个案例适合想让 Agent 持续变好、又不愿交出变更控制权的工程团队。
读前速览
Warp 开发了一种自我改进的智能体架构,利用两种技能——基础技能用于领域知识,外层技能用于反馈分析——通过持续整合人类反馈来优化智能体的输出。
智能体需要可靠且高效地处理重复性任务。一个首次提示就能完成 80% 任务的智能体,仍可能给用户带来嘈杂且恼人的体验。
Warp 发现,即使是表现优异的智能体(80% 的准确率)也可能因输出不一致或欠佳而让用户感到困扰。这促使他们开发了自我改进循环,以逐步优化智能体的行为。
核心技术是利用技能实现自我改进循环,技能是基于文件的知識编码方式,使指令不直接暴露在原始提示词中。
通过将领域知识分离到技能中,Warp 能够基于反馈进行有针对性的更新。内层技能保存当前指令,外层技能分析反馈并提出改进建议,形成持续优化的循环。
人类对智能体输出的反馈是自我改进循环的关键组成部分。对于代码审查,这可能简单到只是一个点赞,但反馈越具体越好。
明确的反馈(例如「你遗漏了这个边界情况」)为外层技能提供了进行精确调整所需的信号。这确保了智能体能从具体的失败中学习,而非仅仅依赖泛泛的不满。
外层/改进者技能充当观察者智能体,按计划运行而非按任务运行。它收集累积的人类反馈,对比智能体的建议与人类的实际回应,然后对基础技能提出一个小而精准的修改。
改进者技能充当元智能体,定期审查基础智能体的表现。它识别反馈中的模式,并针对基础技能的指令提出具体修改建议,从而在无需人工干预的情况下有效「训练」智能体。
由于技能是纯文本文件,智能体非常擅长更新它们。这些更新可审查、可批准、可合并,能够通过标准的 PR/代码审查流程流转;一旦合并,内层技能的下一次运行就会继承这些改进。
与标准版本控制工作流的集成确保了改进的可追踪性、人工审核和一致性应用。这防止了智能体知识库的「腐化」,并保持了高质量。
完整摘要
Warp 的自我改进智能体依赖于双技能系统:内层技能负责任务执行,外层技能负责反馈处理。人类反馈直接从工作产物(如 PR 评论)中收集,外层技能利用这些反馈提出对内层技能的更新建议,经审核合并后用于提升智能体未来的表现。
目录 · 3 节
在我们的系列中,我们重点介绍初创公司如何借助 AI 改变各自的行业。在本文中,我们将分享 Warp 如何将无状态的用户反馈转化为其智能体的自我改进闭环。In our series, , we highlight how startups are transforming their industries with AI. In this article, we share how Warp turned stateless user feedback into a self-improvement loop for its agents.
| The quick pitch | |
|---|---|
| Name | Warp |
| Founded | 2020 |
| Founders | Zach Lloyd (CEO) |
| Stack | Rust, Golang, GitHub Actions, internal agent orchestration platform (Oz), Claude Platform |
| Growth | $73M raised. 800K monthly developers build on Warp. 56% of the Fortune 500 uses Warp. 10M Claude Code sessions run inside Warp to date, 400K+ per week. 40M total Warp Agent conversations. |
智能体需要可靠且高效地处理重复性任务。一个初步提示即使能把任务完成 80%,也可能给用户带来嘈杂且令人烦恼的体验。Warp 通过惨痛的教训学到了这一点,并据此制定了产品策略,为全球近 100 万开发者打造了更优的体验。Agents need to handle recurring tasks reliably and effectively. A first-pass prompt that gets 80% of the task correct can create a noisy and annoying experience for the user. Warp learned this the hard way, and used this to inform its product strategy, creating an improved experience for nearly 1M developers worldwide.
Warp,这个由 AI 驱动的终端和代理式开发环境,建立在 Claude Platform 之上。团队在内部代码审查代理上遇到了这种“噪音体验”问题。工程师们抱怨他们的代理会提出无帮助的评论,并产出低质量的输出。Warp, the AI-powered terminal and agentic development environment, builds on the Claude Platform. The team ran into this “noisy experience” problem with their internal code review agent. Engineers complained that their agent made unhelpful comments and produced low-quality output.
团队最初尝试了权宜之计,比如根据观察到的代码审查失败手动重写提示词。这让输出更可用,但无法扩展。改进像 AGENTS.md 这样的上下文文件也有所帮助,但远远算不上彻底解决。The team initially tried stopgap solutions, like manually rewriting the prompt based on observed code review failures. This made output more usable but didn’t scale. Improving context files like AGENTS.md also helped, but was far from a complete fix.
最终,他们意识到,真正的问题在于,对代理的反馈无论其目的为何,通常都会在会话结束时消失,从而从代理循环中移除了关键上下文。他们的解决方案是:一个基于 Agent Skills 的框架,用于创建自我改进的代理,使反馈能够随着时间累积,不断优化并增强代理输出。Ultimately, they realized, the real issue was that feedback to an agent, no matter what its purpose, typically disappears when the session ends, removing critical context from the agentic loop. Their solution: an Agent Skills-based framework to create self-improving agents where feedback compounds over time to continually refine and enhance agent output.
继续阅读,了解他们如何借助 Claude Platform 上的技能构建它。Read on to learn how they built it with skills on top of the Claude Platform.
基于技能构建的智能体自我改进循环Agent self-improvement loops built on skills
核心技术是一个使用技能的自我改进循环,其中技能是基于文件的知识编码,可将指令排除在原始提示之外。Warp 发展出了一种自我改进的智能体架构,由两个技能组成,中间穿插有人类反馈。The central technique is a self-improvement loop using skills, which are file based encodings of knowledge that keep instructions out of the raw prompt. Warp evolved a self-improving agent architecture consisting of two skills, with human feedback in between.
内层/基础技能承载功能领域知识和指令。例如,当一个 PR 被打开时,Warp 的代码代理会使用该基础技能和上下文来生成其审查结果。The inner/base skill holds the functional domain knowledge and instructions. For example, when a PR is opened, Warp’s code agent executes using that base skill and context to produce its review.
对智能体输出的人类反馈是自我改进循环中的关键组成部分。对于代码审查,这可以简单到一个点赞,但越明确越好。Human feedback on agent output is a critical component for the self-improvement loop. For code review this could be something as simple as a thumbs up, but the more explicit the better.
人类可以肯定地说,‘这是一条不错且有用的评论’,”Warp 创始人 Zach Lloyd 解释道,“但人类也可以详细说明为什么某次代码审查不好。像‘你建议重命名这个变量,但我们的代码库约定是,这类全局变量要使用这种特定的命名上下文’这样的具体说明,会告诉代理下次该怎么做对。 “A human could affirm, ‘this was a good, useful comment’,” Warp founder Zach Lloyd explains, “But the human could also give detailed reasons why a code review wasn't good. Specifics like ‘you suggested renaming this variable, but our code base convention is this type of global variable uses this particular naming context’ tell the agent how to do it right next time.”
外部/改进器技能作为一个观察者代理运行,按计划而不是按任务执行。它会拉取累计的人类反馈,将代理建议的内容与人类的实际响应进行比较,并针对基础技能提出一个小而聚焦的编辑建议。The outer/improver skill functions as an observer agent that runs on a schedule rather than per-task. It pulls the accumulated human feedback, compares what the agent suggested against how humans responded, and proposes a small, focused edit to the base skill.
因为技能本质上就是普通文件,所以代理非常擅长更新它们。这些更新是可审查、可批准、可合并的,可以通过正常的 PR/代码审查工作流流转;一旦合并,内层技能的下一次运行就会继承这些改进。Because skills are plain files, agents are extremely good at updating them. These updates, which are reviewable, approvable, and mergeable, can flow through a normal PR/code-review workflow; once merged, the next run of the inner skill inherits the improvement.
Warp 现在在其整个开源仓库中运行这种模式,设有独立的规范编写、审查和分诊代理,每个代理都带有各自的自我改进循环。Warp now runs this pattern across its entire open-source repo, with separate spec-writing, review, and triage agents, each carrying their own self-improvement loop.
基于文件的技能是一种为智能体编码知识的方法,而不是把这些知识直接放进提示词里;智能体在执行工作过程中可以把它当作一种可直接查阅的内容,”Zach 说。“这个框架其实非常简单:先有基础的领域特定技能,然后再有改进器技能来优化这项领域特定技能。这种简单性正是这种方法的美妙之处。“File-based skills are a way of encoding knowledge for agents without putting that knowledge directly in the prompt, as something the agent can simply look up in the course of doing its job,” says Zach. “The framework is really simple actually: there's the base domain-specific skill and then there's the improver skill that refines that domain-specific skill. This simplicity is the beauty of this approach.”
如何为智能体编写自我提升技能How to write self-improving skills for agents
以下是 Warp 团队在为 agentic 循环编写自我改进技能时经过验证的一些实用技巧:Here are some of the Warp team’s tried and true tips for writing self-improving skills for agentic loops:
- 写原则,而不是规则。Zach 说:“构建这个技能时,要像在指导一个聪明人,而不是像在给计算机编程。比如在技能里加入像‘寻找重复代码’这样的指引,比详尽的变量命名规则能提供更好的方向。”Write principles, not rules. "Construct the skill as though you're instructing a smart person, not like you're programming a computer,” Zach says. “Including direction in the skill like ’Look for repeated code’ provides better direction than exhaustive variable naming rules.”
- 解释原因。提供规则背后的理由可以让代理对问题进行推理,而不是机械地遵循僵硬的指令,从而再次实现更好的泛化。Explain the why. Providing the rationale behind the rule lets the agent reason about the problem instead of following rigid instructions, again allowing for better generalization.
- 让反馈变得轻松易给。在人们已经在工作的地方收集反馈,比如直接在 PR 或 issue 上评论。还要让这一切自动发生,不需要额外的提交步骤。Zach 指出:“低摩擦才是让信号持续流动的关键。如果你把它搞得太难,你就拿不到反馈,也就无法提升这项技能。”Make feedback effortless to give. Capture it where people already work, like by commenting directly on a PR or issue. Also, make this happen automatically, with no extra submission step. “Low friction is what keeps signal flowing,” Zach notes. “If you make it too hard you're not going to get the feedback and you're not going to be able to improve the skill."
- 保持技能精简,并使用渐进式披露。一个好的技能文件不会很大;它会引用资源文件和脚本,而不是一次性把所有内容都塞进上下文中。Keep skills small and use progressive disclosure. A good skill file isn't large; it references resource files and scripts rather than dumping everything into context at once.
- 反馈质量 > 数量,但数量也有帮助。来自资深工程师的一小部分详细、特定领域的反馈,可能比大量粗略反馈更有价值,因为简单的点赞/点踩并不能说明原因。Zach 继续说道:“即使样本量相对较小,只要反馈非常详细,而且来自在特定领域有知识、而智能体原本无法获得这些知识的人,你也能得到非常好的信号。” “话虽如此,优质信号的语料库越大越好。在 Warp,我们用一个循环来管理整个开源仓库。我们有数百人在贡献,而且我们正在进行数千次代码审查。”Feedback quality > volume, but volume helps. A small amount of detailed, domain-specific feedback from a senior engineer can be worth more than lots of cursory feedback because binary thumbs up/down doesn't say why. “You can get really good signal even from a relatively small sample size if it's very detailed feedback from a person around domain specific knowledge that the agent otherwise would have no way of getting,” Zach continues. “That said, the bigger the corpus of quality signal, the better. At Warp we're using a loop to manage our whole open source repo. We have hundreds of people contributing and we're doing thousands of code reviews.”
- 在改进者技能上多下功夫。把额外精力投入到编写改进者技能(观察者代理)上,会在即时的代理循环之外带来回报,因为改进者技能在不同用例之间具有很强的可复用性。“除了领域特定知识组件之外,这其实是一个相当可复用的机制——代码审查代理的改进者技能与任何其他代理的改进者技能并没有太大不同。”Put extra effort into the improver skill. Putting extra effort into writing the improver skill (the observer agent) pays off beyond the immediate agent loop, because improver skills are very reusable across different use cases. “Outside of the domain specific knowledge component, this is a fairly reusable mechanism—the improver skill for a code review agent is not that different from the improver skill for any other agent.”
循环实战:Warp 的问题分诊代理The loop in action: Warp’s issue triage agent
Warp 的问题分诊代理展示了自我改进型代理技能框架。每当有人提交一个新的 GitHub issue 时,这种模式就会被触发:一个 GitHub Action 会启动一个代理,分析该 issue 的复杂度和可行性,分配标签,并为修复建议方向。该分诊代理依赖一个内部技能文件,其中保存了关于每个标签含义以及在采取行动前如何研究代码库的领域知识。Warp’s issue triage agent demonstrates the self-improving agent skills framework. The pattern is triggered whenever someone files a new GitHub issue: a GitHub Action fires an agent that analyzes the issue for complexity and feasibility, assigns labels, and suggests a direction for the fix. That triage agent runs off an inner skill file holding the domain knowledge about what each label means and how to research the codebase before acting.
在一个示例 issue 上,第一阶段的内部技能表现不错,但漏掉了一个标签 ready to spec,这表明贡献者可以开始围绕该 issue 编写产品和技术规格说明。Warp 团队的一位维护者发现了这个缺口,并直接在 issue 上留下了反馈,正好就在工作发生的地方。关键的是,他同时解释了自己期望什么以及为什么会有这样的期望:这些可执行的反馈便于代理之后吸收。On a sample issue, the first-stage inner skill did a solid job but missed one label, ready to spec, which signals that a contributor can start building product and technical specs against the issue. A maintainer on the Warp team caught the gap and left feedback directly on the issue, exactly where the work was happening. Critically, he explained both what he expected and why he expected it: actionable feedback easy for the agent to absorb later.
外部改进者技能在 Oz 中运行,Oz 是 Warp 的代理编排平台,作为一个计划执行的“更新分诊”代理。该代理通过 GitHub 认证,运行了随该技能捆绑的 Python 脚本来拉取包含反馈的近期问题,将它们汇总到一个 JSON 文件中,并将其读回上下文中。捆绑脚本本身也是一种最佳实践;技能可以引用资源文件,而不是在每次运行时都重新编写代码。The outer improver skill runs in Oz, Warp's agent orchestration platform, as a scheduled “update triage” agent. The agent authenticated to GitHub, ran a Python script bundled with the skill to pull recent issues carrying feedback, summarized them into a JSON file, and read that back into context. The bundled script is itself a best practice; skills can reference resource files instead of writing fresh code on every run.
从那时起,代理识别出维护者评论中的具体反馈信号,并提出了能体现这些信号的最小修改。它发起了一个 PR,编辑内部技能,在问题描述的是一个真实问题时应用“ready to spec”标签,即使具体的 UI 或 UX 形态尚未定义。From there, the agent identified the concrete feedback signals in the maintainer comments and proposed the smallest edit that captured them. It opened a PR editing the inner skill to apply the "ready to spec" label when an issue describes a real problem, even though the exact UI or UX shape is not yet defined.
因为整个更新就是一个技能文件,所以它会通过正常的代码审查流程。这个 PR 附带了说明,解释了哪些信号促成了这次变更,以及它修改了什么。由人工进行审查、批准并合并,随后 triage 技能的下一次运行就会继承这些新知识。最后这一步人工操作完成了闭环,并让人始终掌控实际发生的变更。Because the whole update is a skill file, it moves through the normal code-review workflow. The PR arrived with a description explaining which signals prompted the change and what it altered. A human reviews, approves, and merges, and the next run of the triage skill inherits the new knowledge. That final human step closes the loop and keeps a person in control of what actually changes.
这就是 Warp 现在在其开源仓库中大规模运行的同一机制,在那里,编写规范的代理、审查代理和分诊代理各自都带有自己的自我改进循环。This is the same mechanism Warp now runs at scale across its open-source repo, where spec-writing agents, review agents, and triage agents each carry their own self-improvement loop.
无论任务是什么,只要你从一开始就把这些循环之一构建进任何智能体中,用来捕捉人类反馈信号、将其转化为技能更新,并把智能体从一次性助手扩展为能够在整个组织内持续复利的强大系统,它就会随着时间推移变得更好。Any agent, no matter what its task, gets better over time if you build one of these loops into it from the start to capture human feedback signals, turn them into skill updates, and expand agents from one-off helpers into capable systems that compound across your org.
| Best practices from the Warp team | |
|---|---|
| Are you conflating skills with memory? | Skills are procedural and stable—"how to do X," run-agnostic, changed deliberately. Memory is auto-written by the agent at inference time and never stops changing. |
| Do you need one improver loop, or one per agent? | Meet in the middle: a templated base loop captures the overlap across your agents, with domain-specific weights layered on. A handful of improvers can each own one; a hundred should share. |
| What happens when the feedback is wrong? | Assume it will be. Don't let the agent accept feedback blindly — give it context to sanity-check, filter whose input counts, and keep a human in the loop at either the filtering or final-review stage. |
| Is your domain verifiable? | Build the verification harness first, then let the agent tune against it: generate a reference corpus, compare output to reference, fix, repeat. |
| And if it isn't domain verifiable? | Lean on deterministic evals against golden outputs wherever they exist. Where you must use human feedback, restrict it to domain experts — don't open the floodgates. |
| How do you know the whole system is improving? | Track the global metrics humans already eyeball—time to merge, contributor count, cost—and feed them back into the improver agents. Go crawl-walk-run on deployment. |
观看完整网络研讨会,了解现场演示以及更深入的讨论,看看 Warp 如何使用 Claude 构建能够从团队反馈中学习并随着时间推移自我改进的智能体。View the full webinar for a live demo and deeper discussion of how Warp uses Claude to build agents that learn from team feedback and improve themselves over time.
立即开始使用 Claude Platform 构建。Start building with the Claude Platform today.