Anthropic's Claude Managed Agents: The Evolution of Agentic Surfaces
What is Claude Managed Agents?
A server-side agent platform from Anthropic: you define an agent (model, prompts, tools, MCP servers, skills — versioned and immutable), an environment (container, network boundaries, allowed hosts), and spin up sessions that run in Anthropic's cloud with state persistence, checkpointing, hosting and observability handled for you.
Anthropic product engineer Gagan Bhat frames it as the third generation of agentic surfaces: Messages API gave you tokens in and out; the Claude Agent SDK bundled the agentic loop and harness; Managed Agents moves the loop itself server-side. Your product steers sessions through events — 'you can close your laptop and the agent is still running in the cloud.'
What is 'dreaming' in Claude Managed Agents?
A scheduled process that reviews an agent's past session transcripts over time, distills them into skills, and improves the agent's memory store so it performs better on future runs — offline memory consolidation for agents.
In this talk Bhat describes dreaming as learning 'from transcripts over time' that 'implements skills and improves the memory store to perform better in the future.' It was introduced at Anthropic's Code with Claude conference alongside outcomes, webhooks and multi-agent orchestration.
Who is Gagan Bhat?
A Member of Technical Staff on Anthropic's Applied AI team working on Claude Managed Agents and production agentic systems; previously a software engineer at Netflix.
He gave this lightning talk at Anthropic's Code with Claude developer conference and at an AWS Builder Loft event, and points to the anthropics cwc-workshops open-source repo for a hands-on SRE managed-agent example.
⚡ 速览
Anthropic 产品工程师 Gagan Bhat 用 12 分钟讲完 agentic 界面的三代演进——Messages API 只给 token 进出、loop/context/工具执行/session 恢复全归你;Claude Agent SDK 打包了 loop+harness+沙箱,但 hosting、扩缩容、可观测性仍归你;Claude Managed Agents 把这些也接管,你只带任务、配置和自定义工具逻辑。
核心架构变化是把 agent loop 搬到服务端并与沙箱解耦(大脑与双手分离),消灭冷启动高延迟与单点故障;开发者只通过事件流引导云端 agent,「合上笔记本它还在跑」。
他现场走完 SRE agent 例子:定义 agent(版本化不可变配置)→定义环境(网络边界)→挂载日志与 skill→用 agent ID+环境起 session,写的就是生产级代码。
功能清单里最有想象力的是 Dreaming(定时回看 transcript 沉淀 skill、改进 memory store)、Outcomes(产品化的 Ralph 循环,多轮迭代到达标)、Console 纯文本生成生产级配置、以及 cron 式定时 agent。
英文原文
Anthropic product engineer Gagan Bhat traces the evolution of agentic surfaces — Messages API, the Claude Agent SDK, and the new Claude Managed Agents — and shows why moving the agent loop server-side, separating the brain from the sandbox, and treating sessions as managed cloud resources is Anthropic's fastest path from hours-long prototype to production agent. He walks through the three managed resources (versioned immutable agent configs, guarded environments, event-driven sessions), the architecture change that removed cold-start latency and the single point of failure, an SRE agent demo, and the newer features: hierarchical sub-agents, memory, dreaming (scheduled consolidation of session transcripts into skills and memory), outcomes (a productized Ralph-style iteration loop), credential vaults, a plain-text console agent builder, and cron-like scheduled agents.
🗺 章节地图
💡 核心亮点
Agentic 界面的三代演进
agent 工具的每一代,都是把你过去要亲手造的一层收归平台。
Messages API 只提供 token 进、token 出:agentic loop、context 管理、工具执行、session 状态与恢复、鉴权、可观测性全要自己造。
Claude Agent SDK(源自 Claude Code)把 loop、harness、沙箱和文件系统打了包——但 hosting、扩缩容、session 状态和自定义工具逻辑还是你的。
Claude Managed Agents 把这些也接管:你只带任务、agent 配置和自定义工具逻辑,Anthropic 负责专用 harness、工具运行时、沙箱、checkpoint、credential vault、hosting、扩缩容和可观测性。
EN original
Three Generations of Agentic Surfaces
Messages API was tokens in, tokens out: you built the agentic loop, context management, tool execution, session state and recovery, auth and observability. The Claude Agent SDK (born from Claude Code) bundled the loop, harness, sandbox and filesystem — but hosting, scaling, session state and custom tool logic stayed yours. Claude Managed Agents takes those too: you bring the task, the agent configuration and custom tool logic; Anthropic runs the purpose-built harness, tool runtime, sandbox, checkpointing, credential vaults, hosting, scaling and observability.
原型几小时,上生产几周
demo 与生产之间的鸿沟不在 agent 本身,而在它周围的一切。
Anthropic 的客户经常几个小时就做出原型,然后花几周才上生产——因为 hosting、扩缩容、session 持久化、可观测性、凭证管理这些「agent 产品周围的事」堆积如山。
Managed Agents 的卖点:demo 阶段写的代码(定义 agent、定义环境、挂载数据、起 session)本身就是生产级,同一个 agent ID 和环境几乎不用改就能服务真实用户。
EN original
Hours to Prototype, Weeks to Production
Anthropic's customers routinely reach a prototype in hours, then spend weeks shipping because hosting, scaling, session persistence, observability and credential handling pile up around the actual agent product. The Managed Agents pitch: the code you write for the demo — define agent, define environment, mount data, start session — is already production-grade, so the same agent ID and environment serve real users with minimal changes.
三种资源:Agent、Environment、Session
整个产品收缩成三个原语:人格、护栏、一次运行。
Agent=人格与能力:用哪个模型、什么 prompt、哪些工具、哪些 MCP server 和 skill——版本化且不可变,可迭代可回滚。Environment=基础设施与护栏:什么容器、网络边界怎么定义、允许访问哪些 host。Session=拿 agent 配置加环境实例化拉起。
API 里更丰富的东西都建立在这三种资源上。
EN original
Three Resources: Agent, Environment, Session
Agent = persona and capabilities: which model, prompts, tools, MCP servers and skills — versioned and immutable, so you iterate and roll back. Environment = infrastructure and guardrails: which container, what network boundary, which hosts are allowed. Session = the agent configuration plus the environment, spun up. Everything richer in the API builds on these three.
prompt 改动=版本化不可变配置
把 prompt 和工具集当部署制品:不可变版本加回滚,不是在线改配置。
人格/能力资源在设计上就是版本化且不可变的——你可以持续迭代 agent 定义,需要时回滚。这恰恰是大多数自建 prompt 系统缺的纪律:没有版本历史、不能回滚、质量退化时无法归因到具体的某次 prompt 改动。
EN original
Prompt Changes as Versioned, Immutable Config
The persona/capabilities resource is versioned and immutable by design — you iterate on agent definitions and roll back if needed. That is the discipline most in-house prompt systems lack: no version history, no rollback, and no way to attribute a quality regression to a specific prompt change.
loop 跑在服务端
合上笔记本,agent 还在云上跑。
Managed Agents 里 agent 的编排与执行都在云端;你的产品通过「发事件进去、收事件出来」来引导。Session 持久化在服务端——多 session 连续性、一条命令列出全部会话、自己一行 transcript 存储代码都不用写。
你的工作收缩为:在需要的时候给它正确的 context、正确的任务。
EN original
The Loop Runs Server-Side
In Managed Agents the orchestration and execution happen in the cloud; your product steers by sending events in and receiving events out. Sessions persist server-side — multi-session continuity, list every session with one command, zero transcript-storage code of your own. Your job reduces to providing the right context and the right task when needed.
大脑与双手分离
把 agent loop 和沙箱拆开,同时消灭冷启动延迟和单点故障。
以前 loop 和工具执行跟被托管的 agent 同住一个容器:每次启动都付高昂的延迟成本,容器一挂 loop 跟着挂。Managed Agents 把大脑(模型、loop)跟双手(工具、沙箱)分开——不是每个用例都需要沙箱,沙箱按需拉起,扩展更快、延迟更低、可靠性更高。
EN original
Brain Separated from Hands
Previously the loop and tool execution lived in the same container as the hosted agent: every start paid a high latency cost, and if the container died the loop died with it. Managed Agents separates the brain (model, loop) from the hands (tools, sandbox) — not every use case needs a sandbox, so sandboxes spin up only when needed, which scales faster with lower latency and higher reliability.
SRE agent 示例
一小段「工具+模型+名字」的配置,就是从排障到上线的全部部署物。
工作坊场景:checkout 服务延迟超基线,一个 SRE agent 去调查。定义 agent(一小段配置,Claude 可以替你写),立刻持久化到云端;定义环境的网络边界;挂载日志文件和 skill;用 agent ID+环境启动 session。
云端 agent 拿到真沙箱,用 grep/glob 找根因——满意后用同一组 ID 直接接进产品上线。
EN original
The SRE Agent Demo
Workshop scenario: checkout service latency above baseline, an SRE agent investigates. Define the agent (a small piece of config Claude can write for you), it persists to the cloud instantly; define the environment's network boundaries; mount log files and skills; start a session from agent ID + environment. The cloud agent gets a real sandbox with grep/glob to find root cause — and the same IDs serve it to users unchanged.
Dreaming:给 agent 的离线记忆固化
Anthropic 把「睡觉」做成了功能:过往 transcript 沉淀成 skill 和更好的记忆库。
除了层级化 sub-agents 和从 session 学习的 Memory,Bhat 特意点了 dreaming——「幻灯片上没列」——它会持续从 transcript 学习、沉淀 skill、改进 memory store,让未来的表现更好。
这是记忆固化模式的第一次第一方产品化:agent 定期回看自己的历史,「睡一觉」变得更强。
EN original
Dreaming: Offline Memory Consolidation
Beyond hierarchical sub-agents and memory that learns from sessions, Bhat highlights dreaming — 'not mentioned here' on his slide — which learns from transcripts over time, implements skills, and improves the memory store so the agent performs better in the future. It is the first-party productization of the memory-consolidation pattern: the agent reviews its own history on a schedule and wakes up better.
Outcomes:被产品化的 Ralph 循环
「循环迭代到达标」成了平台内置功能——Ralph 循环进了产品。
Outcomes 会对产出做多轮迭代,「有点像 Ralph Wiggum loop」,交付的是打磨过的高质量产出而不是首稿。
Geoffrey Huntley 的 RALPH 带火的那套「同一任务循环跑到达成为止」,如今成了 API 功能——正如 scheduled agents 把 cron 脚本变成了产品能力。
EN original
Outcomes: A Productized Ralph Loop
Outcomes 'iterates on a product multiple times, kind of like a Ralph Wiggum loop,' returning a high-quality output instead of a first draft. The technique Geoffrey Huntley's RALPH popularized — running the same task in a loop until the outcome lands — is now an API feature, the same way scheduled agents turn cron scripts into product capability.
纯文本造 agent 与 agent 的 cron
两条边界同时塌缩:配置靠纯文本生成,定时成为一等公民。
Console 的 agent builder:用自然语言描述你想要的 agent,直接产出可上线的生产级配置。Scheduled 和 triggered agents 让 agent 像 cron job 一样跑——每天凌晨 1 点自动执行、每天早上 8 点给用户出摘要。
再加上 credential vault、webhook、权限策略和 interrupts,平台把过去基础设施团队要干一个季度的运维面全包了。
EN original
Plain-Text Agent Builder and Cron for Agents
The Console agent builder turns a plain-text description of the agent you want into a production-grade configuration you can ship. Scheduled and triggered agents run like cron jobs — a 1 a.m. daily run, an 8 a.m. digest for your users. Add credential vaults, webhooks, permission policies and interrupts, and the platform covers the ops surface that used to take an infrastructure team a quarter.
🎤 金句
几个小时就能做出原型,但把 agent 真正推上生产要几周——因为 agent 产品本身之外要处理的东西太多了。
EN original
It takes hours to get to a prototype, and then weeks to actually ship your agent to production, because there's so much to handle around the actual agent product.
这一切都是版本化且不可变的——你可以持续迭代,需要时也能回滚。
EN original
All of this is versioned and immutable, so you can iterate on those and roll back if needed.
你可以合上笔记本,agent 还在云上跑着。
EN original
You can close your laptop and the agent is still running in the cloud.
大脑——模型——跟双手分开了,跟工具、跟沙箱分开了。
EN original
The brain, the model, is separated from the hands, from the tools, from the sandbox.
你唯一要操心的,是在需要的时候给它正确的 context、正确的任务。
EN original
All you have to worry about is providing it the right context and providing it the right task when needed.
还有 Dreaming——持续从 transcript 学习、沉淀 skill、改进 memory store,让未来的表现更好。
EN original
There's dreaming, which learns from transcripts over time and implements skills and improves the memory store to perform better in the future.
Outcomes 会对产出多轮迭代,有点像 Ralph Wiggum loop——反复迭代直到给出高质量产出。
EN original
Outcomes, which iterates on a product multiple times, kind of like a Ralph Wiggum loop, but iterates on it to give a high quality output.
🧭 行动建议
- 1 agent 配置按版本发布 4:06
prompt、工具集、MCP server 列表都应该是不可变的版本化制品,支持回滚。产出质量变化时,把变化归因到某个配置版本,而不是靠猜。
EN original
Prompts, tool sets and MCP server lists should be immutable versioned artifacts with rollback. When output quality shifts, you attribute the change to a config version instead of guessing.
- 2 loop 与工具执行分离 5:27
编排层(大脑)与重执行(双手)解耦:沙箱、OCR、检索这类重活按需拉起。扩展性、延迟、故障爆炸半径同时改善。
EN original
Keep the orchestration (brain) decoupled from heavyweight execution (hands): sandboxes, OCR, retrieval jobs spin up on demand. Scaling, latency and failure blast radius all improve.
- 3 状态外置,别自己养 8:34
长跑 agent 任务应该从持久化的 session 和 checkpoint 恢复,而不是依赖一个不能死的进程。设计任何 agent 功能时,把「谁来跑」和「状态存在哪」拆成两个独立问题——重启永远不该等于从头再来。
EN original
Long-running agent work should resume from persisted sessions and checkpoints, not from a process that must stay alive. Design any agent feature so that 'who runs it' and 'where the state lives' are separate questions — a restart should never mean starting over.
- 4 把做梦排进日历 10:12
设一个周期任务,从过往 session transcript(人工修正、失败案例、用户反馈)里沉淀规则进 skill 和记忆库。定期回看自己历史的 agent,免费变强。
EN original
Set a recurring job that mines past session transcripts — corrections, failures, user feedback — into skills and memory. The agent that reviews its own history gets better for free.
- 5 迭代到达标,别发首稿 10:25
对高风险产出跑 outcomes 式循环——起草、对照证据自检、修订——直到满足验收标准,而不是相信单次生成。
EN original
For high-stakes outputs, run an outcomes-style loop — draft, self-check against evidence, revise — until acceptance criteria are met, instead of trusting a single generation.
- 6 给 agent 保险柜和策略,不是裸密钥 10:40
凭证放进按权限策略划分作用域的 vault,配 interrupts 兜底;agent 永远不该握着「什么都能碰」的常驻权限。让工具边界成为安全边界。
EN original
Credentials belong in a vault scoped by permission policies, with interrupts available; agents should never hold standing access to everything. Make the tool boundary the security boundary.
📖 全文
01 · 0:00 · Intro: A Product Engineer's Mixed Bag
0:00I'm product engineer at Anthropic. I work on a wide variety of things, from improving our models with specific tasks, to building agent harnesses, to working with some of our biggest customers to actually implement agent use cases, as well as a wide variety of other things. So really, my day is a mixed bag. Today, I'm here to talk about how we've seen the evolution of agentic surfaces, specifically agent building interfaces that folks are acclimated to and how they've evolved over time, and how it's kind of culminated in what we have built recently called Cloud Managed Agents. It is a product, but I just want to talk more about evolution and then various use cases and things like that. So excited to share more. We'll cover core concepts, like how Managed Agents works.
0:46There is a portion of this that's like a hands-on workshop, but we're not going to do a hands-on workshop today. I don't think we have enough time, so I'll just cover how that would work. And then we'll talk about beyond the basics and what we can get started with later on.
02 · 0:58 · Gen 1 — Messages API: Tokens In, Tokens Out
0:58So to start off with, I know all of you are used to building agents before. And at the beginning of the sunrise of Flutter Sandwich Models and AI, we had this offering called the Messages API. And I'm sure a lot of folks are here familiar with it. And what we provided was just tokens in and tokens out, right? So this is just Cloud, you give it the input, and then you get the next token predictions. That was Messages API. And as things became more complicated, and you had to build more complicated agents and loops and workflows, there was still a need for you to manage and build your own agentic loop, manage your context, do tool execution, session state and recovery, handling auth, observability, custom tool logic. All of this was still yours to build. And so there was still a problem in managing all of these. We then saw the rise of Cloud Code, which is our take on an agentic furnace.
03 · 1:53 · Gen 2 — Claude Code and the Agent SDK
1:57And we wrapped that into something called the Cloud Asian SDK. And this Asian SDK essentially provided that agentic loop and harness. It provided context management. It provided built-in tool executions, a sandbox and a file system capability. And under the hood, it still uses Messages API for tokens in and tokens out, right? But you still had to manage hosting and scaling, session state, observability, custom tool logic, et cetera. There was still a lot of work that you had to do to take your agent to progress.
04 · 2:29 · Gen 3 — Claude Managed Agents
2:29The third iteration, and this is kind of the evolution of agentic services, is what we call Cloud Managed Agents. And the idea is that you come to adjust your tasks and your agent configuration, and you come with any of your custom tool logic. And Anthropic handles the purpose-built harness, the tool runtime and sandbox, the session state persistence and checkpointing, auth, credential walls and storing API keys, and of course, hosting, scaling, observability. You don't have to worry about that out of the box. And of course, under the hood is tokens in, tokens out. And this is how we've kind of seen the evolution of what interfaces developers use to build agents. And so really, Cloud Managed Agents, something that's fairly new, is our fastest way to build and ship transformative agentic products.
3:23If you want to go from idea to actually having the highly, feature-rich agent in your product, I would recommend you start with Cloud Managed Agents. And I'll show you how you can get started pretty quick, and it'll kind of illustrate how quickly you can take stuff to production. Because oftentimes, we've found that customers spend a bit of time, like it takes hours to get to a prototype, and then weeks to actually ship your agent to production, because there's so much to handle around the actual agent product. So there's three primary resources in Cloud Managed Agents.
05 · 3:54 · Three Resources: Agent, Environment, Session
3:56First, is the persona and capabilities. What your agent is, which model it uses, the prompts, tools, MCP servers, skills. All of this is versioned and immutable, so you can iterate on those and roll back if needed. The second is infrastructure and guardrails. What container does your model live in? How does the networking boundary of that container, how, what is it defined? And what are the allowed hosts? What is not allowed? Things like that. Things, the environment, that your agent lives in. That's the second resource we exposed. And third is the actual sessions resource, which is you take your agent configuration, and then you take the environment that you configured, and then you spin up your session, right? So three simple resources. There's a few more that there's, there's a few more like richer API things that I can talk about later, but these are the core things that you can use to, to configure and ship your agent in blazing fast time.
06 · 4:55 · Server-Side Loops: Close Your Laptop
4:55And as a reminder with Cloud Managed Agents, the agentic loop is running server side. What this means is that the orchestration and execution of the agent is happening in the cloud. And what you're doing is essentially handling and directing that agentic loop in the cloud. So your events go in and you, you push the agent in different directions as needed the actual, and you can close your laptop and the agent is still running in the cloud. That's the analogy and the key. The key architectural change has occurred,
07 · 5:27 · Brain-Hands Separation
5:29which is previously agent, the agent loop and the tool execution used to happen in the same container as where the agent was hosted. This meant that every single time you had to start an agent, there was a high latency cost and there was a single point of failure. If the container went down, then your agentic loop goes down. With Cloud Managed Agents, the agent loop is separated from the actual sandbox. So the brain, the model, is separated from the hands, from the tools, from the sandbox, because not every agent use case needs a sandbox and it can only be spin up, spun up when needed. And this is a critical architecture difference because it allows you to scale way, allows us to scale way, way more, way more quickly and for you to have much lower latency and higher reliability. So there's a hands-on workshop,
08 · 6:18 · Workshop: Shipping an SRE Agent
6:19but I, we won't have time again to get into this because the lightning talk, I gave this talk at Code with Cloud, which is our developer conference and you can check it out. There's an open source repo, GitHub, Anthropic or Anthropic organization and CWC workshops. There's a folder in there that shows how you can ship your first managed agent. It's like an SRE agent and I'll walk through that right now. So let's say you have an incident and your, your checkout service is more than high baseline and wouldn't have been nice if there was like an SRE agent with a full rich set of capabilities that can investigate and find what's going on. Well, in this workshop, we kind of walked through how to implement that and it's quite simple. So as I said before, first you define what your agent is. So you write this piece is like a small piece of code. Of course, we'll call it right.
7:08We'll write it for you. But you write this piece of code that kind of describes the tools the agent has, the model you'd use and the name of it. And immediately when you that has persisted in the cloud and then you define where your container is. So you will define like that. The networking boundaries, like how much Internet access the model has, things like that. And you purchase that in the cloud. You need you get a unique ID and then you use and then you mount any data you want. So if you want to upload a log file for the agent to use when investigating stuff, you can upload that. If you want to upload any skills, you can do that. And all of this is persistent in the cloud. And then you use the agent and environment that I talked about and you start the session, right? You use the agent ID environment and start the session. And this agent in the cloud will have a real sandbox that it can use to do the same grab glob capabilities to kind to use and find the root cause of the issue you're experiencing. And all of this as you're writing this code, this is production grade. So when you're happy with your agent, you can use that same agent ID, same environment, and then you can put this into your into your product and ship it as a real agent on your platform.
8:25The scalability comes built in. So when you're ready with your agent prototype, you can serve it to users with minimal changes needed. And as a reminder,
09 · 8:34 · Sessions Speak in Events
8:34sessions speak in events and some of this, of course, these things may change. So just double check when you're using the managed API. But the idea is from the cloud, you will get events about what the agent is doing and you would send events back to control and see what they control and move its direction. So just to illustrate, this the cloud agent is actually running in the cloud and you would get any custom tool use if there's any local needs or if it's just the MCP server will directly reach out and you can kind of handle and orchestrate the agent from your product. You don't have to worry about actually hosting the agent, et cetera. All you have to worry about is providing it the right context and providing it the right task when needed. And this is just a snippet of code that opens the streams and sends the messages. And this is not necessarily relevant. And as a reminder,
10 · 9:29 · The Conversation Lives in the Cloud
9:29the conversation lives in the cloud and some of this code is it's no longer in beta. So ignore this. But the conversation lives in the cloud. So the sessions are essentially persisted. So you can create multi multi multi session persistence and you can list out all the sessions you have in the cloud with a simple command. No need to worry about how to persist a transcript, store it, read from it. Etc. And there's way more features.
11 · 9:57 · Memory, Dreaming, Outcomes, Vaults
9:58There's sub agents or multi agents where you can spin off like agents and in a hierarchy memory so you can learn from your sessions and to remember things over time and your agent gets better. There's dreaming which is not mentioned here that kind of learns from transcripts over time and implement skills and improves the memory store to perform better in the future outcomes, which iterates on a product multiple times, kind of like a Ralph Wiggum loop, but like iterates on it to give a high quality output waltz, which is super important because it allows you to store your credentials in a highly safe manner. MCP servers, web hooks, permission policies, interrupts. There's also even a console agent builder where you can go into the entropic console and describe in plain text what agent you want and you get a production grade configuration that you can use in your product.
12 · 10:53 · Scheduled & Triggered Agents
10:53And there's also scheduled and triggered agents. Let's say you want your agent to run automatically regularly at 1:00 AM every day. You want a daily digest every morning at 8:00 AM and you want that for your users. They're scheduled and triggered, which allows you to set up your agents like a cron job that runs at a scheduled manner. And so with that today we were able to hopefully get the mental model of managed agents the evolution of you didn't ship a working agent quite yet because you can do that with the link provided and then you also know where to go next.
13 · 11:13 · Wrap-Up: Where to Go Next
11:24There's way more features. It's highly feature rich. And if you have any questions like feel free to just email me or LinkedIn me. I should go get an entropic and then we can go ahead and take a look at any feature requests as well. So with that, I'm excited for everyone to get started and looking forward to speaking with folks here. So thanks for taking the time.
01 · 0:00 · Intro: A Product Engineer's Mixed Bag
0:00我是 Anthropic 的产品工程师。我的工作内容很杂,从针对具体任务改进我们的模型、到搭建 agent harness,再到和我们最大的一些客户合作、落地真实的 agent 用例,还有各种各样其他的事情。所以说真的,我每天的活儿都是个大杂烩。今天我想聊聊我们观察到的 agentic 界面(agentic surfaces)的演进,具体说,就是大家已经习惯了的那些构建 agent 的接口是如何随时间演化的,以及它们如何最终汇聚成我们最近发布的 Claude Managed Agents。它是一个产品,但今天我更想多讲演进过程,然后是各种用例之类的内容。很期待跟大家多分享。我们会讲核心概念,比如 Managed Agents 是怎么工作的。
0:46这里面本来有一段是动手工作坊,但今天我们不做动手环节了。时间不太够,所以我只讲讲那部分会怎么做。然后我们会聊进阶内容和之后可以怎么上手。
02 · 0:58 · Gen 1 — Messages API: Tokens In, Tokens Out
0:58先从开头说起,在座的各位应该都构建过 agent。在 frontier 大模型和 AI 的黎明期,我们有一个叫 Messages API 的产品。我相信在座很多人对它很熟悉。它提供的就是 token 进、token 出,对吧?这就是 Claude:你给它输入,它给你下一个 token 的预测。这就是 Messages API。后来事情变得更复杂了,你要构建更复杂的 agent、循环和工作流,你仍然需要自己管理、自己搭建 agentic loop,自己管理 context、做工具执行、session 状态和恢复,处理鉴权、可观测性、自定义工具逻辑。这一切仍然都要你自己造。所以管理这一堆东西依然是个难题。然后我们看到了 Claude Code 的崛起,那是我们对 agentic harness 的回应。
03 · 1:53 · Gen 2 — Claude Code and the Agent SDK
1:57我们把它封装成了 Claude Agent SDK。这个 Agent SDK 本质上提供了那套 agentic loop 和 harness。它提供了 context 管理。它提供了内置的工具执行、沙箱和文件系统能力。而底层仍然是 Messages API 在做 token 进 token 出,对吧?但你仍然要自己管 hosting 和扩缩容、session 状态、可观测性、自定义工具逻辑等等。要把你的 agent 推上生产,还有很多活儿得你自己干。
04 · 2:29 · Gen 3 — Claude Managed Agents
2:29第三代,这算是 agentic 服务的演进,就是我们所说的 Claude Managed Agents。它的理念是:你带来你的任务和 agent 配置,带上你的自定义工具逻辑,而 Anthropic 负责专用的 harness、工具运行时和沙箱、session 状态持久化和 checkpoint、鉴权、credential vault、API 密钥的安全存储,当然还有 hosting、扩缩容和可观测性。这些你开箱都不用操心。当然,底层依然是 token 进、token 出。这就是我们看到的开发者构建 agent 之接口的演进。所以说真的,Claude Managed Agents 这个相当新的东西,是我们构建和上线变革性 agentic 产品最快的方式。
3:23如果你想从想法走到真正拥有一个功能丰富的 agent 跑在你的产品里,我建议你从 Claude Managed Agents 开始。我会演示怎么快速上手,顺便展示把它推上生产可以有多快。因为我们经常发现,客户花一点时间,几个小时就能做出原型,但真正把 agent 推上生产却要几周,因为 agent 产品本身之外要处理的东西太多了。Claude Managed Agents 里有三种核心资源。
05 · 3:54 · Three Resources: Agent, Environment, Session
3:56第一个,是人格与能力。你的 agent 是什么,用哪个模型,prompt 是什么,有哪些工具,哪些 MCP server,哪些 skill。这一切都是版本化且不可变的,你可以持续迭代,需要时也能回滚。第二个是基础设施与护栏。你的模型住在什么容器里?那个容器的网络边界是怎么定义的?允许访问哪些 host?什么是不允许的?诸如此类。这些——agent 所处的环境。这是我们暴露的第二种资源。第三种是真正的 sessions 资源,也就是你拿出你的 agent 配置,再拿出你配置好的环境,然后把 session 拉起来,对吧?就这么三种简单的资源。当然还有一些更丰富的 API,我后面会讲,但这些是你用来以极快速度配置并上线 agent 的核心。
06 · 4:55 · Server-Side Loops: Close Your Laptop
4:55再提醒一下,在 Claude Managed Agents 里,agentic loop 是跑在服务端的。意思是 agent 的编排和执行都发生在云端。你要做的本质上只是引导和指挥云端那个agentic loop。你的事件发进去,按需把 agent 推向不同方向,然后你可以合上笔记本,agent 还在云上跑着。这个类比就是关键。这里发生了一个关键的架构变化:
07 · 5:27 · Brain-Hands Separation
5:29以前呢,agent loop 和工具执行发生在agent 托管的同一个容器里。这意味着每次启动一个 agent,都有很高的延迟成本,而且是单点故障。容器一挂,你的 agentic loop 也跟着挂。在 Claude Managed Agents 里,agent loop 跟沙箱是分开的。也就是大脑——模型——跟双手分开了,跟工具、跟沙箱分开了。因为不是每个 agent 用例都需要沙箱,沙箱可以只在需要的时候才拉起。这是一个关键的架构差异,因为它让我们能扩到能扩到大得多大得多的规模,扩得快得多,同时你的延迟更低、可靠性更高。本来有一段动手工作坊,
08 · 6:18 · Workshop: Shipping an SRE Agent
6:19但是lightning talk 时间不够,我们进不去了。这场分享我在 Code with Claude——我们的开发者大会——上也讲过,可以去看看。有个开源仓库,在 GitHub 上,Anthropic 组织下的 cwc workshops。里面有个文件夹教你怎么上线你的第一个 managed agent。是一个 SRE agent,我现在就带大家过一遍。假设出了一个事故,你的 checkout 服务延迟超过了基线。这时候如果有一个能力齐全的 SRE agent 能去调查、找出问题所在,那该多好。嗯,在那个工作坊里,我们过了一遍怎么实现它,其实相当简单。正如我之前说的,第一步,定义你的 agent 是什么。你写一小段代码,当然,Claude 会帮你写。
7:08我们会替你写好。这段代码描述 agent 有哪些工具、用哪个模型、叫什么名字。写完立刻就持久化到云端了。然后你定义容器在哪。你会去定义网络边界、比如模型能访问多少互联网,诸如此类。然后把它持久化到云端。你会拿到一个唯一 ID,然后可以挂载任何你想挂的数据。比如你想上传一份日志文件供 agent 调查时用,可以上传。想上传任何 skill,也可以。这一切都持久化在云端。然后用前面说的 agent 和环境,把 session 启动起来,对吧?用 agent ID 加环境,启动 session。云端这个 agent 会有一个真沙箱,可以用 grep、glob 这些能力去找出你遇到问题的根因。而且你写的这些代码,本身就是生产级的。所以当你对 agent 满意了,用同一个 agent ID、同一个环境,就能把它接进你的产品,作为真正的 agent 上线到你的平台。
8:25扩展能力是内置的。当你的 agent 原型就绪,几乎不用改什么就能服务你的用户。再提醒一下,
09 · 8:34 · Sessions Speak in Events
8:34session 之间用事件通信。当然其中一些当然,可能还会变。用 managed API 时请再核对一下文档。但核心思路是:从云端你会收到 agent 正在做什么的事件流,同时你也可以发回事件去控制它的方向。简单示意一下:云端 agent 真的跑在云上,有本地需求的自定义工具调用会交给你处理,纯 MCP server 的调用它会直接去连,你可以在自己的产品里编排这个 agent。你完全不用操心托管 agent 本身,诸如此类。你唯一要操心的,是在需要的时候给它正确的 context、正确的任务。这只是一段打开事件流、发送消息的代码片段。这段不一定关键。再提醒一下,
10 · 9:29 · The Conversation Lives in the Cloud
9:29对话存在于云端。这些代码已经不在 beta 了。所以这个提示可以忽略。重点是对话存在于云端。所以 session 本质上是被持久化的。你可以做多 session 持久化,用一条简单命令就能列出云端所有 session。不用操心怎么持久化 transcript、怎么存储、怎么读取,等等。还有更多功能。
11 · 9:57 · Memory, Dreaming, Outcomes, Vaults
9:58有 sub-agents/多 agent,可以按层级派生 agent;有 Memory,能从 session 中学习、长期记住事情,你的 agent 会越用越好。还有 Dreaming——幻灯片上没列——它会持续从 transcript 中学习、沉淀 skill、改进 memory store,让未来的表现更好。还有 Outcomes,它会对产出做多轮迭代,有点像 Ralph Wiggum loop,反复迭代直到给出高质量产出。还有 Vaults,这个非常重要,它让你以高度安全的方式存储凭证。MCP server、webhook、权限策略、中断(interrupts)。甚至还有一个 Console agent builder:你在 Anthropic Console 里用自然语言描述你想要的 agent,就能拿到一份可以直接用于产品的生产级配置。
12 · 10:53 · Scheduled & Triggered Agents
10:53还有定时与触发式 agent。比如你想让 agent 每天凌晨 1 点自动跑,或者每天早上 8 点给你的用户出一份每日摘要。这就是 scheduled 和 triggered,可以像 cron job 一样定时跑你的 agent。今天希望大家带走的,是 Managed Agents 的心智模型和它的演进脉络。你还没真正上线一个能跑的 agent——用给出的链接就可以做到,而且你也知道下一步往哪走了。
13 · 11:13 · Wrap-Up: Where to Go Next
11:24功能还有很多。它功能非常丰富。有任何问题,欢迎邮件或 LinkedIn 联系我。我的邮箱是 gagan(at)anthropic.com,feature request 我们也会跟进看。就到这里,很期待大家上手,也期待和在场的各位继续聊。感谢大家抽时间前来。
Anthropic product engineer Gagan Bhat traces the evolution of agentic surfaces — Messages API, the Claude Agent SDK, and the new Claude Managed Agents — and shows why moving the agent loop server-side, separating the brain from the sandbox, and treating sessions as managed cloud resources is Anthropic's fastest path from hours-long prototype to production agent.
He walks through the three managed resources (versioned immutable agent configs, guarded environments, event-driven sessions), the architecture change that removed cold-start latency and the single point of failure, an SRE agent demo, and the newer features: hierarchical sub-agents, memory, dreaming (scheduled consolidation of session transcripts into skills and memory), outcomes (a productized Ralph-style iteration loop), credential vaults, a plain-text console agent builder, and cron-like scheduled agents.
Anthropic 产品工程师 Gagan Bhat 用 12 分钟讲完 agentic 界面的三代演进——Messages API 只给 token 进出、loop/context/工具执行/session 恢复全归你;Claude Agent SDK 打包了 loop+harness+沙箱,但 hosting、扩缩容、可观测性仍归你;Claude Managed Agents 把这些也接管,你只带任务、配置和自定义工具逻辑。核心架构变化是把 agent loop 搬到服务端并与沙箱解耦(大脑与双手分离),消灭冷启动高延迟与单点故障;开发者只通过事件流引导云端 agent,「合上笔记本它还在跑」。他现场走完 SRE agent 例子:定义 agent(版本化不可变配置)→定义环境(网络边界)→挂载日志与 skill→用 agent ID+环境起 session,写的就是生产级代码。功能清单里最有想象力的是 Dreaming(定时回看 transcript 沉淀 skill、改进 memory store)、Outcomes(产品化的 Ralph 循环,多轮迭代到达标)、Console 纯文本生成生产级配置、以及 cron 式定时 agent。