Warp 如何在 Claude 上构建自我改进型智能体
Learn how Warp devised a simple development pattern that anyone can use to create self-improving agents.了解 Warp 如何设计出一种简单的开发模式,让任何人都能创建自我改进型智能体。
Learn how Warp devised a simple development pattern that anyone can use to create self-improving agents.了解 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.在我们的系列文章中,我们重点介绍了初创公司如何利用 AI 改变其行业。在本文中,我们将分享 Warp 如何将无状态的用户反馈转化为其智能体的自我改进循环。
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.智能体需要可靠且有效地处理重复性任务。如果初始提示词只能完成 80% 的任务,往往会给用户带来嘈杂且烦人的体验。Warp 在这方面深有体会,并以此为基础调整了产品策略,从而为全球近 100 万开发者改善了体验。
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.Warp 是一款基于 AI 的终端及智能开发环境,构建于 Claude 平台之上。该团队在内部代码审查智能体上遇到了这种“嘈杂体验”的问题。工程师们抱怨智能体的评论不仅无用,输出质量也很低。
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. 团队最初尝试了一些权宜之计,例如根据观察到的代码审查失败情况手动重写提示词。这虽然让输出更具可用性,但无法扩展。改进 AGENTS.md 等上下文文件也有所帮助,但远非根本解决之道。
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. 最终他们意识到,真正的问题在于:无论智能体的用途是什么,针对它的反馈通常会在会话结束后消失,从而导致智能体循环中缺失关键的上下文。他们的解决方案是:基于“智能体技能”(Agent Skills)的框架来创建自我改进型智能体,让反馈随时间积累,从而持续优化和增强智能体的输出。
Read on to learn how they built it with skills on top of the Claude Platform. 请继续阅读,了解他们如何利用 Claude 平台上的“技能”构建这一系统。
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. 核心技术是使用“技能”的自我改进循环。技能是基于文件的知识编码,将指令从原始提示词中分离出来。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.内部/基础技能包含功能领域知识和指令。例如,当打开一个 PR 时,Warp 的代码智能体会利用该基础技能和上下文来执行审查。
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. 人类对智能体输出的反馈是自我改进循环的关键环节。对于代码审查而言,这可能只是简单的点赞,但反馈越明确越好。
“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.”“人类可以肯定地说‘这是一个很好的、有用的评论’,”Warp 创始人 Zach Lloyd 解释道,“但人类也可以详细说明为什么代码审查做得不好。诸如‘你建议重命名这个变量,但我们的代码库约定是这种类型的全局变量使用特定的命名上下文’之类的具体细节,能告诉智能体下次该如何正确操作。”
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.外部/改进技能充当观察者智能体,按计划运行而非按任务运行。它会拉取积累的人类反馈,将智能体的建议与人类的反应进行对比,并对基础技能提出小而精确的编辑建议。
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. 由于技能是纯文本文件,智能体非常擅长更新它们。这些更新可以被审查、批准和合并,通过正常的 PR/代码审查工作流进行;一旦合并,下一次运行内部技能时就会继承这些改进。
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.Warp 现在在其整个开源代码库中运行这种模式,包括独立的规范编写、审查和分类智能体,每个智能体都有自己的自我改进循环。
“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.”“基于文件的技能是一种为智能体编码知识的方法,无需将这些知识直接放入提示词中,智能体可以在执行任务时简单地查阅这些知识,”Zach 说。“这个框架其实非常简单:有一个基础的领域特定技能,还有一个改进技能来完善该领域特定技能。这种简洁性正是该方法的魅力所在。”
Here are some of the Warp team’s tried and true tips for writing self-improving skills for agentic loops: 以下是 Warp 团队在编写用于智能体循环的自我改进技能时总结的实用技巧:
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.Warp 的 Issue 分类智能体展示了自我改进智能体技能框架。每当有人提交新的 GitHub Issue 时,该模式就会触发:GitHub Action 会启动一个智能体,分析 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. 在一个示例 Issue 中,第一阶段的内部技能表现良好,但漏掉了一个“ready to spec”(准备编写规范)标签,该标签表示贡献者可以开始针对该 Issue 构建产品和技术规范。Warp 团队的一位维护者发现了这个疏漏,并直接在 Issue 上留下了反馈,即工作发生的地方。关键在于,他解释了自己期望什么以及为什么期望如此:这些可操作的反馈易于智能体在以后吸收。
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.外部改进技能在 Warp 的智能体编排平台 Oz 中作为一个预定的“更新分类”智能体运行。该智能体通过 GitHub 身份验证,运行随技能捆绑的 Python 脚本来拉取带有反馈的近期 Issue,将其汇总为 JSON 文件,并读回上下文中。捆绑脚本本身就是一种最佳实践;技能可以引用资源文件,而不是在每次运行时编写新代码。
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,编辑了内部技能,以便在 Issue 描述了实际问题时应用“ready to spec”标签,即使具体的 UI 或 UX 形态尚未定义。
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.由于整个更新是一个技能文件,它会通过正常的代码审查工作流。PR 到达时附带了描述,解释了哪些信号触发了更改以及更改了什么。人类进行审查、批准并合并,分类技能的下一次运行就会继承这些新知识。最后的人类介入步骤闭合了循环,并确保人类始终掌控实际发生的更改。
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. 这就是 Warp 现在在其开源代码库中大规模运行的相同机制,其中规范编写智能体、审查智能体和分类智能体各自拥有自己的自我改进循环。
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.任何智能体,无论其任务是什么,只要从一开始就构建其中一个循环来捕获人类反馈信号,将其转化为技能更新,就能随着时间推移变得更好,并将智能体从一次性助手扩展为能够在组织内不断积累能力的强大系统。
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.观看完整网络研讨会,获取现场演示和更深入的讨论,了解 Warp 如何利用 Claude 构建能够从团队反馈中学习并随时间自我改进的智能体。
Start building with the Claude Platform today.立即开始使用 Claude 平台进行构建。
Get the developer newsletter订阅开发者通讯
Product updates, how-tos, community spotlights, and more. Delivered monthly to your inbox.产品更新、操作指南、社区焦点等。每月发送到您的收件箱。