Anthropic 在 Claude 平台上构建智能体的经验
原题Lessons from building agents on the Claude Platform
推荐理由Anthropic 把智能体的运行框架和执行工具的沙箱拆开,再用检查点保留任务状态。团队也讲了怎样让模型按任务组织协作,以及如何对照会话记录纠正错误记忆。准备把原型交给同事长期使用的团队,可以挑一条真实任务,逐项测试中途失联后的恢复、不同子任务的成本和记忆错了能否修正。
看前速览
Claude Managed Agents 团队回顾了三次搭建智能体基础设施的经验,解释如何协调多智能体工作流,以及如何让智能体的记忆更可靠。
把反复用到的基础设施做成可复用组件
Anthropic 多次需要沙箱、凭证隔离、技能,以及让智能体连续运行数小时的能力。对外提供这些组件后,客户也可以按需采用。
把运行框架与单个沙箱解耦
初版把所有东西放进同一个容器。将状态独立保存为检查点后,团队可以在中断时恢复替代沙箱,也能更灵活地调用其他工具。
根据任务需求安排工作流和模型成本
Flows 在协调者与子智能体之间的基础消息传递之上,支持分支和并行执行。协调者可以用能力较强的模型,把适合的子任务交给成本更低的模型。
给智能体一个单独检视记忆的机会
执行任务时,智能体记录当下觉得重要的内容。离线流程再对照历史会话日志和记忆,处理冲突或纠正错误,《宝可梦》的例子展示了这一点。
完整摘要
Anthropic 先为内部提效、再为自家应用搭建智能体底层设施,第三次则把这些能力做成了平台。团队解释,将智能体运行框架与沙箱分开,再用检查点保存会话状态,可以在容器故障时恢复环境,继续运行长任务。他们还介绍了 Flows 如何让 Claude 按任务组装多智能体工作流,以及为什么可以让能力较强的模型负责协调,把合适的子任务交给成本更低的模型。记忆机制把会话中即时写入和离线整理分开。在一项《宝可梦》测试中,对照会话日志和已有记忆,帮助智能体修正了一个反复导致进度卡住的错误。
章节
文字稿
简要描述Brief Description
在 Claude 平台上构建智能体的经验教训Lessons from building agents on the Claude Platform
目录Table of Contents
- 简介Intro
- 我们为何构建 Claude Managed AgentsWhy we built Claude Managed Agents
- 跟进模型发展并管理成本Keeping up with models and managing cost
- 使用动态工作流和多智能体测试框架Using dynamic workflows and multi-agent harnesses
- 扩展 Claude 托管代理:解耦大脑与双手Scaling Claude Managed Agents: decoupling the brain and hands
- 客户如何使用 Claude Managed Agents 构建应用How customers are building with Claude Managed Agents
- 梦境和智能体记忆的工作原理How dreaming and agent memory work
简介Intro
在人类大脑中,我们通过做梦,将一天中写入的记忆与整体知识整合起来。因此,智能体在执行任务时,会在热路径上写入它认为重要的内容,同时也会进行一个梦境过程。In the human brain, we use dreaming to consolidate the memories that we write over the course of the day with our overall knowledge. So the agent is proceeding through a task, writing kind of in the hot path what deems to be important, but there's also a dream process.
我们为何构建 Claude 托管代理Why we built Claude Managed Agents
我们在今年春季推出了 Claude Managed Agents。在我们进一步讨论它之前,我想先问一下:Claude Managed Agents 是什么?We launched Claude Managed Agents in the spring of this year. I guess before we kind of start talking about it more, what is Claude Managed Agents?
Claude Managed Agents 是一套开发者 API 和接口,让各种规模、各种类型的公司都能构建智能体并大规模部署。这套 API 不只是提供原始 token,还能开箱即用地提供智能体能力,同时仍然支持高度定制。Claude Managed Agents is a suite of developer APIs and interfaces that allows companies of any shape and size to build agents and deploy them at scale. And so this suite of APIs goes above delivering raw tokens and really delivers you agentic capabilities out of the box, but still in a very customizable interface.
我们在 Anthropic 内部差不多把这套东西做成平台做过三次。最初是想提升我们自己的内部效率,让智能体能在我们工作的地方开展工作。后来我们决定把它引入我们的应用,于是又从头搭了一遍几乎完全相同的基础设施。这一次,我们吸取了一些经验教训,也在推进的过程中不断学习。We kind of built a version of this as a platform like three different times within Anthropic. It kind of started as a desire to increase our own internal productivity and have agents kind of work where we work. And then we decided to bring it to our apps and we built almost the exact same infrastructure again from scratch. And this time we kind of applied some of our lessons and we were kind of learning as we were going.
然后我们第三次把它构建出来时,意识到其中存在一种反复出现的模式,也清楚地发现我们这样做简直是在撞南墙。与此同时,我们注意到,在平台团队中与我们交流的许多外部客户也遇到了很多相同的问题:他们可能已经能够使用 Messages API、Claude Code 或 Agent SDK,但无法大规模运行这些工具,也无法让它们连续运行数小时。我们意识到,要帮助人们跨越这道鸿沟——从他们当时的状态,尽快走向生产环境,打造出真正令人印象深刻、功能完善的智能体——我们或许是最有优势的。And then we built it a third time and we realized there was a recurring pattern there and that we were clearly banging our head against the wall in doing this. And while that was happening, we were noticing that a lot of our external customers that we would talk to in the platform org were running into a lot of the same problems where they might have had access to the Messages API or to Claude Code or the Agent SDK, but they couldn't run these things at scale and they couldn't run it for hours on end. And we realized that we probably were best positioned in order to be able to help people bridge that gap from where they were at the time to being able to just get to production faster with real impressive functional agents.
跟进模型发展并管理成本Keeping up with models and managing cost
构建智能体难在哪里?我想到的是,在来这里之前,我过去花了很多时间构建智能体运行框架,而要让框架始终跟上模型的更新并不容易。你会逐渐发现,构建智能体所需的许多基础构件,对于让框架跟上模型的更新非常有用。What's hard about building agents? When I think about this, I think about in my past life, I spent a lot of time building agent harnesses before coming here and it's hard to keep your harness up to date with the model. And you kind of end up learning that a bunch of primitives for building agents are very, very useful to keep your harnesses up to date with the model.
是的。一个智能体不就像一个 while 循环嘛?本质上就是这样。就这么简单,然后就搞定了。不过,随着模型变得越来越智能,我们逐渐意识到,随着模型能力增强,这些基本功能也会自然涌现出来。Claude 很快就变得非常擅长使用终端、调用 bash 命令和编辑文件。所以我们知道,必须让模型能够访问某种文件系统和计算机环境,这样它才能真正执行这些命令。Yeah. Well, an agent is just like a while loop, right? It's just that's it. At the core. That's it and you're done. No, but as models are getting more and more intelligent, we kind of realized that these primitives kind of fall out of these models getting smarter. So Claude very quickly became really, really good at using a terminal and calling bash commands and editing files. So we knew we had to give the model some access to a file system and a computer where you can actually execute those commands.
沙箱就是这么来的。后来我们意识到,把这些可重复执行的流程做成技能也非常、非常有用。所以我们知道,也必须把它纳入 Claude Managed Agents。我觉得这种模式就这样一遍又一遍地重复出现。围绕着这一点,我们不断构建更多基础设施,让它能够大规模运作。当然,你可以有一个沙箱,但必须确保它非常安全。如果要连接 MCP 服务器,就必须确保凭据绝不会泄露到任何地方。很多这类基础组件就是这样逐步推出的。我们希望这些功能能够顺应我们对模型发展方向的判断,自然而然地形成。That's kind of where the sandbox came from. Then we realized that having these repeatable procedures as skills is also something that's very, very useful. So we knew we had to roll that into Claude Managed Agents as well. And I think that pattern kind of kept repeating itself over and over again. And then around that we kept building more of the infrastructure that would make this work at scale. So sure, you can have a sandbox, but you have to make sure it's very secure. And if you're going to connect to MCP servers, you need to make sure that those credentials never leak anywhere. And that's kind of where a lot of these primitives rolled out. We wanted to have a lot of this come naturally from where we see the models going.
是的。我认为,随着模型迭代得越来越快,过去我们一直把跟上这些创新、持续投入以保持领先的重担放在开发者身上。Yeah. I think that the models, as they advance faster and faster, we have put the burden on the developer historically to keep up with that innovation and to continually invest to stay on the frontier.
我认为,如果我们希望 AI 部署能够大规模成功,就需要让人们更轻松地始终站在技术前沿。而且,这件事不应该需要花费大量维护成本。我们应该把这个过程抽象封装起来,因为我们知道怎样才能充分发挥 Claude 的优势,也能够非常快速地构建出相应的方案。And I think that if we want AI deployments to succeed at scale, we actually need to make that process of staying on the frontier a lot easier for people. And it shouldn't be something that requires a lot of maintenance cost. It should be something that we abstract away because we know what gets the best out of Claude and we're able to build that very quickly.
另外,还要确保智能体具备成本效益。其中一个重要方面是提示缓存等。我们可以将这些功能集成到托管智能体中,并确保它们得到充分优化。主要的成本考量有哪些?托管智能体又是如何应对这些问题的?Also making sure agents are cost efficient. A major aspect of that is prompt caching and other things. And so those things we can build into Managed Agents and ensure that they're well optimized. And what are some of the primary cost considerations and how does Managed Agents kind of address them?
是的,我认为成本肯定是如今从专业消费级用户到企业用户都最关注、最担忧的问题之一。我们看到很多用户会先用顶级模型处理复杂任务,这在开发阶段没问题。Yeah, I think that cost is definitely one of the biggest talking points and concerns of anyone from a prosumer to an enterprise today. We see a lot of users starting with a highest class model for a sophisticated task and then that's fine for development.
随着规模扩大,他们会意识到需要更有策略地在各种模型之间分配任务。这可能意味着采用多智能体编排,由能力最强的模型担任协调者或任务分派者,统筹一组基础模型。随着我们越来越多地转向长期运行的异步工作,在 Managed Agents 中将预算管理和成本优化作为内置基础能力,变得愈发重要。这正是我们认为未来的发展方向。-And as they scale, they realize that they need to more strategically delegate across maybe a variety of models. And maybe that means multi-agent orchestration where the most sort of capable model serves as a coordinator or a delegator for a roster of more baseline models. As we move into more and more sort of long-running asynchronous work, it becomes increasingly important for us to support budgeting and cost optimization as built-in primitives within Managed Agents. And really that's where we see this heading. -
使用动态工作流和多智能体框架Using dynamic workflows and multi-agent harnesses
我其实觉得子代理委派非常有意思。尤其是 Flows,我认为它在这方面特别有意思。简单来说,就是赋予智能体反思任务的能力,然后针对各个子任务,选用规模合适的模型来启动工作流。跟我们讲讲 Flows 是如何支持这一点的吧。I actually think subagent delegation is really interesting. In particular, Flows, I think is really interesting along these lines. So basically giving the agent ability to reflect on a task and then kind of spawn a workflow with the right size models for sub-tasks. Tell us about how Flows supports that.
我觉得大家现在开始意识到的一点是,如果有多个智能体能够协调配合、共同工作,任务完成率确实会提高。我认为,我们最初推出 Claude Managed Agents 时的第一个版本相对比较简单:一个协调器可以直接与其他智能体来回发送消息,而这些智能体会长期运行,也能各自推进自己的工作流程。这种方式还不错,但它们之间的沟通相对直接、基础。Something that we are, I think everybody's kind of starting to realize is that task completion rates just improve if you have multiple agents that can kind of coordinate and work together. And I think the first version of this that we kind of launched with Claude Managed Agents was relatively straightforward in that a single coordinator could just effectively send messages back and forth to other agents that were long-lived and can do their own kind of trajectories of work. And that was nice and dandy, but the communication between them was relatively straightforward and basic.
但实际上,很多人在大规模应用中真正想要的是工作流或多智能体框架,它们可以复杂得多。你可以在这些智能体之间设置分支逻辑,也可以让某些智能体在 for 循环中运行。你还可以进行某种并行处理,让一群智能体分别搜集大量信息,然后再将结果归并为一个输出。我们意识到,不应该试图规定这些事情必须以某种特定方式来完成。要实现这一点,最简单的办法就是让 Claude 在运行时自行搭建这个多智能体框架。也就是说,让它能够编写必要的代码,将这些不同的智能体及其结果串联起来。我们在许多前沿任务中都看到了令人惊叹的效果,尤其是那些需要长程思考和完成任务的任务。But really what a lot of people want at scale is workflows or multi-agent harnesses that can be a lot more complex. So you can have branching logic between them. You might want to put some agents on a for loop within those agents. You might want to do some sort of parallelization where a bunch of agents go seek out a bunch of information and then you kind of reduce that back to a single output. What we realize is that we shouldn't try to dictate a specific way of doing these things. And really the easiest way to do that is by letting Claude just kind of stitch together this multi-agent harness at runtime. So just giving it the ability to kind of write the code that's necessary in order to stitch these different agents and their results from one to the other. And we've seen amazing results with this on a lot of our frontier tasks, especially the ones that require a lot of long-horizon thinking and task completion.
我们希望最终也能尝试更直接地把这项能力交还给用户,让他们能够定义这些工作流并交给我们,由我们替他们运行。这会非常、非常令人兴奋,因为这样他们就可以针对自己希望模型运行其中的特定测试框架,逐步进行优化。We hope that eventually we can also try to bring that back to the user a little bit more directly and give them the ability to define these workflows and pass them to us so that we can run it for them. And that'll be very, very exciting because then they can hill climb on specific harnesses that they want these models to kind of be operating as.
我认为,从历史上看,我们把结果优化——也就是让 Claude 围绕一个已知的优质结果标准不断迭代——视为与多智能体编排和任务拆解相对独立的概念。我认为,Flows 很自然地将这两者结合在了一起。你不应该把如何构建团队,与 Claude 从好到更好再到最好的过程模式割裂开来。这实际上是两个我们最初分开看待的同一类概念,而我认为把它们整合起来,确实能赋予我们很大的力量。I think that historically we viewed outcome optimization, the idea that Claude should iterate on a known idea of what good looks like as kind of separate from multi-agent orchestration and task decomposition. And I think that Flows really brings these two together in a very natural way. You shouldn't be thinking about how to construct your team as separate from the pattern through which Claude gets from good to better to best. These are really two of the same concepts that we initially separated and I think aggregating them together actually gives us a lot of power.
前几天我们聊到过一件事,其实和这个话题以及成本管理也有关,那就是让 Claude 来决定它的子代理使用哪个模型。我知道你最近一直在深入研究这件事。能不能再多跟我们介绍一些?Something that we were talking about the other day actually that ties into this and to cost management as well is this notion of letting Claude decide which model its subagents are going to be. I know you've been working a lot on this. Can you tell us a little bit more about this?
我认为,总体而言,允许模型在运行时根据任务的形态来定义自己的执行框架,是一种非常强大的通用范式。我们已经在 Managed Agents 中引入了 outcomes,这基本上提供了这样一种能力:我可以循环运行,直到满足某个 outcome。通常,我们会认为 outcomes 用于调整一些东西,比如提示词,或者任务中的某个小部分;但更广泛地说,outcome 也可以用来调整提示词或执行框架本身。因此,Flows 基本上让执行框架成为 Claude 可以在循环中调整和修改的一种能力,以实现某个目标。I think in general, allowing models to basically define their own harness at runtime based upon the shape of the task is really powerful general paradigm. We already have outcomes in Managed Agents and that basically gives the affordance like I can run in a loop until an outcome's satisfied. Typically we think of outcomes tuning things like maybe prompts or maybe some small part of the task, but more broadly an outcome can also tune the prompt or the harness itself. So Flows makes basically the harness an affordance that Claude can tune and modify in a loop in order to satisfy an objective.
扩展 Claude 托管智能体:解耦大脑与双手Scaling Claude Managed Agents: decoupling the brain and hands
Claude Managed Agents 最令人兴奋的一点,是我们一开始就为核心架构投入了大量时间。很多人把它称为“大脑与双手分离”,因为我们的基础组件并没有被紧密耦合、拼接在一起。明天我们可以决定创建一种完全不使用沙箱、不使用 MCP 或技能,也不使用任何其他这类基础组件的会话,而改用我们提供的其他所有选项。我认为,我们在“大脑与双手分离”这类设计上的投入,让执行框架本身能够像整个运作的大脑一样运行,同时又可以把工作委派给沙箱、其他 MCP 服务器等,这不仅让这种做法变得更加自然,也让团队能够更快地推出许多此类功能。One of the things that's been most exciting about Claude Managed Agents has been the fact that we kind of invested a lot of time upfront on the core architecture. A lot of people talk about it as the brains and the hands split because our primitives are not so directly coupled and stitched together. We can decide tomorrow to have a session that doesn't ever have sandboxes or doesn't ever use MCPs or skills or any of these other primitives, but can use the entire other menu of options that we have. And I think that investments in things like the brains hand split where the harness itself is kind of running as the brains of the operation, but it can delegate work to a sandbox, to other MCP servers, kind of allowed for that to happen a little bit more naturally and also allowed our team to move a lot faster on shipping a lot of these features.
你写过很多关于我们最初的版本只是把 Claude 部署到一个容器里,而且所有东西都在那个容器里的内容。能谈谈这套基础设施有多脆弱,以及是什么促使我们重新审视它的吗?You've written a lot about how our first version was just shipping Claude into a container and every single bit was in that container. Can you tell me about the sort of fragility of that infrastructure and what led us to revisit it?
是的。所以我们最初的做法非常非常简单:把运行框架放进沙箱里,让 Claude 在里面随意运行。我们很快就意识到,这种方式既不可靠,速度也很慢。这些容器本来就不是为长期运行而设计的,它们更适合短暂存在。我们却在强行让它们进入一种必须连续运行数小时的场景。如果我们不把之前的状态保存到检查点并存入数据库,整个会话就会彻底失效,这对我们来说根本行不通。Yes. So our first approach was to just be very, very simple: put the harness inside of a sandbox and let Claude kind of run crazy in there. We realized very, very quickly how just not reliable and slow this would be. These containers are really not intended to be long-lived. They are meant to be a little bit more ephemeral and we were kind of forcing them into this world where they had to operate for hours on end uninterrupted. If we didn't checkpoint and store to our databases any of the previous state, the entire session is kind of dead and that is just not viable for us.
我们需要提供一个人们可以信赖、并且能够真正随业务规模扩展的平台。于是我们重新审视了整个方案,也逐渐意识到,我们希望把一个工程理念内化于心:把基础设施当作牛群,而不是宠物。你不应该对基础设施中的每个实例、每个组件都过分珍视;如果某个实例因为任何原因崩溃了,或者闲置一段时间后不再运行,我们只需根据已有的检查点,恢复一个新的沙箱实例即可。这是一项成本相对低廉的操作。这样一来,我们就能彻底解耦 Claude 继续执行任务的能力——比如访问互联网、使用我们提供的其他基础功能——不再受这个沙箱的束缚。We needed to offer a platform that people can depend on and can actually grow at scale with. So we went back to the drawing board and we kind of realized and wanted to internalize a lot of, there's this engineering concept of treating your infrastructure as cattle, not pets. You shouldn't be so precious about every single instance of your infrastructure or every single component, but if for whatever reason it decided to crash or after some time of being idle, it just isn't running anymore, all we have to do is just restore a new instance of that sandbox from the checkpoints that we had. And that is a relatively cheap operation. That allowed us to completely decouple Claude being able to continue doing work, maybe reach out to the internet and use any of the other primitives that we kind of give it without having to be so bound by this sandbox.
客户如何利用 Claude Managed Agents 构建应用How customers are building with Claude Managed Agents
所以,我最近采访了几位客户,他们提到自己非常喜欢 Managed Agents 的原因是,它提供了一些基础构件,让你能够快速推出产品或功能,也能非常迅速地进行实验。这些基础构件的适用范围很广。比如,有位客户提到,他们利用沙箱来托管客户的代码,也就是通过代码沙箱将代码隔离开来,以便进行应用分析。另一位客户用 Managed Agents 来处理记忆功能,还有一位则用它来处理结果。你从客户那里听到过哪些特别有意思的故事?So I recently did an interview with a few customers and they mentioned the reason why they really like Managed Agents is because it provides primitives that let you get to time to market or ship something very, very quickly and it lets you experiment very quickly. So these are very general primitives. So like for example, one customer talked about using sandboxing to basically host code for their customers, basically using the code sandbox to separate the code and isolate it for app analytics. Another customer's using Managed Agents for memory and another was using it for outcomes. So what stories have you heard from customers that are particularly interesting?
我想,我最喜欢的故事之一,是一家法律领域的初创公司向所有员工开放了 Managed Agents 的使用权限,不管他们是开发人员还是非开发人员,涵盖了组织内各种业务职能。它的基础构件足够直观、简单,以至于即使是非开发人员,也能很快成为构建者。I think one of my favorite stories was about this startup in the legal space who just gave Managed Agents access to all their employees, whether it was developers or non-developers, sort of business functions across the organization, and that the primitives were obvious enough and simple enough that even non-developers sort of became builders very, very quickly.
于是,当他们逐渐掌握了 Claude Code,也熟悉了我们在这个平台上提供的一些开发者便利功能后,公司各处的员工都开始创建自己的智能体。突然之间,每个人都有了一位幕僚长——一个专为自己打造、根据自身需求、流程和工作方式量身定制的智能体,而且只用了几个小时。这让我意识到,那些难以让员工大规模采用 AI 提升效率的公司,可能没有为员工部署合适的交互界面。智能体需要适应你,而平台也需要用尽可能简单、贴近用户的方式来引导你。And so once they kind of got the hang of Claude Code, once they got the hang of some of the developer sort of niceties that we had granted on this platform, employees all over the company were spawning their own agents. So everyone suddenly had a chief of staff, their own bespoke and personalized agent that was customized to their own needs and their own processes and workflows in a matter of hours. It told me that companies that are struggling to get employees to adopt AI for productivity at scale are potentially not deploying the right interfaces to those employees. Agents need to meet you where you are, and also the platform needs to educate you in as simple and as relatable a way as possible.
梦境与智能体记忆的工作原理How dreaming and agent memory work
我知道你一直在用 Claude Managed Agents 快速拼凑一些小原型。最近有哪些原型让你玩得挺开心的?I know you're constantly hacking together quick little prototypes with Claude Managed Agents. What has been a couple that you've been enjoying?
是的。我一直在大量研究记忆,也有一个我很喜欢的关于记忆的轶事,讲的是为什么记忆很难,以及记忆的设计如何契合 Managed Agents 的演进。哲学家克尔凯郭尔说过:“生活只能回顾着理解,却必须向前去经历。”这可以说是对记忆难题的核心概括。智能体执行任务时,会在任务的热路径中,随着进展写下它认为重要、值得记住的内容。这些内容未必会与它此前写下的记忆协调一致,而是为了眼前的任务而急切地写入。在人类大脑中,我们通过做梦,将一天中形成的记忆与整体知识整合起来。Yeah. I've been doing a lot with memory and kind of an anecdote I liked on memory and why memory's hard and why memory is very well designed to Managed Agents is evolving. So the philosopher Kierkegaard said, "Life can only be understood backwards, but it must be lived forwards." And so this is kind of the core encapsulation what's hard about memory. So the agent is proceeding through a task, it's writing kind of in the hot path what deems to be important to memory as it goes. They are not necessarily deconflicted relative to prior memories it's written, they're written greedily for that task at hand. In the human brain, we use dreaming to consolidate the memories that we write over the course of the day with our overall knowledge.
所以,Managed Agents 真正有意思、也是我特别喜欢的一点是,它有一个编码步骤,你可以用我们的文件存储来写入记忆;同时还有一个独立运行的离线“做梦”过程,可以让这些记忆重新整合并消除冲突。我发现,在许多类似的实验中,这种架构对记忆来说非常重要,因为如果只有编码步骤,最终得到的记忆存储就会极其混乱:本质上就是 Claude 在大量不同任务中各自贪心地写入记忆,却从未经过某种整合步骤。因此,这种结合了运行时编码和通过做梦进行整合的方式——Dream API 支持这种方式——我认为非常有意思。So what's really interesting, what I really like about Managed Agents is it has an encoding step where you can write memory using our file store but there's also a dreaming process that runs independently offline that allows those memories to be reconsolidated, deconflicted. And this I found for a bunch of experiments along these lines is a very important architecture for memory because if you only have an encoding step you end up with a memory store that's extremely incoherent because it's basically Claude writing memories greedily independently across lots of different tasks without ever some kind of consolidation step. And so this combination of encoding at runtime and consolidation via dreaming, which Dream API supports, is I think very interesting.
这有点像你看到一个 Claude 编辑过几次的文件时,总能看到它所做的中间修改,也就大致能看出每处都改了什么。It's kind of like when you see a file that Claude edited a couple of times, you always see the intermediate edits that it's making and you can kind of tell where everything's changed.
所以这有助于整合什么?是在整合这个吗?So this kind of helps with what, consolidating that?
确实如此。我做了很多不同的评估来展示这一点。举个有趣的例子。我一直在用 Claude Managed Agents 玩《宝可梦》,进行长时程游戏测试。基本上,我这里有一个来自 Claude Plays Pokémon 的经典案例:Claude 对某个特定事物的位置记错了。明白吗?这是在未启用 dreaming 的情况下发生的。Claude 玩到游戏中的某个节点时,总会——可能会掉进一个陷阱。于是,这条错误记忆就会被固化下来。也就是说,一条错误记忆会一直存在。启用 dreaming 后,它实际上可以查看过去的会话日志,并修正这条错误记忆。我已经非常稳定地展示了这一点:启用 dreaming 后,这条特定的错误记忆会被纠正,Claude 便能继续推进游戏。It does. And so I've run a lot of different evaluations showing this. I'll give a fun example. So I've been doing a lot of long-horizon gameplay using Claude Managed Agents in Pokémon. So basically I have this classic example from Claude Plays Pokémon where Claude writes an incorrect memory about the location of a particular thing. Okay? This is without dreaming. Claude hits this point in the game and always gets, maybe falls into a trap. And so this erroneous memory can get locked in. So you have basically an incorrect memory that persists. With dreaming, it can actually look at the past session logs and this incorrect memory and fix it. So I've shown very consistently that when you have dreaming enabled, this particular incorrect memory gets fixed and Claude proceeds in the game.
所以这就好比你观察游戏进度时,会发现有了这条错误记忆,进度总是会卡住。但启用梦境机制后,记忆就会得到修正,游戏也就能顺利得多地继续进行,越过那个特定的陷阱点。这是一个很好的例子,说明仅仅在简单的游戏过程中,错误记忆就可能被固化下来。这个梦境步骤基本上能让你找出并纠正这些错误。它之所以能做到这一点,特别是因为它会结合记忆存储来查看之前的会话日志。这样它就能对照实际发生的情况和写入记忆的内容,并据此修正。明白了。So it's almost like if you look at game progress, with this incorrect memory, it always falls off. But with dreaming enabled, the memory's resolved and gameplay proceeds much, much more basically past that particular trap point. So it's a good example of just from trivial gameplay, incorrect memories can get locked and fixed. This dreaming step allows you to basically find and correct those errors. And in particular, it does this because it's looking at prior session logs in conjunction with the memory store. So it can look at here's what actually happened and here's what it wrote to memory and it can fix things. Got it.
记忆和梦境是我最喜欢的例子之一,因为我觉得我们在构建平台时采用了一种非常面向未来的方式,对吧?我记得我们刚推出记忆功能时,还在测试它大规模运行时的表现,也还在进行评估。Memory and dreaming is one of my favorite examples of where I feel like we built our platform in a very future-proofed way, right? Because I think when we first launched memory, we were still experimenting with its performance at scale, still running the evals.
我觉得我们当时可能并没有像你提到的那样,深入理解这些陷阱,也没有那么清晰的认识;不过我们确实知道,版本管理和完善的审计跟踪对于记忆的整体性能管理至关重要。后来我们推出 Dreaming 时,已经有了一个非常清楚地理解“记忆会随着时间不断演变”这一理念的平台。因此,把 Dreaming 接入这个平台就显得很自然——它只不过是由触发而非自然发生的演变,而这个平台本来就支持这样一种理念:记忆中的变化会持续保留下来。I don't think we maybe had as deep of an understanding or as much clarity on these kind of pitfalls that you're mentioning, but we did know that versioning and a proper audit trail was incredibly important for general performance management of memory. And then so when we launched dreaming, we already had this platform that very clearly understood the idea that memory evolves over time. And so it became very natural to slot in dreaming, which is just a triggered evolution rather than a natural one into this platform that sort of already supported the idea that change was going to be persistent across memory.
是的,这一点说得很好,因为在我的游戏过程中,经过若干轮游戏后,就会按计划触发做梦过程。它通过 cron 运行,在离线状态下运行,Claude 在玩游戏,而这个做梦过程则会持续运行,并随之修整记忆存储。Yeah. It's a good point because in my gameplay, the dreaming process is triggered kind of on schedule after some number of rounds of gameplay. It just runs in a cron, it runs offline, Claude's playing, and then this dreaming process is just kind of running and fixing the memory store as it goes.
是的。Yeah.
嗯,谢谢。很高兴能和大家聊聊这些。Well, thanks. Great to talk to you guys about all this.
是啊,这挺有趣的。我玩得很开心。Yeah, this was fun. I had fun.