Clay 的智能体如何写出自家工程师不会写的代码
原题How Clay’s agent writes code its own engineers wouldn’t
看前速览
Clay 的 AI 负责人 Jeff Barg 解释,团队怎样用同一套向外部智能体开放的 CLI 和可组合工具,重新设计面向获客和市场拓展的智能体。
为智能体提供可以自由组合的基本操作
Sculptor 可以独立完成查电话号码之类的步骤。Clay 通过共享的 CLI 开放营销活动、工作流和受众操作,让全局智能体可以组合这些操作,并回头取用多步任务产生的工作成果。
用具体的用户流程衡量改进
Clay 先测单项能力,再检查每次发布覆盖了哪些功能,后来开始用具体流程的结果做评测,例如进站销售线索能否正确分流。
先发挥模型熟悉的工具接口的价值
后训练使部分分数提高,但工作能力没有质的改变。Barg 说,团队发现类 SQL 搜索语言和通过插件扩展的现成 Pi 智能体运行框架更能发挥模型能力。
诊断和审批各有自己的工程问题
很长的执行记录很难让编码模型一次诊断完。Clay 也将智能体的执行和沙箱隔离开,在实际发起营销活动等影响较大的操作前交由用户批准。
区分公司共享信息和个人记忆
Knowledge Hub 保存公司层面的背景信息。个人记忆按用户隔离,可跨会话使用,对共享信息的更新则通过审批流程管理。
完整摘要
Clay 最初的 Sculptor 智能体擅长给名单补充信息,却难以从头到尾执行一次营销活动。Jeff Barg 向 Harrison Chase 解释,新版全局智能体采用了一套共享的 CLI,把营销活动、工作流和受众操作开放为可组合工具,评测也从单项能力转向具体的用户流程。后训练缩小了部分差距,却没有带来团队期待的改观。类 SQL 搜索语言和 Pi 智能体运行框架则让模型能用熟悉的工具完成更多工作。Barg 还谈到如何让任务持久运行、为何将沙箱单独隔离、为什么很难用一个提示词诊断很长的执行记录,以及智能体实际发送营销活动前需要哪些审批。他也解释了公司知识库与用户个人记忆的区别,以及按结果定价的难点。
章节
文字稿
简要描述Brief Description
Clay 的 AI 负责人 Jeff Barg 与 LangChain 的 Harrison Chase 探讨了一个编程智能体如何成为 Clay 的入口,内容涵盖 CLI、评估、共享业务上下文、长时间运行的任务,以及对实际操作的审批。Clay head of AI Jeff Barg and LangChain’s Harrison Chase discuss how a coding agent became Clay’s front door, from the CLI and evaluations to shared business context, long-running work and approval for real-world actions.
目录Table of Contents
- 简介Introduction
- 从 Sculptor 到全局智能体:任务与结果之比较From Sculptor to the global agent: tasks vs outcomes
- 让 Clay 更适配智能体,并打造 RevOps 团队喜爱的 CLIMaking Clay agent-friendly, and the CLI RevOps teams love
- Clay 的评测如何从能力转向用户旅程How Clay’s evals moved from capabilities to user journeys
- 自建第一方智能体还是插件:何时该自己构建First-party agent vs plugin: when to build your own
- 为什么 Clay 围绕编程智能体构建Why Clay built around a coding agent
- 后训练教会了 Clay 什么,以及一种类似 SQL 的搜索语言What post-training taught Clay, and a SQL-like search language
- 采用现成测试框架的理由The case for an off-the-shelf harness
- 实验室自制的测试装置真的效果最好吗?Do lab-built harnesses really work best?
- 在沙箱外运行智能体Running the agent outside the sandbox
- 为什么 Codex 不擅长调试长篇追踪记录Why Codex is bad at debugging long traces
- 知识中心:在智能体之前构建记忆Knowledge Hub: building memory before the agent
- 多玩家智能体,以及智能体在 Slack 中的呈现方式Multiplayer agents, and what the agent looks like in Slack
- 该代理距离 AI 增长负责人还有多远How close the agent is to an AI head of growth
- 测试框架与基础设施的分界点Where the harness ends and infrastructure begins
- 为什么 Clay 宁愿按 token 收费,也不按结果收费Why Clay would rather charge for tokens than outcomes
- 微调,以及用于 Claygent 的后训练模型路由器Fine-tuning, and a post-trained model router for Claygent
- 对 100 行 Bash 命令的审批Approvals for 100-line Bash commands
- 评估环境和模拟用户Eval environments and simulated users
引言Introduction
杰夫·巴格:我觉得大多数人都能做到。说实话,我觉得这里真没什么秘诀。Jeff Barg: I think most people can do it. Honestly, I don't think like there's really any secret sauce here.
哈里森·蔡斯:今天我将与杰夫·巴格交谈,他是 Clay 的 AI 负责人。Clay 是一个市场拓展平台,最近围绕一个编程智能体重构了自己的智能体。Harrison Chase: Today I'm talking to Jeff Barg, head of AI at Clay, a go-to-market platform that just rebuilt its agent around a coding agent.
Jeff Barg:如果你看看这些智能体编写的 Bash 命令,就会发现它们复杂得惊人。作为一名工程师,如果我在终端里输入命令,是不会这么做的。Jeff Barg: If you look at the Bash commands that these agents write, they are extremely complex in ways that I, as a an engineer, if I'm typing in my terminal, would not do.
哈里森·蔡斯:我们先来谈谈 Clay 从模型后训练中学到了什么。Harrison Chase: We get into what Clay learned from post-training a model first.
Jeff Barg:你可以看到图表上的表现逐渐接近 Sonnet 或 Opus 的水平,但这并不是阶跃式的差异。我觉得我们从中学到的就是,嘿,仅靠 harness 工程,我们还有很大的潜力可以挖掘。Jeff Barg: You could see the graphs kind of getting closer to Sonnet or Opus level performance, but it wasn't a step function difference. I think the learning there was just, hey, there's a lot of juice that we can squeeze out of just the harness engineering.
Harrison Chase:他分享了阅读追踪记录以及了解智能体在哪些环节出问题时令他感到意外的地方。Harrison Chase: He shares what surprised him about reading traces and understanding where the agent breaks down.
Jeff Barg:如果我把那段跟踪记录放进 Codex,然后直接问它:“你能找出这里出了什么问题吗?”它其实很不擅长做这件事。Jeff Barg: If I take that trace and put it into Codex and just ask, can you figure out what went wrong here? It's actually really bad at doing this.
Harrison Chase:我们还会讨论如何为智能体提供足够的业务背景信息,让它能够做出明智的决策。Harrison Chase: We also get into how you give an agent enough business context to make good decisions.
Jeff Barg:实际上,我们在开始考虑智能体部分之前,就已经开始考虑记忆部分了。Jeff Barg: We actually started thinking about the memory piece before we started thinking about the agent piece.
Harrison Chase:Jeff 解释了他如何看待为旨在推动成果的智能体定价。Harrison Chase: And Jeff explains how he thinks about pricing an agent that's built to drive outcomes.
Jeff Barg:我觉得,无论我们为这个智能体采用哪种定价结构,最终都会不合适。不过,我确实觉得按 token 收费有它的好处。Jeff Barg: I think whatever pricing structure we align on for this agent, it will be wrong. I do think there's actually something quite nice about charging for tokens.
Harrison Chase:欢迎收听《Max Agency》,这档播客将深入探讨像你这样的构建者如何打造最优秀的智能体。Harrison Chase: Welcome to Max Agency, the podcast that goes deep into how the best agents are being built by builders like you.
从 Sculptor 到全局智能体:任务与成果From Sculptor to the global agent: tasks vs outcomes
Harrison Chase:感谢你来参加,Jeff。我觉得无论按谁的标准来看,你们 Clay 团队都已经涉足智能体领域有一段时间了。你们最近刚推出了一个新的智能体,我想你们就叫它 Clay。Harrison Chase: Thanks for being here, Jeff. I feel like you guys at Clay have been in the agent space for a while by anyone's standards. You guys just recently launched a new agent, which I think you're just calling Clay.
杰夫·巴格:是的。Jeff Barg: Yep.
Harrison Chase:那个智能体是做什么的?另外,它和你们之前推出的那些智能体产品有什么不同?Harrison Chase: What does that agent do and maybe how is it different from previous agentic things you guys have launched?
杰夫·巴格:嗯。首先,感谢邀请我来。很高兴能聊聊。嗯。Jeff Barg: Yeah. Well, first thanks for having me. Excited to chat. Yeah.
我们刚刚推出了新的智能代理,我们称它为 Clay。对公司来说,一个很大的变化是,我们希望这个智能代理成为你在 Clay 中处理所有市场拓展任务的入口。我认为,与我们之前的尝试相比,最大的转变在于,我们确实希望这个智能代理能够全面覆盖平台的各个部分。So we just launched our new agent. We're calling it Clay. So, I would say a big change for the company, which is we want our agent to be the front door to all of the go-to-market tasks that you do in Clay. And I think the big shift here from previous attempts that we've had is we really want the agent to be one comprehensive of all the parts of our platform.
所以,它应该能够完成端到端市场推广任务所需的一切。真正做到以结果为导向,而不是以任务为导向。我认为我们在这方面的第一次重大尝试,是去年推出的一款名为 Sculptor 的产品。我觉得从 Sculptor 中最大的收获是——嗯,我们学到了很多关于构建智能体的知识。So should do everything that you would need to do to do an end-to-end go-to-market task. And really more outcome oriented versus task oriented. I think the first big attempt that we had at this was a product we launched last year called Sculptor. I think the big learning from Sculptor was well we learned a lot about agent building.
首先,这大概是2025年的事吧,我想……我也不确定,自那以后我们学到了很多。First off, this was like 2025 and I think I don't know, we learned a lot since then.
但从产品角度来看,我认为 Sculptor 很擅长完成单项任务,但不太擅长端到端地代表你推动产品上市并取得成果。But from a product point of view, I think the Sculptor was very good at doing individual tasks but not like doing end to end go like driving go-to-market outcomes on your behalf.
Harrison Chase:比如,任务和结果分别是什么样的?Harrison Chase: What can what's an example of like a task versus an outcome?
Jeff Barg:Clay 通常是一个用于构建名单、丰富数据,并在此基础上进行编排的工具,服务于各种市场拓展策略。我认为 Sculptor 擅长的是一些具体而细致的事情,比如“嘿,我想为这份名单里的每个人找到一个电话号码”,Sculptor 能帮你做到这一点。我觉得这带来了很大价值。但它不擅长的是“嘿,我想发展业务,想针对最适合我的客户发起一场新的出站营销活动”。这其实是一件非常多方面的事,对吧?你得弄清楚什么样的客户最适合你。比如,哪些才是你的最佳客户?Jeff Barg: Clay is generally a tool for list building, data enrichment and then orchestration on top. So into various go-to-market plays. I think the things that Sculptor was good at was like individual granular things like hey I want to find a phone number for each person in this list and Sculptor could do that for you and I think that drove a lot of value but it wasn't what it was not good at was hey like I'm trying to grow my business and I want to launch a new outbound campaign against the customers that are best for me right it's like that's actually like a very multifaceted thing right you have to figure out like what is a what are your best customers? Like who are your best customers?
如何启动一个外呼营销活动?比如,如何建立这类客户名单?How do you launch an outbound campaign? Like how do you build a list of those customers?
这实际上有点像一个多步骤流程,可能会用到 Clay 系统中的五六个不同部分。It's kind of like actually very multi-step and uses like probably five or six different parts of the Clay system.
Harrison Chase:有意思。那么现在的用户体验是什么样的?就像你提到的,它是入口。你还提到它应该能做所有事情。它看起来是什么样的?Harrison Chase: Interesting. So what does the UX look like now? Like you mentioned it's the front door. You mentioned it should do everything. What does it look like?
Jeff Barg:主要的用户体验并不令人意外。它仍然只是一个空白文本框。现在变成全屏了,有点像智能体体验。Jeff Barg: The main UX is unsurprising. It is still just sort of blank text box. Full screen now like agent experience.
哈里森·蔡斯:那现在是 Clay 的主页吗?Harrison Chase: Is that the homepage of Clay now.
杰夫·巴格:是的,所以你打开 Clay,看到的就像是一个很大的文本框。我们确实还保留着某种资源列表,但它正变得越来越小。就是……挺有意思的,我觉得我们的智能体功能,或者说智能体聊天框,倒是一直在变得越来越大。没错。Jeff Barg: It is yes so if you come to Clay it's like large text box we do still have sort of list of resources but it is getting smaller and smaller it's just sort of the it's funny I feel like our agent thing or our agent chat box just keeps getting bigger and bigger but yes.
Harrison Chase:所以你打开聊天机器人,然后呢?你会怎么说?比如说“帮我开展一场外呼营销活动”吗?它会把这当作一个任务来执行吗?这个任务会长时间运行、主动推进吗?它会不会主动跟进相关事项?任务启动之后,人们会怎样与它互动?Harrison Chase: So you go to the chatbot and then what do you what do you say do you say like run an outbound campaign for me and does it still do it like a task is it like long running and proactive and will like check in on things like what how do people interact with it once it's kicked off?
Jeff Barg:你说得完全没错。所以你仍然可以说类似“嘿,帮我创建一个外呼营销活动”这样的话。它就会照做。它会构建我们称为“产物”的东西,也就是 Clay 系统的不同组成部分。Jeff Barg: You're exactly right. So you do still say things like hey build an outbound campaign for me. It'll do that. It'll build what we're calling artifacts which are just like different parts of the Clay system.
比如工作流或受众细分。它会为你构建这些内容,并安排基于这些内容的后续跟进。你可以想象一下,比如让它帮我创建一个外呼营销活动。So like workflows or an audience segment. So it'll build these artifacts for you. And it will schedule follow-ups against those artifacts. So you can imagine like build me an outbound campaign.
它会将其作为一项任务运行,然后安排后续跟进,随着时间推移检查该任务的结果。It will run it like a task and then schedule a follow-up that will check in on the results of that task over time.
Harrison Chase:后续操作就是你自己启动的另一次智能体运行。Harrison Chase: And the followup is that just another agent run that you kick off yourself.
Jeff Barg:没错。是的,是的。我想我们选择了过度透明这一边。我们还没有完全走 Instinct 或 Muse 那种路线,也就是在幕后主动采取行动。Jeff Barg: That's right. Yeah. Yeah. I think we aired on the side of being overly transparent. Like I we haven't gone the full Instinct or Muse route where it's just sort of proactive behind the scenes.
Harrison Chase:我正想问这个呢。是啊,我觉得最近这类主动式智能体出现了很多,大家也都非常关注。你从中汲取了多少灵感?Harrison Chase: I was going to ask about that. Yeah. I mean, I feel like those types of proactive agents have come out a lot recently and people are paying a lot of attention to that. How much inspiration did you take from that?
Jeff Barg:是的,我想我们从 OpenClaw 出现以来就一直在思考这个问题,也就是从去年 12 月开始。我们确实从中汲取了灵感,并将其应用到产品的多个部分,既体现在全局层面,也体现在账户层面。你可以想象,每个账户都有一个类似 OpenClaw 的东西,会主动查看:我们是否应该推进这笔交易,或者联系组织里的其他人。我们其实在初夏推出了一款名为“账户智能体”的产品。它有些类似于一个在后台运行的主动式智能体,可以为每个账户推荐下一步的最佳行动。Jeff Barg: Yeah, I think we've been thinking about this since OpenClaw, so since December of last year and yeah, I think we've taken inspiration from that for actually multiple parts of our product. Both at the sort of global level, but also at the account level. You can imagine there's like for every account an OpenClaw like thing that checks in on like hey should we be moving this deal forward or should we be reaching out to different people in the organization. So we actually launched a product early in the summer called account agents. Somewhat similarly like background proactive agent to suggest next best actions for each account.
Harrison Chase:我想回到那些主动式智能体的话题。不过,对于主智能体来说,它创建这些资产时,这些资产是如何体现平台的?我的意思是,听起来它创建的其他资产,你也可以手动创建,或者通过其他任何方式创建。你们基本上是把这个智能体的所有工作归到某个——我不知道,某种单元里,然后说“没错,这就是这个智能体,这就是它的作用”,还是说这些工作其实是分散在整个平台各处的?Harrison Chase: I want to come back to those proactive agents. But for the main agent when it creates these like assets, how are those how are those like kind of like visualizing the platform? What I mean by that is it sounds like it's creating other assets that you could also just create manually or create through any other methods. Do you basically kind of like lump all of this agent's work into some I don't know unit and say yes this is the agent. This is what it does or are those like kind of dispersed just throughout the platform generally.
杰夫·巴格:如果你只是在平台上使用,它们目前散布在平台各处;但如果你转到代理页面,就会看到它们被归拢在一起。Jeff Barg: They're currently dispersed throughout the platform if you just use the platform but if you go to the agent like you'll see them kind of bundled together.
Harrison Chase:所以,比如说,我通常会进入一个智能体,然后看到聊天线程。这是同一个概念吗?每个线程都会以某种方式关联一些资产吗?Harrison Chase: So we like I go to an agent normally and I see like chat threads is it the same concept and like each thread has assets somehow associated with it.
杰夫·巴格:没错,是的。Jeff Barg: That's right yeah.
Harrison Chase:在聊天和完整的用户界面之间,你怎么看待两者各自的优缺点?Harrison Chase: Between kind of like chat and full-blown UI how do you think about the pros and cons of each one.
Jeff Barg:我认为,从整体方向上看,我们还是希望它在某些方面以任务为导向。原因其实是,我们希望代理能够执行一些受预算限制、也可能受权限范围限制的操作。比如,你可以交给它一个任务:“你最多可以花这么多积分,或者这么多钱,然后想办法联系到别人。”我觉得目前你还无法在产品中真正做到这一点,但这就是我们希望前进的方向。因此,这些设计选择在总体方向上也与之相符。Jeff Barg: I think directionally what we wanted to have this be was still task oriented in some ways. And the reason for that is actually we want the agent to be able to do some things that are budget scoped sort of like permission scoped potentially where you give it a task that's like hey you can spend up to this many credits or this much money and just figure out how to reach out to people and so it's like I don't think you can really do this in the product today but directionally that's where we want to go. So those like the design choices were sort of kind of directionally aligned with that.
是的。从方向上来说,把所有东西整合到一起时,北极星是什么?Harrison Chase: Yeah. What is the what directionally what's the north star in every putting everything together.
Jeff Barg:我觉得其中很多实际上是仿照我们观察到的 RevOps 团队的运作方式:通常有一群人在尝试不同的点子,他们拥有某种共享背景,也就是对“我们想尝试的点子总清单”有某种共同认知;然后他们还有某种收集需求或生成点子的机制。所以我觉得大方向上,它看起来可能会像某种任务列表,一些智能体向这个任务列表添加任务并读取任务,然后智能体就各自挑选任务来做,差不多就是这样。Jeff Barg: I think a lot of it is actually modeled off of how we've seen RevOps team operate which is they generally have a bunch of people who are trying different ideas they have some kind of shared context so some kind of like shared idea of like hey here are the like total list of ideas we want to try and then they have some form of like intake or idea generation so I think directionally it looks probably like some kind of task list some kind of agents like adding and reading from that task list and then agents just kind of picking away tasks like yeah.
让 Clay 更适合智能体使用,并打造 RevOps 团队喜爱的 CLIMaking Clay agent-friendly, and the CLI RevOps teams love
Harrison Chase:也许我们稍微从用户体验转到核心智能体本身。它是如何架构的?又是如何运行的?Harrison Chase: Maybe switching a little bit from UX to now kind of like the core agent itself. How is it architected? How does it run?
Jeff Barg:我认为我们开始做这件事的一个重要原因是,我想说,从今年年初开始,公司经历了相当大的转变。时间点和 OpenClaw、Opus 4.5 出现的时期差不多。很多人开始在 Claude Code 里执行 go-to-market 任务。我觉得这背后有很多原因,比如它的表达能力很强,能做的事情很多,解决方案的空间也几乎不受限制。长期以来,Clay 一直只有网页应用;我们掌握着 go-to-market 任务的入口,并且一直很坚定地认为,这在战略上很重要,而且在很多方面也更有利于客户。从今年开始,我们意识到,嘿,我们确实应该进入编程智能体领域,真正参与到那个生态系统中。Jeff Barg: I think a big reason we got started on this was one I would say the company has been going through a fairly big shift since the beginning of the year right so same time frame as OpenClaw and Opus 4.5 a lot of people started doing go-to-market task in Claude Code and I think for many reasons right like it's very expressive like there's a lot of things it can do it's kind of unbounded in terms of its solution space and for a long time Clay has been only web app right like we owned the front door of kind of go-to-market task and felt fairly strongly that was important strategically and also better for customers in a lot of ways. Since this year I think we've realized like hey there's a like we should really be playing in the coding agent space and really participate in that ecosystem.
所以总而言之,我们确实花了很多时间,首先是让智能体能够使用这个平台。也就是说,智能体能做的所有事情,都得益于我们投入了六个月,让我们的 Campaigns 产品具备对智能体友好的基础构件,使其能够构建、编辑和运行营销活动。我们的 Workflows 产品也是如此,还有 Audiences 产品,它是我们 go-to-market 场景的上下文层。我想,这项工作在夏天告一段落;顺带一提,我们当时推出了一个 CLI。在某种程度上,人们这么喜欢 CLI 让我并不意外,但同时也让我很震惊。我觉得,有一群人,你可能不会想到大概五年前他们还不太知道 CLI 是什么。他们可能是 RevOps 团队,也可能是非常拥抱 AI 的 go-to-market 构建团队,但总之,他们真的很喜欢这个 CLI。And so all this to say we actually spent a lot of time one making the platform accessible to agents right so all of the things that the agent can do was made possible by a six-month investment in making our campaigns product have agentfriendly primitives to be able to build edit run campaigns same with our workflows product and audienc's product which is for like our go-to-market context layer and so I'd say that work culminated over the summer we launched a CLI as a side note I it was in some ways unsurprising to me but also shocking to me how much people loved the CLI. And I think like a group of people that you might not think of as probably 5 years ago wouldn't really know what a CLI is. You have like these RevOps teams or maybe like very AI forward but like go-to-market builder teams that yeah I mean they loved the CLI.
我觉得,这其实只是围绕这些对智能体友好的基础构件来打造产品,自然而然发展到的结果。我们推出了这个功能,也因此获得了大量关注。我认为接下来的合理一步,就是把它重新带回产品中。其实有很多人本可以从 CLI 中受益,但正如前面提到的,尽管大家对 CLI 相当兴奋,仍有很大一部分用户不知道 CLI 是什么,也不太想使用 Claude Code。所以,我们确实想把这种强大、灵活、涵盖方方面面、以智能体驱动的市场推广方式带回产品中。在产品内实现也有很多优势,因为你可以把它直接整合到我们之前谈到的那些环节中,对吧?And I think so this was just sort of the natural culmination of building the product around these agent friendly primitives launched this a ton of got a ton of traction for that and then I think the logical next step was bringing this back into the product. I think there were actually a lot of people who would have gotten value out of the CLI but to the earlier point even though people are quite excited about the CLI there are still a big there's still a big segment of users that don't know what a CLI is and don't really want to be in Claude Code. So yeah, so I think we really wanted to bring that experience like this kind of powerful, expressive, all-encompassing, agentic way of doing go-to-market back into the product. And there's a ton of advantages of doing that in product as well because you can integrate it directly to the points we talked about earlier, right?
比如拥有 artifacts,能够在手动创建和智能体创建之间交接,还有资源级预算这样的功能——这些在 Claude Code 里都无法实现。所有这些都让人觉得,嘿,我们确实可以打造一种真正以客户为中心的体验。我不知道,我觉得可能有很多不同的策略。Like having artifacts, being able to handoff between manual creation and agent creation, having things like resource level budgeting, which wouldn't be possible in Claude Code. All of these things were sort of, hey, we can actually build a really customer-centric experience. I don't know. I think there's probably many different strategies.
每个人都在以某种方式试图弄明白这件事。我很想听听你对此的看法。不过,是的,我觉得对我们来说,我们确实看到了一个很好的方向,可以用一种对客户非常友好的方式来实现这一点。Everyone's trying to figure this out in some ways. I'm curious to get your thoughts on that. But yeah, I think for us like we saw a really good path to actually do this in a way that would be really customer friendly.
Harrison Chase:好。我想回到智能体运行框架的话题,不过也许先岔开聊聊这个,因为我觉得大家都在谈论这个。Harrison Chase: Okay. I want to I want to get back to the agent harness, but maybe sidebaring on this because I think like everyone is talking about this.
我对你提到的一件事特别感兴趣:让 Clay 更适合智能体使用,并为想这么做的公司引入适配智能体的基础构件。你会有什么建议?听起来最后的成果是一个 CLI,但你们是经过哪些步骤才做到这一步的?是什么让它成为一个好的 CLI?你们尝试过哪些行不通的做法?I'm really interested in one thing you said about kind of like making Clay like agent friendly and bringing agent friendly primitives in for a company that wants to do that like what would you recommend like it sounds like it ended up culminating in a CLI but like what are the steps that it took to get there and like what made it a good CLI what were maybe some things you tried that didn't work.
杰夫·巴格:我有很多想法,因为这个问题可能至少有三个维度,对吧?我觉得这在组织层面是个很大的挑战,因为每个团队都得想:嘿,我们可能已经花了 12 到 18 个月在打造这个产品,结果突然之间,我们就得从第一性原理出发重新思考它,比如,智能体应该用哪些命令?组织层面的挑战确实很多。我觉得还有各种技能方面的挑战:很多擅长构建 sequencer 产品的团队,未必擅长为 sequencer CLI 或 sequencer 工具集构建评测。说到这儿,我觉得还有评测方面的挑战,就是要弄清楚我们想要实现哪些结果,以及希望智能体表现出哪些理想行为?Jeff Barg: I have so many thoughts because there's probably at least three dimensions to this question right I think it was it was a big challenge organizationally right because it's every single team had to figure out hey we've been building this product for maybe 12 to 18 months and all of a sudden we have to rethink it from first principles to think like hey what should the commands be for agents like there's all the organizational challenges I think there's all the sort of skill set challenges of many teams who are good at building a sequencer product might not be great at building evals for a sequencer CLI or sequencer tool set to that point I think eval challenge right just figuring out like what are the outcomes we want to drive and you what are the ideal behaviors that we want to have the agents do?
Clay 的评测如何从能力转向用户旅程How Clay’s evals moved from capabilities to user journeys
Harrison Chase:那我想就此问个问题。我们在 LangChain 显然花了很多精力思考评测。我觉得大多数时候,我们和大家聊的都是如何评测他们自己的第一方智能体,但我们现在也越来越多地和大家讨论如何评测技能、MCP 和 CLI。你们的评测是什么样的?对于想要构建这类评测的团队,你们有什么建议?Harrison Chase: So maybe a question on that. So we at LangChain we obviously think a ton about evals. I think most of the time when we talk to people about it's about eval kind of like their first-party agent, but we're starting to talk to people more and more about evals for kind of like skills MCPS CLI. What do those eval look like for you guys? What advice would you have for teams trying to build those?
Jeff Barg:我认为,构建自有代理其实还有另一个优势:它让我们更容易构建这些评测,从而形成一个很棒的飞轮效应。先简单介绍一下背景:我们的生产环境代理使用我们的 CLI,这是一个经过深思熟虑的选择,目的是尽可能确保这些体验保持一致。实际上,我们希望外部代理也能像内部代理一样拥有充分的控制能力和表达能力。Jeff Barg: I think this was actually another advantage of building a first-party agent was it made it way easier to build these evals in a way that it's actually a great flywheel. So actually first just to set the stage our production agent uses our CLI and that was like a very conscious choice to one keep these experiences to have as much parity as possible. We're actually we want external agents to have just as much control and expressibility as our internal agent.
我觉得现在所有的评测,比如我们在自研智能体上做的所有爬坡工作,都反馈到了 CLI 里,我觉得这形成了一个非常好的良性循环。是的,说到评测,我觉得这一路是逐步演进的。一开始,我认为我们确实是从能力的角度来思考评测的,对吧?所以我们有很多不同类别的评测,比如它能不能构建、运行、编辑 Campaign;基本上就是非常机械地测试各种能力。然后我觉得我们转向了不同层级的编排:比如,嘿,这里有一大类任务,如果我们能覆盖得相当全面,就认为智能体已经准备好达成某个里程碑了。于是我们有了 Alpha 发布、Beta 发布,也大致按这种方式对评测进行分类。我觉得我们最终的方向,其实是回到按用户旅程来分类,对吧?And I think all of the evals now, like all of the hill climbing we've done on our first-party agent has fed back into the CLI and I think that's been a really good flywheel. Yeah, in terms of the evals, I mean there's been a progression there, I'd say. We started out, I think, really thinking about evals from a capability standpoint, right? So we had a bunch of different buckets of evals for can it build run edit campaigns right sort of just like very wrote testing the capabilities I think then we shifted towards I'd say like levels of orchestration right so sort of like hey here's a big bucket of tasks for which like if we get a pretty good coverage we think the agent will be ready to get to some milestone right so it's like we had an alpha launch we had a beta launch and kind of bucketing evals like And I think where we're landing is actually going back to user journey bucketing, right?
所以这就像是,嘿,有些用户真的很想做入站线索路由。然后在这件事里面,可能有五六个不同的子任务,用户会来使用这个智能体,获得这些体验,或者实现你想推动的结果,然后进行评估。所以我觉得这些东西就是这样逐渐演变过来的。中间那个阶段可能是最尴尬的,因为它对推动进展确实很有帮助。我们当时要开用户大会,所以我们真的很想有信心地说,好吧,如果到了这个日期,我们就觉得已经准备好发布了。从这个角度来说,它很有帮助;但从指标的角度来说就很尴尬,因为这些指标几乎毫无意义。比如,某件事的覆盖率达到 80%,这到底意味着什么?你没法把这个拿去宣传给用户,对吧?我想你也可以把它放在某种图表上,但我作为消费者看到 OpenIC 发布的图表时,总是有点困惑,或者至少觉得这些图表未必真的能反映使用这些智能体时的实际体验。So it's like, hey, there are users who really want to do inbound lead routing. And then within that, there's probably five or six different subtasks that a user would come in, use the agent, like have these experiences or like outcomes you want to drive and then having evalu. And so I think that's been the evolution of these things. The middle one was probably the most awkward because it was very helpful for driving. We had a our user conference and so we really wanted to feel confident about well if we get to this date we feel like we'll be ready to launch and so helpful from that standpoint but very awkward from the standpoint of like the metrics were almost meaningless you get to 80% coverage on something what does that you can't market that to users right I guess you can you can put it on sort of a chart but I always as a consumer see the charts that like openic put out and was a bit confused or at least like I don't feel like that actually translates necessarily to the experience of using some of these agents.
Harrison Chase:那么,你会以某种方式单独评估 CLI 吗?Harrison Chase: And so, do you eval the CLI in some way separately from that?
Jeff Barg:我们基本上做了一些运行框架对比,比如比较在 Claude 中使用 CLI 和使用官方 Agent。我觉得这方面也经历了几轮迭代。我很想听听你对此的看法。因为,嗯,我觉得正如你所说,这一切都还很新,大家似乎都在摸索。Jeff Barg: We have done some basically harness comparisons. So just using the CLI in Claude versus the first-party agent. I think that's gone through some iterations as well. I'm curious to get your thoughts here. Because yeah I think to your point like this is this feels very new feels like people are trying to figure this out.
Harrison Chase:是的。我的意思是,我觉得我们也有一个 agent,在某种意义上非常相似——一个在后台运行并查看 traces 的引擎 agent。它也会使用我们公开提供的 CLI。我们也会做一些类似 harness 对比的工作。Harrison Chase: Yeah. I mean I think like so we have an agent as well that's very similar in some sense an engine agent that runs in the background looks at traces. It also uses our CLI that's exposed. We also do kind of like harness comparisons.
我觉得,我觉得我们这么做更多是为了确保我们的表现比其他测试框架更好,而不是为了确保 CLI 在那些测试框架中表现良好。是的。I feel like I feel like we do that more to like make sure that we're performing better than the other harnesses rather than to like make sure that the CLI performs well in those harnesses. Yeah.
Jeff Barg:不过,我不觉得我们开始在 Claude Code 里测试它们有什么不妥。不是为了确保我们比 Claude Code 更好,而是为了确保 Claude Code 能很好地使用它。我不过,我不认为我们到目前为止做过这件事。听起来你们的情况也差不多。Jeff Barg: But I don't I don't think it would be crazy for us to start testing them in Claude Code. Not to make sure we're better than Claude Code, but to make sure that Claude Code can use it well. I but I don't think we've done that to date. It sounds like you guys are kind of similar.
Harrison Chase:有点类似。我觉得这很大程度上是在和其他 harness 做比较,而不是想办法让其他 harness 做得更出色。从理念上讲,我认为我们确实希望 CLI 在所有环境中都能表现良好,对吧?所以,是的,这不算离谱,但现在可能不是我们的优先事项。Harrison Chase: Kind of similar. I think it was very much kind of a comparison to the har the other harnesses, not like trying to get the other harnesses to be great. Philosophically, I think we do want the CLI to perform well in all environments, right? So yeah, not crazy, but probably not a priority for us right now.
自有智能体与插件:何时应该自建#+#+#+#+First-party agent vs plugin: when to build your own
Harrison Chase:这个方向上我还想谈的另一件事,基本上就是,嗯,把 Clay 提供给其他智能体使用,还是构建一个自有智能体,作为一种战略选择。我觉得这又是几乎每家公司(包括我们)都在考虑的事情。我们也确实花了很多时间思考 engine 的这个问题。我觉得还有另一点,就是我认为,我们可以让 engine 的表现比 Claude Code 更好。Harrison Chase: The other thing in this vein that I wanted to touch on is basically yeah, like making Clay available to other agents versus building a first-party agent as a strategic choice. And I think this is again something that basically every company including us are also thinking about. Again we think about this a ton for engine. I think there's another aspect as well which is like I think we can I think we can get better performance out of kind of like engine compared to Claude Code.
你可以说,这可以通过类似技能、子代理和提示词来实现。再说一次,我们用的是同一个 CLI,所以这不算什么影响因素;不过你也可以说,可以把这些都打包成一个插件之类的东西,带到 Claude Code 里去,但感觉在某些方面会更难控制。我还想进一步聊聊如何构建这个 agent,不过我也很好奇,嗯,单就第三方和第一方这个一般性问题来说,情况是怎样的。You could argue that's through kind of like skills and sub agents and prompts. Again, we use the same CLI, so that's not really a factor, but you could argue you could bundle those all up into a plugin or something and bring that to Claude Code, but it feels a little bit harder to control in some ways. And I want to dive in more into how you build the agent, but I'm curious, yeah, for this like just general problem of third-party versus first-party.
你们是怎么考虑这件事的?或者你们对公司有什么建议,比如什么时候该做、什么时候不该做。我也不太清楚。H how you guys have thought about it or advice you'd have for companies maybe when to do it, when not to do it. I don't know.
Jeff Barg:我有很多想法。我认为这些理由肯定都是我们引导人们使用 agent 而不是 CLI 的主要原因。我也觉得还有各种各样其他的特殊原因,对吧?比如,编码代理在不同环境中的表现会有所不同。Jeff Barg: I have a lot of thoughts here. I think all of those reasons are definitely I think the primary reason why we guide people towards the agent versus the CLI. I do think there are all sorts of other idiosyncratic reasons, right? Like you coding agents perform differently in different environments.
有一段时间,我们的 CLI 是不支持 Windows 的,对吧?这有点像那些奇奇怪怪的小办法,能很轻松地把人引导去使用智能体,不然他们可能根本不会用。我觉得另一个很重要的原因是——现在可能还不成立,但我认为未来会成立——拥有一个第一方智能体有很多编排方面的好处,对吧?比如说市场推广,很多市场推广都是以活动为基础的,对吧?For a while, we didn't support Windows for a CLI, right? It's sort of like these weird little like easy ways to guide people towards the agent where they might not use it otherwise. I think the other big reason which is maybe not true today, but I think will be true in the future is there are a lot of orchestration benefits of having a first-party agent, right? Like if you think about go-to-market, a lot of go-to-market is event based, right?
所以你想在有人回复你的营销活动时启动代理,这样就能马上收到邮件回复,而响应速度其实非常重要。So you want to kick off the agent when someone replies to your campaign so that like you can actually get an email back right away and like that time to response is actually really important.
也许这里会出现不断演进的标准,对吧?我觉得 MCP 里有些有趣的东西,或者说它未来可能会演进出一些方式,让外部智能体也能参与进来。毫无疑问,就目前而言,将其放在内部,并对编排层进行良好的控制,优势很大。我还觉得,这种编排在成本方面也有很多优势。Maybe there will be standards that evolve here, right? I think there's some interesting things in MCP or there potentially ways that this will evolve to be external agents as well. Definitely today I think there's a big advantage of having this in-house and having good control over that orchestration layer. I think also there are just a lot of advantages of that orchestration with respect to cost.
如果我想想 Clay 启动时的情况,会有一个主代理线程,但主代理通常会启动很多其他代理,对吧?所以,如果我想想如何构建一场外呼营销活动,通常会先找到一份潜在客户名单,然后为每位潜在客户启动一个代理,负责调研、筛选和撰写文案。而这种做法的优劣版本之间,成本差异可能会达到数个数量级。If I think about Clay spins up there's this main agent thread, but the main agent spins up a lot of other agents typically, right? So if I think about building an outbound campaign, usually you'll find a list of leads and then you'll spin up an agent for each to research, qualify, do copywriting for those leads and the difference in cost between a good version of that and a bad version of that can be orders of magnitude.
所以我认为,对这一编排层进行非常严格的控制确实很重要。And so I think that having like very tight control over that orchestration layer is really important.
Harrison Chase:是的,我觉得这两点都说得很好。还有一种类似的、基于事件的编排逻辑,我们目前只做了一点,但我能想象未来会涉及记忆、后台处理、梦境之类的事情。我认为记忆在不同应用中的表现会有所不同,所以能够对它进行控制非常有意义。我完全同意你刚才关于优化成本的说法。关于这个话题我还有最后一个问题,然后我想深入聊聊一些技术细节:在成本、准确性和延迟方面,把你们的一方智能体和 Claude Code 做比较时,你觉得它在哪些方面表现特别出色?Harrison Chase: Yeah, I think both those things are great points. Another kind of like similarly like event- based orchestration logic which we only do a little bit today but I could see in the future is things like memory and background and dreaming and things like that. I think that me memory will look different per application and so being able to control that makes a ton of sense. Totally agree with what you're saying around like optimizing for cost. Maybe one last question on this and then I want to dive more into some of the technical details, but like when you're comparing your first-party agent to Claude Code between kind of like cost, accuracy, and latency, where are the places where you think it like really shines?
杰夫·巴格:是的,我的意思是,我想我们确实会认真考虑延迟和成本,对吧?插件也有很多方面的考量,比如,一个 CLI 加上一些技能文件,可能会非常好用,但我觉得也可能非常浪费 token,也可能非常浪费轮次,对吧?如果你要先读取一堆技能文件再执行操作,那么与直接在某个平台上把这些技能预加载到系统提示中,或者进行各种微优化相比,效率可能会低一些。这些优化本身都很简单,但累积起来确实会有影响。所以,是的,我认为这样效率高得多。实际上,我们听到的反馈是,人们会在 Claude Code 中使用它,效果很棒,但速度比较慢;而如果他们在代理中使用,我们至少能了解延迟和成本之间的权衡,因此可以更好地推动这些结果。Jeff Barg: Yeah, I mean I'd say we really think about latency and cost, right? I think there's a lot of reasons as well that a plugin, so just a CLI plus some skill files they might work really well, but can be very token inefficient, I think, can be very turn inefficient, right? If you're reading a bunch of skill files and then doing something, it's potentially more inefficient than if you're on a surface just pre-loading those skills into the system prompt or doing all of these sort of micro optimizations that are pretty simple but do add up in sort of in the aggregate. So yes, I think it's much more efficient. It's we've actually heard that feedback is that people will use it in Claude Code and it works great but it's pretty slow and then if they do in the agent it's we at least have visibility of what the latency cost trade-offs are so we can drive those outcomes much better.
Clay 为什么围绕编码代理构建Why Clay built around a coding agent
Harrison Chase:我想稍后再回过头来聊聊你们具体是如何通过技术手段实现这些成果的,不过也许我们可以先退一步,铺垫一下背景。听起来,你们想表达的是,底层其实是你们在运行一个编程智能体。我也很想进一步了解,具体来说,这在技术层面是什么样的。Harrison Chase: I want to come back in a second to like how technically you guys drive those outcomes but maybe like stepping back and setting the stage. It sounds like what you're getting at is like under the hood, it's basically a coding agent that you guys are running, but I'd be curious to hear more about like yeah the technical details of what that of what that looks like.
Jeff Barg:其实回过头看一下我们之前在这方面的尝试:我们去年推出了 Sculptor。我认为在很多方面,那个项目的目标与这个项目相当相似。我们从 Sculptor 中学到了很多。再说一次,Sculptor 在任务层面的结果上表现相当不错,但在这类周期更长的任务上表现并不理想。我认为其中的一些经验是,首先,我们确实需要围绕一个编码智能体来构建。Jeff Barg: Actually rewinding a bit to the earlier attempts that we had at this we launched Sculptor last year which in many ways I think the goals of that project were quite similar to this. We had a lot of learnings from Sculptor. Sculptor was quite good again at sort of task level outcomes but not really great at these longer horizon tasks. I think some of the learnings were one we really needed to build around a coding agent.
是的,再说一次,这并不是一个显而易见的结论,但我确实觉得,这些编程智能体有些特性奇怪地具有普适性,而且在某些方面相当出人意料。我认为其中一些现象,是我们观察人们用 Claude Code 执行市场推广任务时发现的。再说一次,他们实际上并没有使用任何脚手架,比如 prelay CLI;人们就是用 Claude Code 来制定市场推广方案,而它的表现方式让我很意外——这并不符合直觉。其中一点是,从工程层面来说,Bash 确实是图灵完备的,你可以把很多东西组合起来。如果你看看这些智能体编写的 Bash 命令,就会发现它们极其复杂。它们可能有一百多行 Bash 代码,使用条件语句、循环等结构,把不同的 CLI 命令组合在一起。Yeah again not obvious as a as a conclusion but one I do think there's something weirdly generalizable about these coding agents right in ways that are somewhat surprising some of this I think we just observed from people doing go-to-market tasks in Claude Code again without actually any of the scaffolding like prelay CLI people were using Claude Code to build go-to-market plays in again ways that were surprising to me like this is not intuitive So one was that just on a engineering level Bash is really it's Turing-complete you can compose a bunch of things together. If you look at the Bash commands that these agents write they are extremely complex. It's can be 100 plus lines of Bash that use conditionals for loops all these things to compose different CLI commands together.
而且,这些做法是我作为工程师在终端里手动输入时不会采用的。所以这些都是它带来的好处,而且我认为模型的后训练似乎让这些运行框架都受益了。Again in ways that I as a an engineer if I'm typing my terminal would not do. And so there's all of those benefits and I think all of just the post- training on the models seems to have benefited those harnesses.
后训练教会了 Clay 什么,以及一种类似 SQL 的搜索语言What post-training taught Clay, and a SQL-like search language
Jeff Barg:我们推出 Sculptor 时,我觉得我们对它的不足之处已经有了比较清楚的认识,对吧?比如,它没法处理这类长周期任务。在可组合性方面,它也不一定做得很好,对吧?比如,它会调用几个工具,然后可能就停下来了。Jeff Barg: When we launched Sculptor I think we had a pretty good understanding of the gaps, right? It was like it couldn't do these long horizon tasks. It wasn't necessarily good at just some of the composability aspects, right? Like it would call a couple of tools and then maybe like stop.
所以,我们当时觉得,其中一个可能的原因是,我们的环境相当独特,和这些模型的训练环境很不一样。于是去年年底,我们实际上转而研究后训练,想弄清楚:我们的模型或智能体在某些方面表现不佳,问题出在模型层还是 harness 层?我们是不是应该只在现有的 harness 上不断优化?And so one of the things that we had thought was maybe our environment is just pretty idiosyncratic. It's pretty distinct from what these models are trained on. And so we actually took a tangent into post training at the end of last year to try to sort of like hey our model or our agent fall short in a couple of these ways. Is it at the model layer the harness layer kind of should we just hill climb on the harness we have?
我们真的要把所有内容都重建一遍吗?Should we like really reconstruct everything?
坦率地说,我觉得我们做的模型训练,你能看到图表上的表现逐渐接近 Sonnet 或 Opus 的水平。你能看到这些变化,但这并不是阶跃式的差异。我觉得从中得到的启示就是:嘿,单靠运行框架工程,我们还能挖掘出很大的提升空间。而最好的模型大概也不会在这方面带来阶跃式的进步。问题只是:嘿,我们实际上没有赋予它足够的表达能力,让它能完成我们需要它做的事情。And candidly, I think the model training that we did you could see the graphs kind of getting closer to Sonnet or Opus level performance. You could kind of see all these things, but it wasn't a step function difference. And I think the learning there was just, hey, there's a lot of juice that we can squeeze out of just the harness engineering. And it's probably like the best model would not make a step function improvement in this. It's just like, hey, we're not giving it actually the expressibility to do the things that we needed to do.
Harrison Chase:所以,作为一个智能体工程团队,你们会谈到阶跃式改进。你们多常寻找这种阶跃式改进,而不是在基础功能上不断迭代、做一些小改进?Harrison Chase: So you guys as an agent engineering team, you talk about like step function improvements. How often are you looking for step function improvements versus like just iterating on like smaller improvements on a base thing?
是每个月你都会想:“嘿,我们得做一个阶跃函数。”还是每六个月一次、每年一次?Is it every month where you're like, "Hey, we got to make a step function. Is it every six months, every year?
Jeff Barg:哦,我是说,这很难。我觉得这可能还是取决于每一种变化的类型。就过去 12 个月的实践而言,我至少能想到三个这样的时刻,对吧?比如围绕 CLI 进行的平台重构。Jeff Barg: Oh, I mean it's hard. I think it's probably again specific to each kind of shift change. I'd say in practice over the past 12 months, I can think of probably three moments at least, right? There was like the platform re-engineering around the CLI.
当时出现了某种向编码代理转变的趋势。于是我们围绕一个编码代理构建了新的代理。我想说,另一个重大转变其实是——这或许属于平台层面的内容——我们重新设计了平台的很多部分,让它们用 DSL 来表示。具体来说,我想到的是我们的搜索平台。我们有一套包含 9 亿条联系人记录和 4000 万家公司数据的企业及联系人数据集,而我们为 Sculptor 表示这些数据的方式……There was sort of the this coding agent shift. So building our new agent around a coding agent and then I would say the other big shift was actually this is maybe part of the platform piece but we redesigned a lot of our platform to have DSLs to represent them. I'm thinking specifically about our search platform. So we have a company and contacts data set of 900 million contacts 40 million companies and the way we had represented this for Sculptor.
所以一年前,我们基本上有一堆过滤器,它们会生成结构化输出,把一堆过滤器组合起来。效果完全没问题,但同样,它其实只在简单场景下表现得很好。对于那种比较复杂的查询就不太行,比如“我想找在纽约、融资金额低于某个数、而且被《纽约时报》提到过的初创公司”。我们最后的做法是,为我们称为搜索查询语言的东西构建了一种 DSL。它是一种类似 SQL 的变体,用来构造公司和联系人查询。So a year ago was like we have all these filters basically have a structured output that like builds a bunch of filters and composes them together. Worked totally fine but again sort of like was really good for the easy cases. Not good at the like sort of long tale of like hey I want startups in New York that have raised under this amount of money that have been mentioned in the New York Times. Sort of like these more complex queries. What we ended up doing is we built this DSL for what we call our search query language but it is like a SQL it is a SQL like variant to construct companies and contacts queries.
哈里森·蔡斯:这很有道理。我觉得我们现在在 lang 上也在做类似的事情:我们希望人们关注 traces,并在此基础上创建一种类似 SQL 的变体,让使用变得越来越容易,因为模型很擅长处理这类东西。Harrison Chase: That makes sense. I think we're doing something similar with lang now where we want people to care where traces and we're creating a SQL-like variant on top of that to make it easier and easier because models are really good at that.
Jeff Barg:我们当时的想法是,前沿模型擅长什么是一回事,你的应用是什么样又是另一回事。你基本上有两个选择:要么用你现有的东西来训练它,要么把你现有的东西改造成更接近这些模型训练数据的形式。所以我认为模型看过很多 SQL 代码,也知道怎么生成 SQL 代码。Jeff Barg: This was our thinking at the time was just there's what the what the frontier models are good at and then there's kind of like what your application looks like and you really have two options. It's like train it on the things that you have or take the things that you have and make it closer to what these models are trained on. So I think models have seen a lot of SQL code and they know how to generate it.
Harrison Chase:听起来你们正大力朝这个方向努力:让它呈现出模型擅长的样子。Harrison Chase: And it sounds like you guys are going pretty hard in that direction of make it look like what the models are good at.
Jeff Barg:是的,我其实觉得它们并不互相排斥。比如,SQL 除了是模型训练所用的东西之外,还有很多好处,对吧?它也具有可组合性,也算是模块化的。Jeff Barg: Yes, I actually think they're not exclusionary. Like SQL has a ton of benefits beyond just being what the models are trained on, right? It's also composable. It's also sort of modular.
它具备所有这些不错的特性。所以我不认为这些东西彼此排斥,不过是的,我觉得我们能从某种测试框架或 DSL 层中榨取的价值最多。You have all these nice properties about it. So I don't think these things are mutually exclusive, but yes, I think the most juice we could squeeze was out of the sort of harness or DSL layer.
Harrison Chase:我看你们和各家实验室的关系都挺不错的。这个事情谁都能做吗?任何人都能把自己的平台做成这样,根据模型各自擅长的领域来分发吗?还是说你们必须和实验室保持密切合作,并和他们不断迭代?Harrison Chase: I see that you guys have a pretty good relationship with the labs. How like can anyone do this? Can anyone make their platform like in distribution of what the models are good at or do you have to really kind of like be close with the labs and iterate with them?
杰夫·巴格:我认为说实话,大多数人都能做到。就像你说的,我们经常和各家实验室交流。我觉得他们会就模型的训练方式,以及如何针对我们的使用场景最好地使用这些模型,提供很多指导。我还想说,我相信大家对此有不同的理念和方法。Jeff Barg: I think most people can do it honestly. We to your point like we talk to the labs a lot. I think they offer a lot of guidance on how their models were trained and how to best use the models for our use cases. I'd say also we I'm sure there's different philosophical approaches to this.
比如,我们很乐意把评测结果,或者说智能体的表现反馈给各个实验室。我觉得并不是每家公司都愿意这么做。你大概也可以在没有这些信息的情况下构建智能体。这真的很不错。Like we have no problem sharing eval or sort of our performance of our agent back to the labs. I don't think that's necessarily true for every company. You can probably build an agent absent of that. That's really good.
我觉得这里其实没什么真正的秘诀。I don't think like there's a really any secret sauce here.
采用现成测试框架的理由The case for an off-the-shelf harness
Harrison Chase:这个 harness 本身是什么样的?Harrison Chase: What does the harness itself look like?
Jeff Barg:我们最初使用的是现成的 Pi。我认为原因有很多,其中一点是延迟和成本。它比 Claude Code 或 Codex 之类的工具轻量得多。Jeff Barg: We started with off-the-shelf Pi. And I think for a variety of reasons. One on the point of latency and cost. I think it's much more lightweight than something like Claude Code or Codex.
我觉得我们喜欢它的地方在于,它非常容易扩展,也很容易理解。它没有用太多复杂的技巧,只是相当简单的软件,我们可以随着时间推移逐步定制。我觉得它确实帮我们很快上手了。And I think what we liked was it was very extensible and understandable. Like there was not a ton of crazy tricks that they were doing. It was just fairly simple software that we could start customizing over time. I think it really helped us get started quickly.
我觉得我们并没有认真考虑过从头搭建一个 harness,当然,我们以前也有过这样做的经验。不过,直接从一个我作为开发者已经熟悉、而且在质量和成本基准测试中似乎优于那些更重量级 harness 的东西开始,确实有它的好处。I don't think we considered briefly building a harness from scratch and certainly we'd had experience doing that but I think there was something nice about just getting something started that actually I was familiar with from as a developer that seemed to be performing well on benchmarks for quality and cost compared to the more heavyweight harnesses.
所以,是的,它最初是从那里开始的。然后我觉得随着时间推移,它有了一些偏离——我们开始在它的基础上进行构建。但我认为,我们尽可能地尝试围绕插件系统来构建;比如说,我们确实努力让它尽可能接近 Pi。So yeah, it got started there and then I think over time it's deviated a bit where it's we've started to build on top of it but as much as possible I think we tried to build on the plug-in system like we tried to actually just keep it as close to Pi as possible.
Harrison Chase:嗯,我正想问,你说你们在它之上构建,是什么意思?是指插件系统吗?还是说你们 fork 了 Pi,并做了类似这种层面的修改?Harrison Chase: Yeah I was going to ask when you say you build on top of it what does that mean? Does that mean the plug-in system does that mean you've forked Pi and are making changes out like that level?
Jeff Barg:我们没有 fork Pi,所以大部分改动都在插件层面。有些部分挺有意思的。我觉得,构建这个项目时的一个技术挑战是持久化能力。实际上,我们有一大批运行这些代理的主机组成的集群;如果某台主机因故宕机,或者我们需要进行部署,这些代理也应该继续运行,因为它们可能要运行 30 分钟甚至更久。所以我觉得当时的时机可能不太合适,但我们几乎是重新实现了后来称为 Pi Durable 的东西。于是我们在上层实现了一些类似的功能,不过再说一次,核心运行框架仍然是现成的 Pi。Jeff Barg: We haven't forked Pi so it is mostly at the plug-in level. There are pieces of it that it was funny I think for one of the technical challenges for building this project was the durability piece right so actually you we have a host of fleets that run these agents if one of the hosts goes down for whatever reason if we need to do a deployment these agents should continue running because maybe they're running for 30 minutes or more. So I think it was it was probably bad timing, but we re-implemented pretty closely, I guess, what ended up being Pi durable. And so there were sort of things like that ended up being on top that we implemented, but again, the core harness is still offtheshelf Pi.
Harrison Chase:你能谈谈持久性吗?它为什么这么重要?在实现时,你们会使用像 Temporal 这样的现成方案,还是会更多地采用原生方式来构建?Harrison Chase: Could you maybe talk about durability and why it's so important and when you implement it, do you use something like temporal that's out there or did you build more natively?
杰夫·巴格:嗯,首先,我觉得持久性非常重要。主要是从用户的角度来看,对吧?比如说,这些智能体运行了 30 分钟,然后突然就崩溃了,或者出现了某种意料之外的错误,这就很糟糕。所以,这大概也和那些常见的原因有关,比如客户信任。Jeff Barg: Well, first off, on durability, very important, I think. Mostly from a user perspective, right? Like it's really bad if these agents run for 30 minutes and then they all of a sudden just I don't know crash or like you see some like unexpected error. And so there's probably all the normal reasons of just customer trust.
我觉得另一点就是,拥有一个第一方智能体确实有这样的优势。我不知道,你不必一直开着笔记本电脑,等着你的 Clay 工作流运行;你只要随手派个任务,它就会替你跑起来,对吧?你还可以设置定时任务,或者事件触发任务,它们应该都能自动运行,而且你应该可以确信它们确实会完成你想让它们做的事。是的,说到构建它,我们是基于 BullMQ 搭建的,不管这样做是好是坏。I think the other thing is just this is an advantage of actually having a first-party agent. I don't know, you don't have to keep your laptop open like as your Clay workflow is running like you can just toss off a task and it will run for you, right? And you can have schedule tasks or like event trigger tasks and they should just run and you should have confidence that they're actually going to accomplish what you want them to. Yeah, in terms of building it we built on top of BullMQ for better or worse.
我觉得我们在这方面的体验相当不错。实际上,我们的很多代理都是基于 BullMQ 构建的。是的,我们已经把它的能力发挥得相当充分了。我想,对于其他一些以极高规模运行的代理,我们目前仍主要使用 BullMQ,而且整体运行得还不错。I think we've had pretty good experience doing this. Actually many of our agents are built on top of BullMQ. And yeah, we've stretched that pretty far. I think for some of our other agents that run like at extremely high scale, we're still running them mostly on BullMQ and it's mostly working.
实验室自建的测试框架真的效果最好吗?Do lab-built harnesses really work best?
Harrison Chase:你之前提到的一点是,要让自己所做的事契合模型擅长的领域,这很重要。我觉得模型实验室那边有一种说法:他们会打造最适合这些模型的工具框架,而你们选择了 Pi,它并非出自模型实验室。你怎么看这种说法?Harrison Chase: One of the things that you talked about earlier is the importance of kind of like being in distribution of what the models are good at. I think there's an argument from the model labs that hey we're going to build harnesses that are going to be best for the models and you guys chose to go with Pi which is not from a models lab. How do you think about that argument?
Jeff Barg:我对我们的智能体本身没有明确的看法,但我觉得,看到这一点在其他领域并不成立,还是挺令人意外的。Jeff Barg: I don't have a concrete view for our agent specifically but it has been surprising to see I think how not true this has been for other domains.
在编程方面,我用 Codex,也用 Pi。很多时候,我更喜欢 Pi 作为编程智能体时的表现。它们确实各不相同,作为用户,你能切实感受到这一点。所以这很有意思。从第一性原理出发,我确实很认同那些实验室提出的论点;但如果从经验事实来看,实际情况似乎并非如此。这里存在某种脱节,我还没有想清楚这种脱节为何存在,但我们看到的情况就是这样。For coding I use Codex I use Pi and there are many times where I prefer what Pi does as a coding agent and they are distinct you can actually feel it as a user and so that's been interesting from first principles I actually really buy that argument from the labs if I look empirically at what's happened it doesn't seem like that's true so there's some disconnect there that I don't have a good thesis on why that disconnect exists but that is what we have seen.
Harrison Chase:为了在基础运行框架之上进行上下文工程,从而实现延迟、性能和成本方面的提升,你们具体做了哪些工作?Harrison Chase: In terms of some of the context engineering that you've done on top of the base harness in order to get these like latency and performance and cost improvements, what have those things been?
Jeff Barg:其中很多可能都不是什么高深技术。我觉得,很多都是唾手可得的改进,比如技能文件里有哪些内容可以加载到系统提示词中。Jeff Barg: A lot of them are not probably not rocket science. Like I think a lot of it is lowhanging fruit around things like what things exist in skill files that could be loaded into the system prompt.
比如说,我们应该如何将技能加载到系统中?Like what are things that how should we load skills into the system?
Harrison Chase:这个智能体有多少项技能?Harrison Chase: How many skills does the agent have?
Jeff Barg:我不知道确切数字,但大约是 20。Jeff Barg: I don't know the exact number but it's on the order of 20.
Harrison Chase:它有多少个工具?Harrison Chase: How many tools does it have?
Jeff Barg:大概在 8 到 10 之间。Jeff Barg: Probably around 8 to 10.
我不知道这里的确切比例,但 Bash 工具占 85% 以上,读取和写入可能各占 5%。I don't know the exact percentage here but it is 85% plus the Bash tool and probably 5% 5% read and write.
Harrison Chase:Bash 工具的大部分功能都是调用 CLI 吗?还是说你发现它实际上还会做很多其他与 Bash 编程相关的事情?Harrison Chase: And most of the Bash tool is calling the CLI or do you find that it actually does a bunch of other like bashcoding related things?
Jeff Barg:它能做很多事情。是的,我想我们看到它在编写 Python 文件。我们看到它在编写 Bash 脚本,比如把 CLI 的输出写入文件,然后对这些文件进行字符串处理。所以,我们看到它做了非常多的事情。Jeff Barg: It does a bunch of stuff. Yeah, I think we see it writing Python files. We see it writing Bash scripts, like writing the output of the CLI to files and then doing the string manipulation on the files. So, we see it doing a ton of stuff.
哈里森·蔡斯:你写过哪些插件,比如那些能做一些超出技能或工具范畴事情的插件?Harrison Chase: What are some of the like plugins that you've written that do things beyond skills or tools?
Jeff Barg:是的,其中很大一部分其实都在做 UX 集成。所以,我们可能把这些事情分成两类。一类是对 CLI 不适用、但对 agent 适用的事情。比如说,导航到某个 artifact。Jeff Barg: Yeah, a lot of it has been the actually the UX integration. So, there maybe like two buckets of things that we have. So one is around things that don't apply to the CLI but do apply to the agent. So things like hey navigating to an artifact.
所以,如果你构建了一个工作流,实际上只是让用户在工作流运行时看到它,或者在工作流构建过程中看到它的结构。还有几个相关方向的工具。另一个是权限和审批。对于 Clay 中的一些 CLI 命令,我们有专门的审批流程,而且我们确实希望这些命令能够以确定性的方式获得批准。So if you've built a workflow actually just having the user like see the workflow as it's running or like see the structure of the workflow as it's being built. And there's a couple of tools in that vein. The other is permissions and approvals. We have sort of specific approvals for some of the CLI commands in Clay and we really want those to be deterministically approved.
所以周围有一套相关工具。So there's a set of tools around that.
在沙箱外运行代理Running the agent outside the sandbox
Harrison Chase:编码智能体需要编写和执行代码。你们是如何搭建沙箱的?背后的基础设施是什么?你们是把智能体放在沙箱里,还是让智能体连接到沙箱?Harrison Chase: Coding agents need to write and execute code. How do you guys do sandboxes? What is the infrastructure behind them? And do you do the agent in the sandbox or the agent connecting to the sandbox?
Jeff Barg:我们启动这个项目时,我想我当时非常兴奋。我最大的顾虑是它的安全边界,对吧?我想,安全生态系统——我们之后也许可以聊聊这个——眼下简直乱成一团。我觉得现在开发软件是个非常有意思、也令人担忧的时期,但我想我们真正想要的东西之一,是一个非常安全的智能体。Jeff Barg: When we started this project, I think my I was very excited about it. My biggest concern was the security boundaries of this, right? I think one the security ecosystem, we can maybe talk about this, but the security ecosystem right now is crazy. It's a very interesting and scary time I think to be building software, but I think one of the things we really wanted was a yeah, highly secure agent.
我认为这也促成了围绕这一点做出的一系列不同设计决策。其中一个重要决策是做某种拆分:让 agent 在沙箱之外运行,对吧?也就是说,agent 在别处运行,并在我们使用的沙箱上执行 Bash 命令或读取命令。And I think that led to a bunch of different design decisions around this. One of the big ones was kind of a split having the agent run on not in the sandbox, right? So the agent's running somewhere. It is executing Bash commands or read commands on the sandbox that we're using.
我们认真考虑过,我们实际上是否需要一个沙箱?我觉得有很多有意思的项目在探索某种模拟沙箱,比如 Vercel 的 just-Bash。We thought a lot about actually did we need a sandbox? I think there's a lot of interesting projects around sort of simulated sandboxes or I'm thinking of just-Bash from Vercel.
我觉得 Pydantic 的 Monty 大概也属于这一类。也许我理解错了,不过有几个这样的项目……I think Monty from Pydantic is sort of in this vein. Maybe I'm wrong about this, but there's a couple of these projects that.
Harrison Chase:QuickJS,我们……所以这就是我们在 deep agents 里用的,是 Quick.js,很像一种语言模拟器之类的东西。Harrison Chase: QuickJS we so that's what we use in deep agents is quick.js very similar like emulator of a language or something like that.
Jeff Barg:是的,我觉得这些做法都很有道理。其实我对这件事没有长期看法。我觉得短期内,我们真正想要的只是让它与现有的编码智能体完全对齐。再说,当时确实有很多不确定性。我觉得尤其是在构建一个新的智能体时,很多事情都不确定:什么样的表现才算出色?又可以做出哪些妥协,在保持出色表现的同时,还具备一些其他不错的特性?所以,我们一开始就想,不如把一个编码智能体放进沙箱里。我们知道这种方式效果很好,这一点从用户使用 CLI 的体验中就能看出来。我们确实有一个真正隔离的 Firecracker 沙箱,智能体在沙箱外部对其进行操作。Jeff Barg: Yeah, I think like these make a lot of sense. I don't actually have a long-term view on this. I think in the short term you really we really just wanted full parody with what coding agents were and again it was sort of there was so much uncertainty like I think especially when you're building a new agent there's a lot of uncertainty around like what does great look like and then what compromises can you take to kind of keep great but do have some other nice properties and so we started just being like let's take a coding agent put it in a sandbox we know that works really well just from like our users experience using the CLI We do have an actual firecracker isolated sandbox that an agent outside of the sandbox is operating against.
Harrison Chase:你们是在从头构建这套沙箱基础设施吗?还是在使用某个服务提供商?你们是如何决定的?Harrison Chase: Are you building that sandbox infrastructure from scratch? Are you using a provider? How did you decide that?
Jeff Barg:我们在使用一个提供商。目前我们使用的是 Daytona。在沙箱生态系统中,很难做出这个选择。Jeff Barg: We're using a provider. We're currently using Daytona. It is hard to make that choice in the sandbox ecosystem.
和很多不同的沙箱服务提供商交流很有意思。我觉得很多功能都已经有点商品化了,对吧?当然,你可以做出不同的选择,比如它是不是通过 VM 隔离,安全边界具体是什么。不过除此之外,主要就是成本和定价上的一些差异,有些方案和其他方案不太一样。但这些决策大多还是取决于你对服务提供商的信任。说到底,我真正考虑的只有安全边界。定价当然也要考虑,尤其是如果这个智能体确实发展到相当大的规模,成本结构也是其中一部分。但天哪,这些决策真的很难做,因为你基本上是在赌哪家的安全团队最靠谱。It's interesting talking to a lot of these different sandbox providers. I think a lot of the features feel like they are somewhat commoditized, right? Like there's certainly different choices you can make around yeah is it is it a VM isolate like kind of what are what are the security boundaries but beyond that right you kind of have some cost like some pricing differentials right some of the schemes are different than the others but the decisions are mostly around the trust that you have in the provider again like the only consideration I have really is the security boundaries pricing certainly is a consideration just you if this agent does gain significant scale that is a part of the cost structure but oh man I'm it's just really hard to kind of make these decisions because you are basically trusting whose security team is most on top of it.
Harrison Chase:新的 Clay agent 比之前的覆盖范围更广。这会如何影响你对它的监控方式,或者你如何跟踪客户用它来做什么?它在生产环境中的表现又如何?Harrison Chase: New Clay agent is broader than previous ones. How does that change how you think about monitoring it or keeping tabs on what customers are using it for? How it's doing in production?
Jeff Barg:是的。我认为这是一项挑战。我觉得这是个挑战,因为正如你所说,它有意设计得非常宽泛,所以可以用它做很多不同的事情。我认为,我们对它的信心达到了前所未有的程度,相信它确实能够胜任各种各样的任务。Jeff Barg: Yes. One I think it's a challenge. I think it's a challenge because to your point it is extremely broad intentionally so there's a lot of different things that you can do with it. And I think we're the most confident that we have been on it will actually be able to do a wide range of tasks.
我觉得,我们需要弄清楚对用户的判断、它最擅长哪些任务,以及我们希望如何引导人们使用这个智能体。不过,人们实际使用它的情况又是另一回事,两者并不完全相同。这个智能体上线大约三周了。我们确实看到了差异:我们原以为人们会用它来做什么,以及人们实际上在用它做什么。I think figuring out what people we have a thesis on what the tasks it is best at are and how we want people to be guided to using the agent. But then there's also the reality of how people are using it and these things are not exactly the same. So the agent's been live now for about 3 weeks. We do see this discrepancy of like what we thought people would use this for and then what people are using it for.
我想试着弄清楚这一点。I think like trying to figure that out.
这包括查看 traces,也包括和人们交流,了解他们如何看待这个智能体,以及他们打算如何使用 Clay。我认为,我们更想要推动制度化的做法,其实是根据在线评估中的 traces 对它们进行分类,或者说,试着把这些内容归类,并进一步量化。It is a combination of looking at traces. It's a combination of talking to people about how they view the agent, how they are trying to use Clay. And I think the thing that we are trying to institutionalize more is actually categorizing traces at a from online evals or kind of a just actually try to bucket these and quantify it a bit more.
为什么 Codex 不擅长调试长追踪记录Why Codex is bad at debugging long traces
Harrison Chase:我们可以在 lang 中添加哪些内容,让你们更轻松地做到这一点?Harrison Chase: What are some things we can add into lang to make it easier for you guys to do that?
Jeff Barg:我想说的一件事是——嗯,我们确实在用 Engine,而且我觉得 Engine 真的很有帮助,尤其是在最早期,它能发现 Agent 中的问题,并以非常便于采取行动的方式向我们标记出来。我对它几乎不会产生无关告警这一点印象特别深。通常,LangSmith 或 Engine 标记出某个问题时,那确实是我们需要采取行动的事情,这很棒。我感到意外的一点是,当我们知道某条 Trace 有问题并去查看时,Trace 通常已经相当长了。也就是说,里面有数百次工具调用。Jeff Barg: One of the things that I well one we do use engine and I think engine is actually really has been really helpful I think especially at the earliest stages of just seeing problems in the agent and flagging those to us in ways that were like very actionable. I think I've been really impressed by just how little noise there is. Like usually when LangSmith or when engine flags something it's usually actually something that we need to take action on which is great. I think one of the things that I've been surprised by is when we know there's a problem with the trace and we look at the trace usually the trace is quite long now. So right there's like hundreds of tool calls.
你点开哪怕一个单独的工具调用,看到的也像是一条有几百行的 Bash 命令。所以,理解 trace 的结构倒是容易,但要弄清楚智能体究竟是在哪儿出了问题、流程到底是哪个环节出了故障,就很难了。让我感到意外的是,如果我把这段 trace 放进 Codex,然后问它“你能看出这里出了什么问题吗?”,它其实很不擅长做这件事。You click into even an individual tool, it's like a Bash command with hundreds of lines. And so it's easy to sort of understand the structure of the trace but hard to understand like actually where did the agent fall down and what was the what was the breakdown in process. What I've been surprised by is if I take that trace and put it into Codex and just ask like can you figure out what went wrong here? It's actually really bad at doing this.
哈里森·蔡斯:是啊。我还以为你会说它特别擅长做这件事呢。Harrison Chase: Yeah. I thought you were going to say it was really good at doing that.
Jeff Barg:它做这个真的很差。说来也奇怪,它做这个差得出奇。如果你让它做一些事情,比如先逐条检查每个 Bash 命令,并总结该命令在做什么,它就能做得相当好。所以可能有某种技能文件,比如我也不知道,叫“跟踪分析”之类的,你可以去找找看。Jeff Barg: It's really bad at doing it. It's surprisingly it's surprisingly bad at doing this. If you got it to do things like first go through each Bash command and summarize what the Bash command is doing it can do it pretty well. So there's probably some sort of a skill file that's like I don't know a trace analysis that you could you could come to.
我觉得 Poly 可能就是在尝试做这个。我觉得它其实很棒。这种情况下,我真希望 LangSmith 能提供类似的功能。比如,Engine 适合从整体层面来分析;而对于单条 trace,则可以看看具体哪里出了问题。I think poly was probably an attempt at this. And I feel like it's actually great. This is kind of something where I wish LangSmith just had something here. Is like a on a one-off basis like engine is good for sort of the aggregate level just on a one-off trace basis like what's going wrong.
Harrison Chase:我们之前聊过某种类似阶跃式变化的东西。我觉得目前我们看到的很多引擎使用场景,正如你所说,都是非常可直接采取行动的事情。我觉得这些可能并不是那种阶跃式变化。你觉得有没有什么事情,如果我们把引擎抽象成一个覆盖追踪数据的智能层——你已经有了所有这些数据,但该怎么采取行动?有没有什么东西能非常有助于找出这些阶跃式变化?还是说这些变化其实主要来自行业和更广泛的产品层面,所以很难把它们放进一个覆盖追踪数据的智能层里?Harrison Chase: We talked about earlier about kind of like step function changes. I think right now a lot of the usage we see from engine is to your point like very actionable things. I feel like those probably aren't the step function changes. Are there things that you think if we if we abstract engine to kind of like an intelligence layer over traces you've got all of this data but how do you take action? Are there things that would be like very helpful in like figuring out these step function changes or are those really coming from like just like industry and broader product things and it's kind of hard to put that in an intelligence layer over traces.
Jeff Barg:我觉得阶跃函数变化中真正很难的一点,是量化它们究竟能带来什么帮助,对吧?Jeff Barg: One of the things that I think is really hard about the step function changes is kind of quantifying like what they can help with, right?
比如,如果某项阶跃式改动只影响大约 2% 的 traces,你就不想在这上面投入时间。所以我能想到这方面要做的工作,就是对故障模式进行聚类,然后量化。比如说,嘿,这个 agent 在创建工作流时有 20% 的概率会失败;如果你看看它为什么创建工作流会失败,就会发现它是在尝试编辑工作流,并且在后续的验证步骤中失败了。我这里只是举个例子。但这些都是很难得的洞见,对吧?我们必须仔细查看大量 traces,尽可能全面地了解这些情况,才能想到:“哦,对,这和那个有关。”我觉得,如果 Engine 能提供这些洞见,那会非常有帮助。Like you don't want to invest time in a step function change if it only affects like 2% of traces and so kind of the work there that I can imagine is failure mode clustering and then quantification right so like hey like the agent is failing for workflow creation 20% of the time and if you look at why it's failing on workflow creation it's because it is trying to edit the workflow and it's failing on validation steps after right I'm just giving a giving an example here But those are things that those are really hard one insights, right? Like we have to really kind of I don't know just go through a bunch of traces like really try to have a lot of context across all of these to think like oh yeah like that's related to this. I think this is something that engine could if it could offer those insights that would be very helpful.
知识中心:在智能体构建之前构建记忆Knowledge Hub: building memory before the agent
Harrison Chase:我们稍微聊聊记忆吧。Clay 里有记忆功能吗?Harrison Chase: Let's talk about memory a little bit. Does Clay have memory in it?
Jeff Barg:是的。实际上,我们花了很多时间思考这件事。回顾这个项目的历程,我觉得我们最初考虑的是记忆模块,之后才开始考虑智能体模块;在市场推广的语境下,这一点非常重要,对吧?因为这确实会影响到方方面面,对吧?Jeff Barg: Yes. And we actually spent a lot of time on thinking about this. I actually think like we if I think about the history of this project, we actually started thinking about the memory piece before we started thinking about the agent piece in go-to-market context is very important, right? Both for it really affects kind of everything, right?
就像你有一套市场进入策略,也有想要向其销售产品的客户。你也有一些行之有效的方法,能够找到这些客户并促成交易。是的,能够在市场进入过程中开展的各项工作之间分享这些洞见,真的非常关键,对吧?我觉得如果不这么做,你实际上会错失很多很多好处。Like you have a go-to-market strategy, you have a customer that you're trying to sell to. You have things that have worked for finding and closing those customers. Yeah. Being able to share those insights across the different things that you're doing in your go-to-market motion is really critical right like I think if you if you don't do this there's you're just actually losing out on a lot of lot of benefits.
因此,我们实际上与代理一同推出了一个名为“知识中心”的产品。So we launched actually alongside the agent something we're calling knowledge hub.
它本质上是——我不知道该怎么准确描述——有点像一份维基百科式的指南,介绍你的业务、你们做什么、面向哪些客户,以及你们公司的各种属性。它既会自动填充,也会自我更新,对吧?所以你注册 Clay 后,我们会根据我们对你业务的了解,帮你搭建知识中心。之后,随着你在 Clay 里做的事情越来越多,这个知识中心也会不断完善。举个例子吧,我很惊喜地发现这一点,但我觉得其中一点是,做好这件事很难——要真正理解你们的市场进入优先事项会如何随时间变化,并不容易。Clay 一开始的大部分成功,都来自向 PLG(产品驱动增长)公司销售。也就是说,很多规模较小、刚起步的公司想要建立潜在客户名单。我们在这方面现在依然做得很好,而且这块业务增长非常快。It is effectively a I don't know the best way to describe this, but it's kind of like a wiki style understanding of your business and what your business does, who you sell to and different attributes that you have about your company. This is both autopopulated and then also self-updating, right? So you sign up for Clay, we'll actually build the knowledge hub for you based on like what we think we know about your business. And then as you do more things in Clay it will actually improve over time right so I'll give an example which is I was pleasantly surprised to see this but I think one is like it's hard to do this right it's hard to actually understand what your go-to-market priorities are over time Clay had most of its success at the start selling to PLG right so it was like a lot of smaller companies that were just getting started and wanted to build lead lists and we still do really well there and that business is growing very fast.
这就像是业务的核心部分,但从战略上讲,我们希望拓展地理市场。因此,我们正在进军欧洲,也希望向企业客户销售。我认为,如果只看历史数据,可能很难推断出这两个优先事项。It's this is like a core part of the business, but strategically we are we want to expand geographically. So, we're expanding into Europe. We want to sell to enterprises as well. And I think if you just looked at historical data, it might be hard to extrapolate those two priorities.
不过,确实特别有意思。我们推出了这个知识中心,我想大概一周后,因为大家都在用 Clay 寻找欧洲公司,我们的知识中心里就更新了一条内容,大意是:“嘿,我们觉得你的 ICP 是欧洲的 B2B SaaS 公司。”我们当时就想:“哦,对。”But yeah, it was really fun. We launched this knowledge hub and I think a week later because people were using Clay to target European companies there was an update in our knowledge hub it was like hey like we think your ICP is European B2B B2B SAS companies and it's like oh yeah.
Harrison Chase:这个记忆更新的用户体验是怎样的?需要管理员批准吗,还是会自动生效?Harrison Chase: What's the UX for that memory update does an admin have to approve it or does it just automatically go in.
杰夫·巴格:我们一开始在这方面相当谨慎,所以需要管理员批准。我不想把功劳都揽到自己身上,但我觉得团队里有人对此持怀疑态度。我想大家可能都曾在某个时候、和某个智能体打交道时,有过糟糕的记忆功能体验,对吧?比如,我有时会对 Claude Code 的记忆功能非常恼火:它就是觉得你想用某种方式做事,然后你说“不,我不想这么做”,却很难纠正它。我也见过非常出色的记忆系统,比如 OpenClaw,还有一些新出现的、具有 muse instinct 风格的智能体,我觉得它们在这方面做得很好。不过,是的,我想我们一开始采取了非常谨慎的做法,需要管理员批准。我们会提供建议,智能体可以替你完成操作。Jeff Barg: We started being quite conservative here so an admin has to approve it I don't want to claim too much credit for this but I think there was skepticism ism on the team around like I think everyone has probably had a bad experience with memory at one point or another with some agent right like I'm sometimes very frustrated by Claude Code memory like it just will it thinks you want to do something one way and like it's like no I don't want to do that it's hard to correct it and I've also seen really good memory systems I think like OpenClaw and probably some of the new muse instinct style agents are really good at this but yeah so I think we started off being very conservative admins have to approve it. We'll offer suggestions. The agent can do it for you.
所以,如果你明确告诉智能体,比如“更新我的记忆”或“更新知识库”,它就会替你完成。否则,它只会提供建议。So if you explicitly tell the agent like just update my memory update knowledge hub they will do it for you. But otherwise it's suggestions only.
Harrison Chase:每家公司是只有一个记忆,还是在组织级、用户级和任务级都有不同的 hub/brain?Harrison Chase: Is there one memory per company or are there different hubs brains at an org level user level task level?
Jeff Barg:目前有两个层级:一个是公司级知识中心,另一个是用户范围内的智能体级记忆。Jeff Barg: Right now there are two levels. So there is the company level knowledge hub and then there is agent level memory which is user scoped.
Harrison Chase:代理级别的记忆是用户范围内的,这是什么意思?也就是说,比如我们聊到 Clay,我进去开启一个线程,这个线程会有自己的记忆;还是说我开启的每个线程都会共享一个属于我的用户范围记忆?Harrison Chase: What does that mean agent level memory that is user scoped? So does that mean like if I so we talk about Clay I go in I start a thread that thread has its own memory or like every thread that I kick off shares a user scope memory for me.
Jeff Barg:你启动的每一个线程。对。你可以把它想成只有两个文件夹。一个是只读的,存放公司级别的记忆;另一个则可以让代理在所有线程中读写。Jeff Barg: Every thread you kick off. Yeah. And you can think of it as like just two folders. One is like readon that is the company level memory and then one which is just read and write for the for the agent across all threads.
Harrison Chase:当公司级别的那个在后台更新时,它看起来是什么样?或者,抱歉,它会查看什么?它会查看像我的用户级交互这样的内容吗?如果会,你们怎么判断哪些属于用户层面,哪些属于公司层面?Harrison Chase: When the company one is getting updated in the background, what does it look like or sorry, what does it look at will it look at like my user level interactions and if so like how do you decide what is user what is what is company there.
Jeff Barg:我认为这对我们来说是一个正在积极开发的领域。理论上,实际上大多数内容都应该纳入考虑,所以我们肯定希望优先处理用户明确提供的内容。比如,作为用户,你可以上传文档,可以说:“嘿,这是我的销售演示文稿,或者这是我的市场进入策略。”我们应该能够提取其中的见解,并将其放入你的知识中心。我们也重视用户层面的建议,并且有一套流程,会汇总所有这些用户范围内的记忆,尝试提取出我们认为适用于整个工作区的内容。Jeff Barg: This is I think an area of very active development for us I think in theory it's like actually most things should be considered right so we definitely wanted to prioritize things that were explicitly offered by the user So, as a user, you can come in, you can upload documents, you can be like, "Hey, here's my sales deck or here's like here's my go-to-market strategy do like and should we should be able to extract those insights and put them into your knowledge hub." We do care about user level suggestions and we have some process that basically takes all of these user scoped memories and tries to extract like what do we think is global to the to the workspace.
多玩家代理,以及代理在 Slack 中的呈现形式Multiplayer agents, and what the agent looks like in Slack
Harrison Chase:听起来 Clay 里的智能体目前是单人模式。比如,有一个智能体属于我,它的记忆和你的不一样,我们也无法共享对话线程之类的。让它支持多人协作,让我们都能和同一个智能体对话并影响它,这件事的优先级有多高?Harrison Chase: It sounds like the agents in Clay are single-player right now. Like there's one there's one for me and it has a different memory than for you and we can't share threads and things like that. How high of a priority is it to make it multiplayer and where there's an agent that both of us can talk to and influence it?
Jeff Barg:是的,我觉得优先级相当高。我想,还是以我们自己的市场推广运营团队为例吧。他们在 Slack 上协作,也有一个共享的 Linear 看板。Jeff Barg: Yeah, it's pretty high priority I'd say. I think again just I'm thinking about our own go-to-market ops team. They operate in Slack. They have a shared linear board.
这大致就是他们协同构建的方式。你可以想象,智能体应该能够在相同的平台上开展工作。因此,我们希望把它带到 Slack、iMessage 这类应用中。不过,我认为我们也应该尽可能地模拟这种工作流程。And that's kind of how they build together and you can imagine that hey like the agent should be able to do one operate in the same surfaces. So bringing it to Slack, bringing it to things like iMessage even I think those are things that we want to do but also yeah I think just trying to emulate that workflow as much as possible.
为他们提供某种共享的任务上下文,让他们进入可以与其他人以及其他智能体协作的界面。是的,这对我们来说优先级相当高。我想我们很快就会在这方面有所行动。So giving them kind of shared task context bringing them into surfaces where you can collaborate both with other people but also other agents. Yeah, pretty high priority for us. I think we'll do something here quite soon.
Harrison Chase:你觉得进入这个多人世界后,只有一个 Clay 吗?是只有一个 Clay 智能体,还是你会把它们拟人化,叫作 Joe、Jim、Tom 之类的名字?Harrison Chase: Do you think there's like one Clay when you go to this multiplayer world? Is there one Clay agent or do you kind of like anthropomorphize them into Joe and Jim and Tom and things like that?
Jeff Barg:首先,这是一个非常棘手的设计问题。实际上,我最喜欢问设计师的问题之一就是:嘿,如果它放在 Slack 里,会是什么样子?因为我觉得这能让问题变得非常清晰,对吧?它会是 Clay 那样吗?还是像 dots 做的那样,把它当成你的 dot?我觉得,很多具体的决策都会由这种用户体验自然推导出来。我的猜测是,它整体上会更像 Clay,不会有这类区分。当然,每个用户的权限肯定会有所不同;但在使用场景和角色方面,或许也会有区别。比如,我在想,销售代表使用 Clay 的方式,和 RevOps 团队里那些搭建了这类更完善的市场拓展系统的人,截然不同。Jeff Barg: One, this is such a hard design question and actually my favorite question to ask our designers is to ask about, hey, if it were in Slack, what does that look like? Because I think that really clarifies it, right? Like is it Clay? Is it like what dots has done where it's like it's your dot I think actually a lot of the tactical decisions kind of fall out from that UX my guess is that it will look something like Clay globally and that you won't have sort of these distinctions there might be some distinctions around well there certainly will be distinctions around permissions for each user but there might be distinction around like the use case and role like I'm thinking about sales reps do very different things with Clay than someone in RevOps who's like built these sort of more go-to-market systems.
该智能体与 AI 增长负责人有多接近How close the agent is to an AI head of growth
Harrison Chase:如果按 1 到 10 分来衡量,Clay 现在有多注重结果?像 Sculptor 这样的产品又有多注重结果?Harrison Chase: On a scale of 1 to 10, like how outcome oriented is Clay right now? How outcome oriented was something like Sculptor?
Jeff Barg:Sculptor 在这方面的实际表现可能很低,大概只有 3 分(满分 10 分)。你可以试着让它产出更多结果,也可以和它一起头脑风暴。Jeff Barg: The reality with Sculptor was probably very low on this. So three out of 10. You could you could maybe try to give it more outcomes. You could brainstorm with it.
它在表格分析方面其实做得相当不错。所以,如果你想从中提取一些关于想要执行的战术的洞见,它可能会做得挺好、相当不错。但你肯定不能可靠地把职责委托给它。它完全不具备这种能力。It was actually fairly good at table analysis. So you could kind of if you wanted to extract insights of plays that you wanted to run might be pretty good pretty decent at that. But certainly you couldn't reliably delegate responsibilities to it. Like it was just not in the realm of capabilities.
我觉得现在我们在那个名单上的排名已经高了很多。比如,我很有信心,我们自己的市场推广运营团队可以直接给它一些相当开放的任务,让它生成还不错的内容。I think now we're much higher up that list. Like I feel pretty confident that our own go-to-market ops team can just give it pretty open-ended tasks and have it generate something pretty decent.
我觉得客户最感兴趣的任务,实际上是生成诸如客户账户评分之类的东西。比如,你可以说:“嘿,看看我已经成交的所有交易,以及我试图成交但最终没能拿下的所有交易。区分这些潜在客户,比如提出一种评分——也就是说,提出一种评分算法来预测交易是否会成交,然后实际对它进行回测,再加入其他信号或数据点,用这些数据再次回测。”The tasks I think customers have been most excited by are actually generating things like account scoring. So, you can be like, "Hey, look at all of the deals I've closed. All of the deals I've tried to close but have lost. Distinguish between these pres like propose a scoring to like propose a scoring algorithm to predict whether someone's going to close and actually back test it and then back test it with additional signals or data points that you could add to it.
对吧?所以它实际上相当全面、内容丰富,而且是一项真正能推动市场落地的任务,几乎肯定能带来投资回报。它能交付相当不错的成果,而且适合在不到 30 分钟的演示通话中完成。所以我觉得企业客户对此真的很感兴趣。Right? So like actually quite expansive and comprehensive and a real go-to-market task that would like drive ROI pretty much without fail. This delivers something pretty reasonable and within the scope of under 30 minutes for a demo call. So I think like enterprise customers have really excited about that.
它确实挺强大的。不过我不知道,我还是觉得还有很长的路要走。比如说,如果我在经营一家公司,我不觉得现在的技术已经能让我把它当成自己的 AI 增长负责人,交给它就能让公司发展壮大,而我完全不用操心。所以,老实说,我觉得我们现在大概能打七分(满分十分)。It's pretty powerful. So I don't know I still think there's a long way to go. Like I don't think this is something where if I were running a company like I could feel like this is my AI head of growth and it just grows the company and I don't have to think about it. So I'd say we're now probably if I have to be honest with ourselves about a seven out of 10.
Harrison Chase:阻碍我们找到那位 AI 增长主管的因素是什么?Harrison Chase: What's the blocker for getting to that AI head of growth?
Jeff Barg:我们确实在战术层面做了一些事情。首先,我认为增长其实是一个非常全面的过程。如果说到如何发展一家公司,首先需要来自一线人员、实地团队以及公司创始人的大量洞察。我相信你也有过这样的体会:发展 LangChain 可能有很多不同的方式,而要确定我们究竟要怎么做,其实需要很强的判断力。Jeff Barg: There's certainly tactical level things that we're working on. One, I think growth is actually quite holistic. And so if I think about growing a company, one, it requires a lot of insights from the people on the ground, from the field, from the founder of a company. I'm sure you experienced this where there's probably so many different ways to grow lang chain and actually like requires a lot of discernment to be like this is what we're going to do.
其中有些其实是主动选择,对吧?就像是:这就是我想要打造的公司。如果想想 Clay 的使命,那就是帮助每家公司充分发挥潜力。“充分发挥潜力”其实是这项使命中非常重要的一部分。And some of that is actually choice, right? It's actually like this is the company I want to build. If I think about Clay's mission, it's to grow every company to its full potential. To its full potential is actually a really important part of that mission.
所以,是的,我们确实认为,要发展业务,需要一些洞察力。So yeah, we really think there's like a insights are required to kind of grow the business.
这并不是说它就能自己运行。是的。所以我觉得这是其中很重要的一点:它并不是……你确实需要相当深入地参与其中。如果想想那种做法,比如让它大力发展业务,或者说,我记得我看到过一家初创公司发布的一个产品,大概是给它设定一个要优化的指标,比如 ARR 之类的。It's not like this can just like run on its own. Yeah. So I think that's that's a big piece of it is it's not it's not actually you do actually need to be quite involved here. If I think about that style of kind of like give it a very like grow the business or I think like I think I saw one launch from a startup that was around like give it a metric to optimize like ARR or something like that.
我觉得这方面我没什么太多担忧。我想听听你们对其他问题有什么看法,或者你们是怎么考虑这件事的。不过,我觉得要把所有东西都量化成一个单一指标,这种情况可能非常少见,所以过度优化单一指标似乎不是我们想做的。我们应该保留这个指标,也许可以通过设置某种类似宪法原则的护栏来解决这个问题,让它能够意识到指标并非一切,并提出修正建议。I think there's few worries I have there. I'm curious for your takes on other concerns or how you think about this. But like I think it's very rare that you can maybe like quantify everything into a single metric and so overoptimizing for a single metric seems like you wouldn't want to do that. You'd want to have it and maybe this is solved by having it have kind of like some constitutional guard rails where it can like recognize that the metric isn't everything and suggest corrections.
然后还有一件事,就像你说的某句话让我开始思考:我觉得智能体的强大之处在于它们能做无数件事,但我其实觉得,要构建出某样东西,不做那么多事反而有价值。也就是说,如果一开始行不通,就别分散注意力,而是加倍投入。再说,也许这得靠提示词,也许得加点约束。我很好奇,你觉得还有没有类似的东西可能会成为阻碍?比如说,给它一个非常高层次的任务,然后就让它自己运行。And then the other thing is like something you said u made me think about it which is like I think the power of agents is they can do a bajillion things but like I actually think to build something there is value in not doing a bajillion things and instead like if it's not working initially don't get scatterrained like double down and again maybe that's prompting maybe that's some const I'm curious like if there's other things like this that you think could be blockers for this like yeah like give it give it a very high level thing to do and just let it run.
Harrison Chase:首先,我认为这确实非常重要。你确实需要设置一些防护措施。我觉得要让这件事行得通,你必须真正信任它,对吧?你确实需要让它具备一些直觉,比如知道“对,这样行不通”,但如果我们继续加大投入,就会奏效。Harrison Chase: First off, I think that's that is really important. Like you do want to have guard rails. I think for this to work, you have to really trust it, right? Like you do actually need it to have some intuition around yes, like this isn't working, but it will work if we double down on it.
我觉得这真的很难。现实是,我没见过多少产品能把这件事做好。不过从发展方向来看,这似乎是个有望解决的问题。你觉得这个问题会在模型层解决,还是在非模型层解决?And I think that's really hard. And I think the reality is I haven't seen many products do that well. But I think directionally there's that feels like a tractable problem. Do you think that will be solved at the model layer or at the notmodel layer?
Jeff Barg:我是说,我觉得这里面很多东西都非常依赖具体领域,对吧?比如说,我很看好垂直领域的 AI 公司。当然,我的观点很有偏向性,但我认为,很多关键在于了解你的业务,理解哪些做法奏效的背景,然后凭直觉判断:没错,哪些策略可能有助于找到更多想要这款产品的客户。所以我也说不好,但我觉得这大概仍然是在模型之上的 harness 技能层。我不认为这一定是……我不觉得 GPT-7 一出场就能开箱即用地解决这个问题。Jeff Barg: I mean I think a lot of this is very domain specific, right? Like I'm quite bullish on vertical AI companies. I'm of course very biased but I think a lot of this is understanding your business understanding the context about what has worked and then having the intuition around yes like these are the types of plays that might work for finding more customers that would want this product. And so I don't know like I think probably this is still harness skill layer on top of the models. I don't think it's necessarily a like I don't think GPT-7 would just solve this out of the box.
测试框架与基础设施的分界处Where the harness ends and infrastructure begins
Harrison Chase:你觉得基础设施和 harness 之间的关系正变得有多紧密?我的意思是,我觉得很多早期框架,当然还有 harness,对它们所交互的基础设施都相当不设限。而现在我们会谈到持久性,也会谈到调度之类的事情,而这只有在了解它的部署方式后才能真正实现。Harrison Chase: How close do you think the infrastructure and harness are becoming related? What I mean by that is I feel like a lot of early frameworks for sure and even harnesses were pretty unopinionated about the infrastructure that they interacted with. And now we talk about durability. We talk about things like scheduling which can only really be done if how it's deployed.
我觉得目前 Memory 对你们来说是一个独立的系统,但两者之间似乎还是存在某种互动。我们最近也看到异步子代理和多智能体这类东西开始崭露头角。你得知道它们部署在哪里,或许还会出现某种相关协议。我还是不认为有一个……所以我很好奇,你们觉得基础设施——当然不是所有东西的基础设施,而是这个核心代理服务器的基础设施——与 harness 的耦合程度有多高?现在是紧密耦合,还是仍然相当松散?你们觉得这种情况会在多大程度上发生变化?沙箱就是另一个例子:很多代理现在都会编写并运行代码,而这些目前完全是独立的东西。Memory I think right now is a separate system for you guys but there's still some kind of like interplay there. One of the things that we're seeing this also pop up a little bit is like asynchronous sub aents and multi-agent things. You kind of have to know where they're deployed and maybe there's like a protocol that pops up for that. I still don't think there's a So I'm curious like how tightly coupled you see kind of like the infrastructure not of everything obviously but the infrastructure of this core like agent server being to the harness whether it's very tightly coupled now still pretty loose and whether you think how much you think that's going to change sandboxes are another example like a lot of these will write and run code right now those are completely separate thing.
Jeff Barg:是的,我觉得目前这些东西彼此相当独立,但随着时间推移,它们肯定会越来越紧密地耦合在一起。我认为你说的方向完全正确。就拿现在的沙箱来说吧?沙箱里有文件系统,其中就存在很多隐式耦合。Jeff Barg: Yeah I think right now these things are fairly decoupled but certainly getting more coupled over time. Like I think that you're totally right on the direction here. If I think about even today with sandboxes, right? Like you have a lot of implicit coupling where the sandbox has a file system.
文件系统是一个……它是智能体的持久化存储。你可能不会想到这一点,但比如说,两天后你再和智能体对话时,你大概希望它还保留着相同的文件。所以这里存在一种非常隐性的耦合。另一点我认为你说得完全正确,而且我觉得随着时间推移,耦合会更多地出现在编排和调度层面,对吧?比如,智能体实际上可能应该非常清楚自己是如何被调度的,了解所有后续任务,并且能够非常直接地修改这些安排。The file system is a it is a store of persistence for the agent that is actually you might not think about it but like yeah if you talk to the agent two days later you probably want it to have the same files. And so you have this kind of very implicit coupling. The other thing that I think you're totally right about and I think where there will be more coupling over time is on the orchestration and scheduling layer, right? Like the agent actually probably should have pretty tight awareness of how it's being scheduled like all of the follow-ups like be able to change those things like actually very directly.
所以,是啊,我们现在其实不太这么做,但我觉得那会是个……So yeah, we don't really do this today, but I think that will be a.
Harrison Chase:你会怎么称呼这个新东西?因为我觉得它不只是一个 harness。Harrison Chase: What would you call this new thing? Because like I feel like it's more than a harness.
杰夫·巴格:是的。Jeff Barg: Yeah.
Harrison Chase:智能体服务器、智能体操作系统、智能体内核。说清楚一点,我是在请你为我们做营销工作。所以。Harrison Chase: Agent server, agent OS, agent kernel. To be clear, I'm asking you to do marketing work for us. So.
杰夫·巴格:对。对。对。我不知道。Jeff Barg: Yeah. Yeah. Yeah. I don't know.
Mega harness——这就是我不做营销的原因,不过我确实把它看作某种智能体之类的。对。Mega harness is this is why I'm not a marketer, but I do view this as just sort of the agent like it. Yeah.
Harrison Chase:还有一点。我记得大概一年前,有时有人问我,像这种长期运行的代理该叫什么,有人就说:“这不就是代理吗?”我觉得我们对代理的定义一直在变化。Harrison Chase: That's the other thing. I remember I remember sometimes like a year ago I was asked like what would you call longrunning agents and someone's just like it's an agent? Like I feel like our definition of what an agent is just changing.
Jeff Barg:是啊,完全同意。我的意思是,我确实觉得,在很多方面,我们仍处于智能体的拟物化时代。就是,我不知道,我觉得 Instinct 在这方面做得很好:每件事真的都需要单独开一个线程吗?感觉你只要跟智能体对话就行了。我觉得基础设施方面可能也类似:我真的需要知道智能体安排了后续跟进吗?Jeff Barg: Yeah, totally. Yeah, I mean I do think we're in many ways we're still in the kind of like skeuomorphic age of agents where it's I don't know like I think Instinct did a great job of this of like do you really need threads for each thing? Like it's kind of like you just talk to the agent. And I think there's probably something similar with the infrastructure where it's like do I really need to know that the agent has scheduled follow-ups?
它应该在需要的时候就做该做的事。也许智能体就是涵盖所有这些东西的整体,比如基础设施、运行框架和模型——这些合在一起就是智能体。Like it should just kind of do the thing when it needs to. It is maybe just like the agent like that is what encompasses all these things like the infrastructure, the harness, the model like that's the agent.
为什么 Clay 宁愿按 token 收费,而不是按成果收费Why Clay would rather charge for tokens than outcomes
Harrison Chase:你们怎么看 Clay 的定价?我看到 Vanta 的 Christina 和 Rippling 的 Parker 似乎就 AI 使用量的利润率之类的问题展开了一番讨论。你们怎么看这个问题?对于那些在构建智能体的人,你们有什么建议,他们应该如何考虑定价?Harrison Chase: How do you guys think about pricing for Clay? I saw a back and forth I think between Christina from Vanta and Parker from Ripling talking about kind of like margins on AI kind of like usage. How do you guys think about that and any advice for kind of like people building agents about how they should approach that?
Jeff Barg:首先,这就是问题的核心。我认为,在构建智能体时,你需要考虑定价。因为如果它能正常运行,这些模型可不是免费的。你确实需要大致了解定价结构,比如调用结构是什么样的。Jeff Barg: First off, it's so core to the problem. I think like I think you need to think about pricing when you're doing when you're building an agent. Because if it works like these models are not free. You do need to have some sense of what the pricing structure like call structure looks like.
我觉得,无论我们为这个智能体确定什么样的定价结构,最后都可能是错的。从某种意义上说,这几乎就是我们明确追求的结果:要么便宜得离谱,要么贵得离谱。当然,我们的目标是,相对于它带来的成果,价格应该便宜得离谱。但我觉得,如果你能和一个智能体交流,让它找到五个新机会,而这些机会最终能转化为金额超过10万美元的合同,那么理性地算,你大概会愿意为此付很多钱。I think whatever pricing structure we align on for this agent it will be wrong and I think that is almost explicitly the goal in some ways is it will either be way too cheap or way too expensive. And our goal is of course it should be way too cheap for the outcomes it's driving. But I think like if you could talk to an agent and have it find five new opportunities that end up turning into $100,000 plus contracts, like you probably pay a lot of money for that if you're rational about it.
Harrison Chase:你们离直接按成果收费还有多远?Harrison Chase: How close are you guys to charging for outcomes directly like that?
Jeff Barg:我觉得差得挺远的。其实我觉得,在某些方面,这未必是正确的做法。我更倾向于只交付那个结果。不过我也不确定。我确实觉得,按 token 收费有些地方挺不错的。所以这可能和 Christina 的观点相反。在我看来,token 某种程度上是工作量单位的代用指标。我们的客户都是企业,对吧?他们也在努力交付工作成果,并从这种差额中赚取利润。所以我觉得,对我们来说,完全可以这么做:我们认为自己的智能体相当不错,能帮你交付非常出色的成果;但我们只按为你完成的工作量单位收费。至于你在此基础上还能创造什么,那就是留给客户的额外收益。Jeff Barg: I think pretty far. And I actually like I'm not sure that's the right approach in some ways. Like I'd rather just one deliver that outcome and then I don't know I do think there's actually something quite nice about charging for tokens. So this is maybe contrary to Christina's point of view here. Tokens I in my mind are sort of the proxy for the unit of work and yeah like all of our customers are businesses right like they are trying to also deliver outcomes for work and make a profit margin on that on that differential and so I think it's very reasonable that for us like hey we think our agent is quite good can help you deliver these really great things but we'll charge just for sort of the unit of work that we've done for you and then whatever you can do on top of that's you surplus to our customers.
我觉得这确实非常难。不过我认为,按 token 收费,或者采用某种类似的计费方式,可能其实还不错。I think it's yeah, very hard. I do think charging for tokens or some sort of some proxy of that is probably actually probably not bad.
微调,以及一个用于 Claygent 的后训练模型路由器Fine-tuning, and a post-trained model router for Claygent
Harrison Chase:你提到自己大概在今年年初尝试过微调。你现在还在做微调吗?如果会的话,你觉得什么时候会再试一次?Harrison Chase: You mentioned that you tried fine-tuning maybe at the start of this year. Are you currently doing any fine-tuning and do when at all do you think you'll try it again?
杰夫·巴格:我觉得从那以后,我们的看法发生了很大变化。我觉得我们从最初那次经历中学到了很多。我的总体看法是,微调可以带来、或者说可以努力实现两种结果。第一种是针对某个特定领域或问题空间,努力达到前沿水平的表现,对吧?你试图在某个特定问题空间里匹配或超越 Fable 的表现,而且对此可能不太在意成本;你就是想真正做到最好。我觉得 Harvey 算是在尝试进入这个领域。第二种,我觉得从历史上看,公司在这方面取得的成功可能更多:你面对的是一个定义非常明确的问题空间,规模相当大,而且对于最好的模型来说,评测结果已经有些饱和;但你的基本目标是优化成本。也就是说:“嘿,我想要在这个非常具体的问题上达到 Opus 级别的表现,但只想付 Haiku 级别的价格。”其中一个经验就是,第二种问题其实容易得多。我觉得 Harvey 正在做的事情,以及其他人正在尝试的事情,都非常难。Jeff Barg: I think our view has evolved a lot since then. I think we learned a lot from that original experience. My general sense here is one there are two outcomes you can drive try to drive from fine-tuning one is you are taking a specific domain or problem space and trying to get frontier performance right you are trying to match or exceed Fable in a specific problem space and you're somewhat cost agnostic potentially for that like but you're just like actually trying to be the best I think Harvey is sort of trying to do play in this space the second I think probably there's been more success historically for companies is you have a very well- definfined problem space you are doing it at quite high scale and eval are somewhat saturated for the best models but you're basically trying to cost optimize so it's like hey I want Opus level performance for this very specific problem but I want to pay Haiku level Haiku style prices one of the learnings is just like that second problem is actually much easier It's really hard to do I think what Harvey is doing and what other folks are trying to do here.
是的。所以我觉得,更好的切入点是第二类问题。对我们来说,我们正在探索重新涉足这个领域。我觉得,首先,仅从我们整体进行的推理工作来看,就有节省成本的机会,而且这对业务的影响可能相当显著。Yeah. So one I think it's like that feels like a better entry point is that second type of problem. For us I think we are exploring getting back into this. I think one just at the level of inference that we're doing overall like there are opportunities to save on costs and actually be quite material to the business.
我们一开始做的其实是一个模型路由器。所以我觉得,这也是垂直领域 AI 公司,或者说很多公司为客户创造超额价值的一个好方法。我们其实相当了解大家在 Clay 中想做什么,尤其是某些特定的事情,对吧?比如说,我对大家用 Clayent 做什么有很直观的了解,比如我们的市场拓展研究智能体,以及大家会用它来完成什么类型的任务、对质量有什么要求。What we're starting with is actually a model router. So I think this is also a great way for vertical AI companies or probably many companies just to just to deliver excess value to their customers is like we actually have a pretty good understanding of what people are trying to do in Clay for certain for certain things, right? Like I have pretty good intuitive understanding of what people use Clayent for like our go-to-market research agent like the types of tasks, the type of quality that they expect.
你可以这样理解:我大概可以手动编写一堆针对 Claygent 的评测,而且这些评测其实会相当符合用户的需求。这有点像是说,如果用户信任我们来做这件事,那我们就可以把这些经验转化为一个模型路由器,让你以 50% 的成本获得同等水平的表现,再把省下的一部分成本让利给客户,这对所有人来说都是双赢。所以,是的,我想等这段内容发布时,我们应该已经有 Claygent 的自动模式了——它是一个经过后训练的模型路由器。You can think of it like I could probably handw write a bunch of evals for Claygent and they would actually be pretty aligned with what our users want and it's kind of like hey if our users trust us to do that like we can translate that into a model router and you can actually get that level of performance for 50% of the cost and you pass on some of those cost savings to the customer and this is sort of a win-win for everyone. So yeah, we I think certainly by the time this will go out, we did we do have an auto mode for Claygent now, which is a post- train model router.
Harrison Chase:听起来这是后训练阶段,所以我猜你们在路由方面有相当定制化的逻辑。这部分是在 harness 层,还是 gateway 层?Harrison Chase: It sounds like it's post train, so I'm assuming there's pretty custom logic about how you guys do routing. And then does that live like at the harness layer or at the gateway layer?
Jeff Barg:如今它对我们来说处于 harness 层。实际上,我非常确信它需要和 harness 一起训练。就它从哪里提供服务而言,我觉得这多少是无关紧要的,对吧?真正需要保留的是:你不希望模型先路由到某个地方,然后又路由到别的地方,结果导致缓存未命中,对吧?那就太糟糕了,因为这样一来,路由带来的所有好处都会荡然无存。不过,当然也有办法在网关层实现这一点。Jeff Barg: Today it lives for us at the harness layer. I feel quite strongly actually that it needs to be trained alongside the harness. I think in terms of like where it's served from like this somewhat agnostic right the thing that you really want to preserve is you don't want to model route to something and then route to something else and then have a cache miss right like that's a disaster right like you would lose all benefit from routing if you did that. But there are certainly ways to do this even at the at the at the gateway layer.
对 100 行 Bash 命令的审批Approvals for 100-line Bash commands
哈里森·蔡斯:刚才你提到了一些挑战,比如如何让 CLI 更易于使用,同时以一种安全、近乎受治理的方式运行。能谈谈这方面吗?Harrison Chase: Earlier, you mentioned some challenges around making the CLI kind of like usable and kind of like a safe and almost governed way. Like could you talk about that?
Jeff Barg:我认为,我们在 Clay 中拥有自研智能体的优势之一,是我们可以围绕 CLI 中 Clay 特有的功能做很多事情,对吧?如果你使用 Clay CLI 和 Claude Code,Claude Code 也许可以使用这些命令。由于有技能文件,它可能很清楚什么时候该用哪些代词;但你未必能获得所有这些保护措施,比如,我们希望为你启用这项功能,但在发送之前,我们可能希望你先征求许可——例如,发送营销活动或向客户发送真实邮件之前。这正是我们特别希望融入智能体的功能之一。Jeff Barg: I think one of the advantages we have for having a first-party agent in Clay is all of the things that we can do around the Clay specific nature of our CLI. Right? If you're using the Clay CLI and Claude Code, Claude Code can maybe use the commands. It may have a good understanding of what pronouns to use when because of skill files, but you don't necessarily have all of the protections around, hey, we want to enable this capability for you, but we probably want you to ask like probably want to ask you for permission before sending, as an example, sending a campaign or sending real emails to customers. That was one of the things that we really wanted to build into the agent.
Harrison Chase:就像人在回路中一样。Harrison Chase: Like human in the loop.
Jeff Barg:是的,没错。你可以把它想成一个审批框架,我们是在 CLI 框架之上构建的。我认为这里确实有一种很不错的产品体验:作为 Clay 代理的使用者,我可以开始使用它,而且能感到相当安心,不用担心把事情搞砸。但我认为这在技术上是个相当棘手的挑战,因为我们直接使用 CLI。你看看这些 CLI 命令就会发现,它们相当复杂,对吧?有些 Bash 脚本可能长达数百行。Bash 是一种图灵完备语言。在执行 Bash 命令之前,你很难弄清楚它会不会调用某个 CLI 命令,或者具体会用什么参数调用某个 CLI 命令。因此,我们深入思考的问题之一就是:如何才能在保留 CLI 所能提供的全部功能的同时,只针对真正需要的操作请求审批?Jeff Barg: Yes, exactly. You can think of it as like a approvals framework we're kind of on top of the CLI one I think there's a product experience there that's actually quite nice about this really nice that as a consumer of Clay's agent I can come in and I can feel pretty safe about using it and not shooting myself in the foot but I think a pretty hard technical challenge because we're using the CLI directly if you look at these CLI commands they are pretty crazy right like they are potentially hundreds of lines of Bash. Bash is a Turing-complete language. You don't actually it's very hard to before executing a Bash command understand whether it's going to call a certain CLI command or certainly like call a CLI command with what parameters. And so that was one of the things we thought pretty deeply about was how can we actually do this in a way that we give people all the capabilities of what they would have in the CLI but ask for approval for the right things.
所以在这件事上花了很多时间。我们应该有那么几种不同的技术方案,也讨论过要怎么做。不过……And so spent a lot of time on that. We should have like a couple of different technical ways that we debated doing this. But.
Harrison Chase:你最后是怎么做到的?Harrison Chase: How did you end up doing it?
Jeff Barg:我们实际上是在已有命令之上添加了一层,对吧?你可以想象用某些参数调用 CLI,对吧?一种执行方式就是直接运行命令。另一种方式则是,嘿,用户有意要运行这个命令。Jeff Barg: We effectively added an a layer on top of the commands that we had, right? So you can imagine calling the CLI with certain parameters, right? Like there's a way to execute that where it just does the command. And then there's a way which is like, hey, the user has an intent to run this command.
会生成一个审批 approval 对象并传回给 agent,然后 agent 基本上会把这个审批展示给用户。你可以想象一下,agent 实际上有一个专用工具:一个是 Bash,另一个类似于“展示我从这个 Bash 命令获得的审批”,用户可以批准它。所以我们会调用 Bash 工具;Bash 工具会调用 CLI,而 CLI 的结果会是某种需要调用审批工具的逻辑或语言。Will generate an approvals approval object that is passed back to the agent and then the agent will basically present that approval to the user. So you can imagine right like there's actually a specific tool for the agent which is there's Bash and then there's like present an approval that I got from this Bash command which the user can approve. So we'll call the Bash tool the result of that the Bash tool will call the CLI the result of that will be like some logic that or some language that needs to call the approval tool.
哈里森·蔡斯:它会调用审批工具,然后再次调用 Bash 工具,还是审批工具会自动解锁相关操作?Harrison Chase: It will call the approval tool and then it calls the Bash tool again or does that approval tool automatically unlock things?
Jeff Barg:审批工具会自动解锁一些东西。是的。我想,我们考虑过的这个方案,应该就是你在暗指的另一种方案,其他一些人也采用过。也就是说,我们可以直接拦截 Bash 命令,然后让代理以提升后的权限重新运行 Bash 命令,而这些权限只会授予合适的……我忘了这个的准确术语,不过就是提升权限,以及即时提升权限。Jeff Barg: The approval tool automatically unlocks things. Yeah. We considered that's I think you're you're alluding to the other solution that I think other folks have done and we considered as well which is we could just block the Bash command and then have the agent basically rerun the Bash command with elevated permissions that are only given to the right sort of this like forget the exact term for this but elevated permissions and just in time elevated permissions.
Harrison Chase:所以你基本上可以暂停一条 Bash 命令,等审批通过后再继续执行吗?Harrison Chase: So can you basically like pause a Bash command and then pick that back up once the approval comes in?
Jeff Barg:我们不会那样做。不过,我们确实考虑过类似的方法。我觉得,这实际上是个相当不错的方法。我认为,这也是一些代码模式解决方案的优势所在。不过,我对这类解决方案多少有些怀疑。Jeff Barg: We don't do that. But we did consider approaches like that. I think like actually like that's quite a good approach I think and I think this is the advantage of some of these code mode solutions. I'm somewhat skeptical of those solutions.
它们都还很早。所以我们不会那样做。实际上,我们只是让代理之后重新调用审批。They're all pretty early. And so we don't do that. We effectively have the agent just re call the approval after.
哈里森·蔡斯:如果在审批之前发生了一些有状态的工作呢?Harrison Chase: What if there's like stateful work that happens before the approval?
Jeff Barg:批准流程基本上会尝试运行该命令;如果失败,就会返回给代理,由它重试之类的操作。Jeff Barg: The approval will basically try to run the command and so if it fails that will just go back to the agent and it can retry kind of things.
评估环境和模拟用户Eval environments and simulated users
Harrison Chase:当你对这个智能体运行端到端评测时,听起来它会与很多不同的环境交互。你们有模拟环境或 mock 环境吗?智能体是如何在这些环境中运行的?Harrison Chase: When you run end-to-end evals for this agent, it sounds like it's interacting with a lot of different environments. Do you have simulated environments mock environments like how does the agent run against these things?
Jeff Barg:目前我们只有一个它运行所针对的环境,对吧?也就是说,它是用于评估的,会启动一个工作区,还会启动所有这些智能体可能会交互的相关数据源。Jeff Barg: Today we have just one environment that it runs against, right? So it is it is four eval it spins up a workspace. It spins up sort of all of these relevant data sources that the agent might interact with.
Harrison Chase:基本上就像是一个开发环境中的 Clay 部署,里面放了一些假数据之类的。Harrison Chase: Like basically a dev Clay deployment with some fake kind of like data in there.
Jeff Barg:没错。是的,我们可能需要在这方面做得更多,对吧?比如不同类型的环境,以及更多模拟环境。我确实觉得,我们迟早会需要某种模拟用户,而我认为我们的评测并没有全面涵盖这类长对话,这也让模拟上下文压缩之类的事情变得非常困难。Jeff Barg: That's right. Yeah, we probably need to do more here, right? Different types of environments, more simulated environments. I do think we really want to have sort of simulated users at some point which I don't think our evolves are totally comprehensive of like these long conversations and I think it makes it really hard to simulate things like compactions.
这确实让模拟创建工作流、编辑工作流、再查看结果这类操作,以及开展真正的长时程评估,变得非常困难。所以,是的,我认为这是我们正在积极思考的一个领域。It really makes it really hard to simulate things like create a workflow edit it then like look at the results and have these sort of like true long horizon evals. And so yeah I think this is a it's an active area for us to really think through.
哈里森·蔡斯:感谢收听《Max Agency》。如果你喜欢这一期节目,请留下评论并订阅。请将反馈或问题发送至 maxagency@langchain.dev。我们期待听到你的声音。Harrison Chase: Thanks for listening to Max Agency. If you liked this episode, leave a review and subscribe. Send feedback or questions to maxagency@langchain.dev. We want to hear from you.