Warp 如何基于 Claude 构建自我改进型 Agent
英文标题:How Warp builds self-improving agents on Claude
Warp 利用 Claude Platform 和基于 Agent Skills 的框架,将原本会在会话结束后丢失的用户反馈转化为持续改进 Agent 的闭环。该架构由负责具体任务的基础技能与定期汇总反馈、更新基础技能的改进器技能组成,所有更新均可通过常规 PR 审查流程验证和合并。Warp 已将这一模式应用于其开源仓库中的规格编写、代码审查和 Issue 分流 Agent;公司目前累计融资 7300 万美元,月度开发者用户达 80 万,Claude Code 在 Warp 内累计运行 1000 万次会话。其经验表明,高质量、低摩擦的人类反馈,以及可审查的文件化技能更新,是让 Agent 随时间稳定提升的关键。
296.8 KB
61.9 KB
中文
在我们的系列中,我们聚焦于初创公司如何借助 AI 改变所在行业。本文将介绍 Warp 如何将无状态的用户反馈转变为其 Agent 的自我改进闭环。
快速概览
名称 | Warp
成立时间 | 2020 年
创始人 | Zach Lloyd(CEO)
技术栈 | Rust、Golang、GitHub Actions、内部 Agent 编排平台(Oz)、Claude Platform
增长情况 | 已融资 7300 万美元。每月有 80 万名开发者在 Warp 上进行开发。56% 的《财富》500 强企业使用 Warp。迄今已有 1000 万次 Claude Code 会话在 Warp 内运行,目前每周超过 40 万次。Warp Agent 对话总量达到 4000 万次。
Agent 必须能够可靠且有效地处理重复性任务。一个只能完成任务 80% 的初版提示词,可能为用户带来嘈杂且令人烦扰的体验。Warp 从中深刻吸取了教训,并据此制定产品战略,为全球近 100 万名开发者打造了更好的体验。
Warp 是一款由 AI 驱动的终端与 Agent 开发环境,构建于 Claude Platform 之上。团队在内部代码审查 Agent 中遇到了这种“嘈杂体验”问题:工程师抱怨该 Agent 会给出无帮助的评论,并产生低质量输出。
团队起初尝试了临时解决方案,例如根据观察到的代码审查失败案例,手动重写提示词。这让输出变得更可用,但无法规模化。改进诸如 AGENTS.md 的上下文文件也有所帮助,但远非完整的解决方案。
最终,他们意识到,任何用途的 Agent 所获得的反馈,通常都会在会话结束时消失,从而使 Agent 闭环失去关键上下文。他们的解决方案是:采用基于 Agent Skills 的框架,构建自我改进型 Agent,让反馈能随时间累积,持续优化和增强 Agent 输出。
请继续阅读,了解他们如何在 Claude Platform 之上利用 Skills 构建这一系统。
基于 Skills 构建的 Agent 自我改进闭环
这一方法的核心,是利用 Skills 构建自我改进闭环。Skills 是以文件形式编码的知识,可避免将指令直接塞入原始提示词中。Warp 演化出一种自我改进型 Agent 架构:由两个 Skill 构成,中间穿插人类反馈。
内部/基础 Skill 承载功能领域知识和指令。例如,当有人创建 PR 时,Warp 的代码 Agent 会基于该基础 Skill 和上下文执行,生成审查结果。
对 Agent 输出提供的人类反馈,是自我改进闭环中的关键组成部分。对于代码审查而言,反馈可以简单到一个点赞,但越明确越好。
Warp 创始人 Zach Lloyd 解释道:“人类可以确认,‘这是一条不错且有用的评论’。但人类也可以详细说明代码审查为何不好。例如,‘你建议重命名这个变量,但我们代码库的约定是,这类全局变量要使用这种特定的命名上下文’。这些具体信息会告诉 Agent 下次该如何正确处理。”
外部/改进器 Skill 则充当观察者 Agent。它不是按每项任务运行,而是按计划定期运行。它会提取累积的人类反馈,对比 Agent 的建议与人类的响应,并提出一项小而聚焦的基础 Skill 修改建议。
由于 Skills 就是普通文件,Agent 极其擅长更新它们。这些可审查、可批准、可合并的更新,可以进入常规 PR/代码审查工作流;一旦合并,下一次运行内部 Skill 时便会继承改进。
Warp 目前已在整个开源仓库中运行这一模式,分别部署规格编写、审查和分流 Agent,且每个 Agent 都拥有自己的自我改进闭环。
Zach 表示:“基于文件的 Skills 是一种为 Agent 编码知识的方式,无需把知识直接放进提示词;Agent 可以在执行工作时自行查阅这些知识。这个框架其实非常简单:有一个基础的领域专用 Skill,再有一个用于优化该领域专用 Skill 的改进器 Skill。这种简单性正是该方法的美妙之处。”
如何为 Agent 编写自我改进 Skills
以下是 Warp 团队为 Agent 闭环编写自我改进 Skills 时,经实践验证有效的一些建议:
- 写原则,而不是规则。 Zach 表示:“构建 Skill 时,应当把它当作是在指导一个聪明的人,而不是在编写计算机程序。”例如,在 Skill 中加入“寻找重复代码”这样的指引,比列出详尽的变量命名规则更有效。
- 解释背后的原因。 提供规则背后的理由,可以让 Agent 对问题进行推理,而不是僵化地遵从指令,从而实现更好的泛化能力。
- 让反馈毫不费力。 在人们本来就工作的地方捕捉反馈,例如直接在 PR 或 Issue 中评论。同时,应让这一过程自动发生,无需额外的提交步骤。Zach 指出:“低摩擦才能让信号持续流动。如果你把流程弄得太困难,就不会获得反馈,也无法改进 Skill。”
- 保持 Skills 简小,并采用渐进式披露。 一个优秀的 Skill 文件不应过于庞大;它应引用资源文件和脚本,而不是一次性将所有内容塞进上下文。
- 反馈质量优先于数量,但数量同样有帮助。 来自资深工程师的少量、详细且领域专用的反馈,可能比大量浅层反馈更有价值,因为二元的点赞/点踩无法说明_为什么_。Zach 继续说道:“即使样本量相对较小,只要它来自具备 Agent 原本无法获得的领域专门知识的人,并且反馈足够详细,你也能获得非常好的信号。话虽如此,高质量信号的语料规模越大越好。在 Warp,我们正利用这一闭环管理整个开源仓库。我们有数百人参与贡献,并进行数千次代码审查。”
- 在改进器 Skill 上投入更多精力。 在编写改进器 Skill(即观察者 Agent)上额外投入,不仅能改善当前的 Agent 闭环,还会带来更广泛的回报,因为改进器 Skill 可在不同用例之间高度复用。“除领域专用知识部分外,这是一种相当可复用的机制——代码审查 Agent 的改进器 Skill,与任何其他 Agent 的改进器 Skill 并没有太大不同。”
闭环实战:Warp 的 Issue 分流 Agent
Warp 的 Issue 分流 Agent 展示了这一自我改进型 Agent Skills 框架。每当有人提交新的 GitHub Issue,该模式便会触发:GitHub Action 启动一个 Agent,对 Issue 的复杂度和可行性进行分析、分配标签,并为修复方向提出建议。该分流 Agent 依赖一个内部 Skill 文件运行,其中包含关于各个标签含义,以及在采取行动前如何研究代码库的领域知识。
在一个示例 Issue 中,第一阶段的内部 Skill 完成得相当不错,但遗漏了一个 ready to spec 标签。该标签表示贡献者可以开始围绕该 Issue 编写产品和技术规格。Warp 团队的一名维护者发现了这一缺口,并直接在 Issue 中留下反馈,也就是在工作实际发生的位置。关键在于,他同时解释了自己的预期以及产生这一预期的原因:这类可操作反馈很容易在之后被 Agent 吸收。
外部改进器 Skill 在 Oz,即 Warp 的 Agent 编排平台中,以定时运行的“update triage”Agent 形式执行。该 Agent 完成 GitHub 身份认证,运行随 Skill 打包的 Python 脚本以提取近期带有反馈的 Issue,将其汇总为 JSON 文件,再将该文件读回上下文。这个打包脚本本身也是一种最佳实践:Skills 可以引用资源文件,而不必每次运行时都编写新代码。
随后,该 Agent 识别维护者评论中的具体反馈信号,并提出能够捕捉这些信号的最小修改。它创建了一个 PR 来编辑内部 Skill:当某个 Issue 描述了真实问题,即使确切的 UI 或 UX 形态尚未定义,也应应用 ready to spec 标签。
由于整个更新本身就是一个 Skill 文件,它会进入正常的代码审查工作流。该 PR 附带了一份说明,解释哪些信号促成了这项变更,以及变更了什么。人类进行审查、批准并合并后,下一次分流 Skill 运行时便会继承这项新知识。最后这个人类步骤闭合了整个反馈环路,并确保人始终掌控实际发生的变更。
这正是 Warp 目前在其开源仓库中大规模运行的机制:规格编写 Agent、审查 Agent 和分流 Agent 都各自拥有自我改进闭环。
无论任务是什么,只要从一开始就将这种闭环构建进 Agent——捕捉人类反馈信号,将其转变为 Skill 更新——任何 Agent 都能随时间变得更好,并从一次性的辅助工具扩展为能够在组织内持续累积能力的系统。
Warp 团队的最佳实践
你是否混淆了 Skills 和记忆? | Skills 是过程性的、稳定的——即“如何完成 X”,与单次运行无关,并且会被有意地修改。记忆则由 Agent 在推理时自动写入,并且持续变化。
你需要一个改进器闭环,还是每个 Agent 各有一个? | 采取折中方式:用模板化的基础闭环捕捉各 Agent 的共性,再叠加领域专用权重。少量 Agent 可以各自拥有一个改进器;若有上百个 Agent,则应共享改进器。
反馈有误时怎么办? | 假定它一定会出错。不要让 Agent 盲目接受反馈——向它提供可供合理性检查的上下文,筛选哪些人的输入有效,并在人类过滤或最终审查阶段保留人在回路中。
你的领域是否可验证? | 先构建验证工具,再让 Agent 针对它进行调优:生成参考语料,将输出与参考结果进行比较、修正、重复。
如果领域不可验证呢? | 在有条件的地方,依赖与黄金输出进行对比的确定性评估。必须使用人类反馈时,应将其限制在领域专家范围内,不要完全放开。
如何知道整个系统正在改进? | 跟踪人们已经在关注的全局指标——合并耗时、贡献者数量、成本——并将这些数据反馈给改进器 Agent。部署时遵循从试验、推广到规模化的渐进路径。
观看完整网络研讨会,了解现场演示,以及 Warp 如何使用 Claude 构建能够从团队反馈中学习、并随时间自我改进的 Agent 的更深入讨论。
立即开始使用 Claude Platform 进行开发。
English / 原文
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.
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, 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.
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.
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.
Read on to learn how they built it with skills on top of the Claude Platform.
Agent self-improvement loops built on skills
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.
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.
“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.
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 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.
“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
Here are some of the Warp team’s tried and true tips for writing self-improving skills for agentic loops:
- 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.
- 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.
- 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.”
The loop in action: Warp’s issue triage agent
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.
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.
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.
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.
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.
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.
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.
Start building with the Claude Platform today.