读见

Vercel 如何破解智能体构建难题:Andrew Qu 与 Eve 框架的演进

原题How we Solved Agent Building — Andrew Qu, Vercel

约 8 分钟原文英文已翻译

视频由 YouTube 提供

推荐理由Vercel 数据团队复盘:脆弱多智能体交接,换成沙箱里可自检、可恢复的文件系统 Agent,评估近翻倍,并沉淀约百项可继承技能,长成 Eve 框架。企业内部 Agent 要从 Demo 到可运营,路径很具体。

看前速览

5 个要点

Vercel 的 Andrew Qu 回顾了团队如何将屡屡受挫的多智能体数据工作流,演化为可积累技能的文件系统智能体,并将这些运营经验沉淀为面向企业专属智能体的 Eve 框架。

  1. 一个具备充分上下文的智能体取代了脆弱的交接链路

    D0 起初把规划、查询、执行和汇报交给受限的不同智能体,但阶段之间的摘要会丢失上下文,也无法预判真实用户的问题。能够自行规划、检查既有工作、执行、反思和纠错的单一智能体,更符合这类任务的需要。

  2. 文件系统让智能体的工作可检查且能灵活调整

    在沙箱内赋予智能体列出文件、读取文件、运行 Bash 和写入工作结果等熟悉工具,使其能够探索语义层,而非遵循固定的工具调用顺序。Qu 将这种环境视为评估表现显著提升的关键实践突破。

  3. 技能把重复请求转化为组织层面的初始上下文

    在智能体每天收到数千个请求后,Vercel 将重复出现的查询模式提炼为约 100 项技能。这些可复用的指令与既有实践,减少了新一轮智能体运行从零开始的问题,同时不必把每一种可能的流程都硬编码。

  4. 生产级智能体除模型访问外还需要运行时保障

    Eve 将技能、工具和渠道与持久化能力、隔离执行、连接器和可观测性结合起来。这种定位让智能体构建从拼接提示词,转向一个可以观察运行、成本、工具调用与失败模式,并持续改进的运营系统。

  5. 公司专属知识是最持久的差异化来源

    Qu 认为,连接到数据仓库的通用智能体并不了解实体关系、查询取舍和让答案真正有用的业务语境。Vercel 自己的智能体之所以有价值,来自语义层以及为其工作量身积累的实践。

完整摘要

Andrew Qu 讲述了 Vercel 如何从一个为 Snowflake 生成 SQL 的超大提示词出发,逐步打造 D0——帮助精干数据团队减少重复分析请求的内部数据科学智能体。团队先将规划、查询、执行和汇报拆分为职责狭窄的智能体链,虽有改善,却无法覆盖真实提问的多样性。随后,Vercel 放弃手工规定的链路,让一个拥有充分上下文的智能体运行在沙箱中:它可访问语义层,使用熟悉的文件操作和 Bash,自主检查、执行、记录工作,并从失败中恢复。Qu 认为,这一改变而非更复杂的提示词,使评估表现大约翻倍。此后,团队从反复出现的请求中提炼出约 100 项技能,让新一轮运行能够继承组织知识。这些实践最终形成 Eve:一个结合技能、工具、渠道、持久化运行时、隔离执行、模型访问和连接器的文件系统导向框架。演讲的核心观点是,真正高效的企业智能体依赖具体的公司知识与运营基础设施;组织应把智能体视为可持续评估和完善的系统,而不是通用聊天界面。

文字稿

查看原文

简要说明Brief Description

Vercel 软件平台主管 Andrew Qu 介绍了一个内部数据科学代理如何从一段大型提示词演变为基于文件系统的实用系统,并最终为 Vercel 代理框架 Eve 的设计提供了参考。演讲指出,实用的业务代理需要持久化执行能力、适当的工具以及特定于公司的知识,而不仅仅是一个通用模型。Andrew Qu, Vercel's chief of software, explains how an internal data-science agent evolved from a large prompt into a practical, file-system-based system and eventually informed the design of Eve, Vercel's agent framework. The talk argues that useful business agents need durable execution, appropriate tools, and company-specific knowledge—not merely a general-purpose model.

目录Table of Contents

  • Vercel 为什么开始构建智能体
    Why Vercel began building agents
  • 数据团队问题与首次实验
    The data-team problem and the first experiments
  • 从专用代理链到单一的上下文丰富型代理
    From specialized agent chains to a single context-rich agent
  • 文件系统代理的突破
    The file-system-agent breakthrough
  • 将反复练习转化为技能
    Turning repeated practice into skills
  • Eve:用于构建智能体的框架
    Eve: a framework for building agents
  • 为什么公司知识至关重要
    Why company knowledge matters

Vercel 开始构建智能体的原因Why Vercel Began Building Agents

我是 Andrew,Vercel 的软件负责人。我的工作涵盖内部工程、外部实验,以及构建处于前沿的库、框架和技术。Vercel 起初致力于帮助人们部署网站和 Web 应用,而无需管理那些本身不会改进应用的基础设施。这些基础设施可以扩展到支持一百万用户,也可以缩减到零。I'm Andrew, Vercel's chief of software. My work spans internal engineering, external experiments, and building libraries, frameworks, and technologies at the frontier. Vercel began by helping people ship websites and web applications without having to manage infrastructure that does not improve the application itself. That infrastructure can scale to a million users and back down to zero.

人们想要构建的东西已经发生了变化。他们起初构建的是页面,而如今越来越希望构建智能体。Vercel 也经历了类似的历程,致力于让智能体和智能体应用更易于构建。AI SDK 让开发者可以用一行代码替代数百行特定于提供商的代码,同时在不同提供商之间保留统一的模型接口。Vercel 还构建了用于模型回退、安全代码执行、为等待响应的非活跃工作提供更优定价、持久性和可恢复性的工具。What people want to build has changed. They began by building pages, and increasingly they want to build agents. Vercel has been on a similar journey to make agents and agentic applications easier to build. The AI SDK lets developers replace hundreds of lines of provider-specific code with a single line while retaining a common model interface across providers. Vercel has also built tools for model fallbacks, secure code execution, better pricing for inactive work that is waiting on responses, durability, and resumability.

这次演讲讲述的是大约一年前的一项实验,它引发了 Vercel 大量的智能体相关工作,并最终促成了一款新产品。比尔·盖茨曾设想每张办公桌上、每个家庭中都有一台计算机。这个预测在 1980 年听起来或许颇为逆潮流,但如今已显得稀松平常。Andrew 和 Vercel 的首席技术官提出的问题是:能否换一种方式,让每张办公桌上都有一个智能体。This talk is about an experiment from roughly a year earlier that led to an explosion of agent work at Vercel and, eventually, to a new product. Bill Gates once imagined a computer on every desk and in every home. That prediction may have sounded contrarian in 1980, but it now feels ordinary. The question Andrew and Vercel's CTO asked was whether there could instead be an agent on every desk.

当时,代理主要用于编程和其他技术工作负载,不过它们的应用已经开始扩展到设计、产品管理和其他职能领域。这些模型还不如现在成熟,但团队希望探索它们能够实现什么。At that point, agents were mainly used for coding and other technical workloads, though their use was beginning to extend into design, product management, and other functions. The models were less sophisticated than they are now, but the team wanted to explore what they could accomplish.

数据团队问题与首次实验The Data-Team Problem and the First Experiments

Andrew 与 Vercel 内部的多个团队进行了交流——包括市场、销售、财务和法务团队——并询问他们最不喜欢工作中的哪些方面。最突出的问题来自数据团队。当时 Vercel 正在快速发展,而数据团队规模精简,却要处理日益庞大的客户数据、分析数据、指标数据和销售数据。Andrew spoke with teams across Vercel—marketing, sales, finance, and legal—and asked what they disliked most about their jobs. The most compelling problem came from the data team. It was lean while Vercel was growing quickly, and it was absorbing increasing volumes of customer, analytics, metrics, and sales data.

当营销或销售团队有人对客户或产品有疑问时,数据科学团队不得不中断手头工作,编写查询、处理查询、分析结果,然后给出建议。反复进行这一流程严重影响了生产力。数据团队不想每天都花时间编写临时查询,因此 Andrew 和 Vercel 的数据副总裁试图找到一种更好的运作模式。When someone in marketing or sales had a question about a customer or a product, the data-science team had to interrupt its work, write a query, process it, analyze the result, and return with a recommendation. Repeating that loop was damaging productivity. The data team did not want to spend every day writing ad hoc queries, so Andrew and Vercel's VP of Data tried to find a better operating model.

第一个版本遵循了应用 AI 时最自然的初始思路:创建一个非常大的提示词。用户提出问题,将其传给语言模型,然后获得回答。Andrew 请求导出 Snowflake 架构,将其与问题一起粘贴到系统提示词中,然后复制生成的 SQL 并亲自运行。目标很简单:测试在提供合理结构的情况下,模型是否能够编写有效的 SQL。The first version followed the natural first instinct for applying AI: create a very large prompt. A person asks a question, passes it to a language model, and receives a response. Andrew asked for a dump of the Snowflake schema, pasted it into a system prompt with a question, then copied the generated SQL and ran it himself. The goal was simply to test whether the models could write valid SQL when given a reasonable structure.

这项实验带来了一些信心。模型当时还不够出色,但更好的上下文和更多的防护措施或许能让它们变得有用。数据科学家所做的远不止生成一条查询:他们需要理解问题,探索语义层,识别连接模式,执行 SQL;如果查询失败或成本过高,还要重新审视,最后通过可视化图表、段落、复盘或其他形式汇报结果。The experiment created some confidence. The models were not yet very good, but better context and more guardrails might make them useful. A data scientist does much more than produce one query: they understand the question, explore the semantic layer, identify join patterns, execute SQL, revisit it if it fails or is too expensive, and finally report the result through visualizations, paragraphs, retrospectives, or other formats.

从专用代理链到单一的富上下文代理From Specialized Agent Chains to a Single Context-Rich Agent

Andrew 和数据副总裁将这些阶段映射到各个代理的工作负载上。数据科学代理的第二个版本名为 D0,它会将一个问题依次路由给查询代理、规划代理、执行代理以及其他阶段。每个代理都有一份高度聚焦的系统提示词,并且只能使用与其任务相关的工具。例如,规划代理可能拥有读取实体 YAML 的工具,以及搜索架构的工具;在得出答案并将其传递给后续的 SQL 和报告步骤之前,它只会使用这些能力。Andrew and the VP of Data mapped those phases to individual agent workloads. The second version of the data-science agent, called D0, routed a question through a query agent, a planning agent, an execution agent, and additional stages. Each agent had a tightly focused system prompt and tools limited to its task. For example, a planning agent might have a tool for reading entity YAML and another for searching schemas; it used only those capabilities until it had an answer to pass onward to the SQL and reporting steps.

这种安排改善了端到端的闭环流程,减少了由人工复制 SQL、执行 SQL 并返回报告的需求。但它也遇到了局限。团队得出结论:系统需要一个拥有更大上下文、能够管理自身状态并回顾自身操作的代理。单个代理不必只接收前一个代理的摘要和少量摘录,而是可以进行规划、构建、执行、报告、反思失败、进一步探索并自我纠正。That arrangement improved the end-to-end loop. It reduced the need for a person to copy SQL, run it, and return with a report. But it also hit limits. The team concluded that the system needed one agent with the larger context, able to manage its own state and look back at what it had done. Rather than receiving only a summary and a small excerpt from the preceding agent, a single agent could plan, build, execute, report, reflect on failures, explore further, and correct itself.

团队逐渐有了足够的信心,开始与少数值得信赖的人员分享这一强大的系统,同时避开关键工作负载。结果令人失望:用户觉得它糟糕透顶。团队原以为它在评估中的成功率约为 30%,但没有预料到许多真实问题。手动映射每一种场景无法扩展。The team became confident enough to share this powerful system with a small number of trusted people, avoiding critical workloads. The response was disappointing: users found it awful. The team thought it was succeeding on about 30 percent of its evaluations, but it had not anticipated many real questions. Manually mapping every scenario would not scale.

文件系统代理的突破性进展The File-System-Agent Breakthrough

下一个重大变化来自 Claude Code 和 Opus 4.5。与 Vercel 自研的代理相比,这一组合以非凡的一致性回答了许多问题。当团队试图了解其中原因时,他们发现,解锁关键在于一个文件系统。The next major change came with Claude Code and Opus 4.5. Compared with Vercel's homegrown agent, the combination answered many questions with remarkable consistency. When the team tried to understand why, they found that the key unlock was a file system.

该代理拥有一组精简的常用工具:列出文件、读取文件和运行 Bash,此外还针对数据代理的使用场景增加了几个工具。它可以使用经过充分训练、熟悉的工具,探索环境,并在需要时写入工作内容。它不受高度规定性的工具调用顺序限制,因此可以探索涌现行为。The agent had a minimal set of familiar tools: list files, read files, and run Bash, plus a few additions for the data-agent use case. It could use tools it was well trained to use, explore the environment, and write work where needed. Instead of being constrained by a highly prescriptive tool sequence, it could explore emergent behavior.

这一观察促使团队以更类似 Claude Code 的形式重构了整个方法。该代理在一个包含完整语义层的沙箱中运行。它可以检查文件、运行命令和写入文件,而 Vercel 则添加了其特定环境所需的工具。从单一代理,到 Claude Code SDK 风格的方法,再到针对该用例定制的通用文件系统代理,这一转变是一次重大飞跃。That observation led the team to rebuild the approach in a more Claude Code-like form. The agent ran in a sandbox that contained the full semantic layer. It could inspect files, run commands, and write files while Vercel added the tools needed for its specific environment. The shift from a single agent, to a Claude Code SDK-style approach, to a general file-system agent tailored to the use case was a major leap.

评估得分大致翻了一倍。实现方式很简单:为代理提供一个 Bash 辅助工具,将其连接到沙箱,并附加它可以读取、写入和执行的文件。系统开始回答许多之前无法回答的问题后,Andrew 撰写了一篇关于此事的博客文章;在该文章发布的一周内,它带来了 Vercel.com 70% 的流量。The evaluation score roughly doubled. The implementation was simple: give the agent a Bash helper, attach it to a sandbox, and attach files it can read, write, and execute. Once the system began answering many questions that had previously failed, Andrew wrote a blog post about it; in the week it was published, it accounted for 70 percent of Vercel.com traffic.

将重复练习转化为技能Turning Repeated Practice into Skills

接下来的问题是如何处理代理使用中的重复模式。在 Vercel 让该代理得到更广泛的使用后,它每天会收到数千条查询:客户指标、销售指标、数量指标、npm 下载量、产品查询、账单信息等。许多查询的形式都相同。聚合信息、查询产品或获取账单数据的方式其实非常有限。The next question was how to handle the recurring patterns in agent use. After Vercel made the agent more widely available, it received thousands of queries each day: customer metrics, sales metrics, number metrics, npm downloads, product lookups, billing information, and more. Many had the same shape. There are only so many ways to aggregate information, look up a product, or retrieve billing data.

Vercel 构建了一个定期运行的任务,用于获取最近的查询并将其提炼成技能。在演讲进行时,该系统大约拥有 100 项技能,涵盖从聚合查询到特定人员查找等各种场景。这种方法之所以有效,是因为一次全新的智能体运行通常除了语义层和系统提示词之外,没有任何既定上下文。而技能则能让它从一开始就获得上下文知识和以往的工作成果。Vercel built a recurring job that takes recent queries and distills them into a skill. At the time of the talk, it had roughly 100 skills ranging from aggregations to person-specific lookups. The approach was effective because a fresh agent run normally starts with no established context beyond the semantic layer and its system prompt. A skill gives it contextual knowledge and prior work from the start.

这种渐进过程很常见:从简单的东西开始,逐步增加复杂性,最终构建出一个可以投入生产的系统。在构建该智能体的每个阶段,Vercel 内一位对智能体感兴趣的人都会尝试分叉 D0,并构建自己的版本。每个阶段都揭示出一种此前尚未被发现的更佳实践。团队想知道,人们是否可以直接从最新的洞见开始,而不是从一个简单的提示词起步,然后重新发明同样的原则。This progression is common: begin with something simple, add complexity gradually, and eventually reach a system that can be shipped to production. At each stage of building the agent, someone at Vercel who was curious about agents tried to fork D0 and build their own version. Each stage revealed a better practice that had not been known before. The team wondered whether people could start from the latest insight instead of beginning with a simple prompt and reinventing the same principles.

Eve:一个用于构建智能体的框架Eve: A Framework for Building Agents

最终形成的想法是构建代理领域的 Next.js。Next.js 通过由文件系统定义的基础设施简化了 Web 开发:开发者按照约定编写文件,框架则决定它们应放置的位置。页面会部署到 CDN,无服务器函数有其指定的去向,而缓存位于两者之间。团队相信,代理构建也可以采用同样的方式。The resulting idea was to build the Next.js of agents. Next.js made web development simpler through file-system-defined infrastructure: developers write files following conventions and the framework determines where they belong. Pages go to a CDN, serverless functions have their destination, and caching sits in between. The team believed agent building could work the same way.

开发者只需要一个技能文件夹、一个工具文件夹和一个渠道文件夹,简单地声明各个组件,然后让框架组装出一个代理。在演讲前两周,Vercel 发布了 Eve,这是一个旨在让从示例模板到可用代理的路径变得简单直接的代理框架。用户可以添加自定义知识、自定义工具,以及与他们已经在使用的渠道的集成。Developers should need only a skills folder, a tools folder, and a channels folder, declare the pieces simply, and let the framework assemble an agent. Two weeks before the talk, Vercel released Eve, an agent framework intended to make the path from a sample template to a ready agent straightforward. Users can add custom knowledge, custom tools, and integrations with the channels they already use.

在此模型中,代理拥有运行时和通道。运行时需要持久性、隔离执行、访问不同模型的能力,以及连接功能。Eve 的设计初衷是支持开源,允许使用 PostgreSQL、OpenAI 的 Responses API、Docker 以及其他连接器的适配器。它也很容易部署到 Vercel 上,在那里,相应的组件使用了 Vercel 多年来构建的产品:用于实现持久性的 Vercel Workflows、用于安全执行的 Sandbox,以及用于为连接生成短期 OIDC 令牌的 Vercel Connect。An agent, in this model, has a runtime and channels. The runtime needs durability, isolated execution, access to different models, and connections. Eve was designed with open source in mind, allowing adapters for PostgreSQL, OpenAI's Responses API, Docker, and other connectors. It is also easy to deploy on Vercel, where the corresponding pieces use products Vercel has built over years: Vercel Workflows for durability, Sandbox for secure execution, and Vercel Connect for generating short-lived OIDC tokens for connections.

Vercel 在构建该框架时,用 Eve 重写了 D0 agent。代码变成了由系统指令、几个技能和几个工具组成的简单文件系统结构——易于组合成真正的 agent,也便于迭代。在 Vercel 伦敦活动上正式发布之前,团队将其提供给了几家测试版客户。Vercel rewrote the D0 agent in Eve while building the framework. The code became a simple file-system arrangement of system instructions, a few skills, and a few tools—easy to compose into a real agent and easy to iterate on. Before the full release at Vercel's London event, the team gave it to several beta customers.

一位关系密切的合作伙伴 Aura 重构了其代理,该代理被描述为一个用于测试他人服务的小型类 Claude 系统。它会访问网站、安装这些服务,并尝试使用它们。Aura 发现,与使用现成的 Claude Code 相比,使用 Eve 构建代理所需步骤更少、成功率更高,也能获得更深入的洞察。将 Eve 部署到 Vercel 还提供了可观测性,包括代理运行、工具调用、单个步骤、估算成本以及可能的优化。One close partner, Aura, rebuilt its agent, described as a small Claude-like system for testing people's services. It visits websites, installs them, and tries to use them. Aura saw fewer steps, better success, and better insights from building its agent with Eve than from using an off-the-shelf Claude Code. Deploying Eve to Vercel also provides observability: agent runs, tool calls, individual steps, estimated costs, and possible optimizations.

Eve 可在 eve.dev 上使用。用户可以克隆它、从模板开始、部署它,或在需要时自行托管。Eve is available at eve.dev. Users can clone it, begin from a template, deploy it, or self-host it when needed.

为什么公司知识很重要Why Company Knowledge Matters

Andrew 希望能出现更多面向特定业务的智能体用例。在构建 D0 之前,Vercel 测试了许多资金充足的垂直领域智能体初创公司,这些公司能够连接到企业的 Snowflake 实例并运行查询。团队发现,让其自有智能体发挥作用的关键在于非常具体的公司知识。Andrew's hope is that more business-specific agent use cases will emerge. Before building D0, Vercel tested many well-funded vertical-agent startups that could connect to a company's Snowflake instance and run queries. The team found that what made its own agent effective was very specific company knowledge.

Vercel 是一家基于 Web 的公司,拥有众多客户,这些客户都运营着网站和各种 Web 资产。其数据关系远不止通用查询那么简单:代理需要知道要查询什么、何时查询,以及各个实体之间如何关联。现成的代理可以用来进行尝试,但希望获得最大收益的组织应当构建自己的代理,并尽可能加入更多公司特定的知识。Vercel is a web-based company with many customers that have websites and web properties. Its data relationships go far beyond generic querying: the agent needs to know what to query, when to query it, and how entities connect. Off-the-shelf agents can be useful to try, but organizations that want the greatest benefit should build their own agents and add as much company-specific knowledge as possible.

在 Vercel,约有 20 个智能体已经找到了合理的产品市场契合点,工作范围涵盖营销复盘、确定外联目标、法务遇到新的谈判事项时起草第一版红线稿,以及用于数据查询的数据科学智能体。这些智能体节省了时间。数据团队的生产力得到提升,可以将更多时间用于改善 Snowflake 性能、添加缺失的数据源,以及填补过去因忙于编写查询而无法解决的数据空白。At Vercel, around 20 agents had found reasonable product-market fit, covering work from marketing retrospectives and identifying outreach targets to creating a first redline when legal sees a new negotiation, as well as the data-science agent for data queries. These agents save time. The data team has become more productive and can spend more time improving Snowflake performance, adding missing data sources, and filling gaps it previously could not address because it was busy writing queries.

Andrew 的结论是,如今对于大型、中型或小型公司而言,自动化那些不想做或耗时过多的工作从未如此容易。人力资源、财务和销售工作中的部分环节可以通过代理实现自动化,而他将 Eve 介绍为 Vercel 首选的构建方式。Andrew's conclusion is that it has never been easier for a large, medium-sized, or small company to automate work it does not want to do or work that consumes too much time. Parts of HR, finance, and sales can be automated with agents, and he presents Eve as Vercel's preferred way to build them.

值得记下

Andrew 与 Vercel CTO 提出的问题是:能否让每张办公桌前都有一个智能体。
团队原以为评估成功率约为 30%,但他们没有预料到许多真实问题。
评估分数大约翻了一倍。
现成的智能体值得尝试,但想获得最大收益的组织,应构建自己的智能体,并尽可能加入公司专属知识。