**Lessons from building agents on the Claude Platform — Transcript & Summary | SozAI**
Source: https://sozai.app/transcript/lessons-building-agents-claude-platform/

Anthropic's team explains Claude Managed Agents: developer APIs for building and scaling agents, covering sandboxes, memory with dreaming, multi-agent Flows, and cost optimization.

## Key Takeaways

- Claude Managed Agents abstracts away agent infrastructure (sandboxing, memory, orchestration, security) so teams can reach production faster.
- As models improve, agent harness primitives should be maintained by the platform rather than by each developer.
- Cost optimization through model delegation, caching, and budgeting is becoming a core requirement for scaled agent deployments.
- Letting the model compose multi-agent workflows at runtime yields strong results on long-horizon tasks.
- Offline memory consolidation ('dreaming') improves memory accuracy over time.

## What the video covers

- Claude Managed Agents is a suite of developer APIs and interfaces that lets companies build and deploy agents at scale, going beyond raw tokens to provide agentic capabilities out of the box.
- Anthropic built internal agent platform infrastructure three times before productizing it, after noticing customers struggled to run agents at scale or for long durations.
- An agent is fundamentally a while loop, but as models improved, primitives like sandboxes, file system access, bash execution, and skills became essential and were built into the platform.
- Infrastructure for security, credential handling for MCP servers, and checkpointing state to databases was built so sessions can persist and decouple from the sandbox.
- Cost is a top concern; the platform supports prompt caching, model delegation (a capable coordinator directing cheaper models), and budgeting as built-in primitives.
- Flows enable multi-agent orchestration where Claude stitches together complex harnesses at runtime, including branching, loops, and parallelization, instead of fixed predefined patterns.
- Outcome optimization and multi-agent task decomposition are increasingly unified, since defining a team and iterating toward good results are closely related.
- Memory is handled via a file store plus an offline 'dreaming' process, inspired by human memory consolidation, which reviews past session logs to correct and consolidate memories.
- Dreaming was shown in evaluations to find and fix incorrect memories by combining prior session logs with the memory store.
- The overarching goal is to shift the burden of keeping up with model advances away from developers, making frontier capabilities accessible without heavy maintenance.

## Chapters

1. 00:00 Dreaming and Memory Consolidation Analogy
2. 00:50 Origins of Claude Managed Agents at Anthropic
3. 02:15 Why Building Agents Is Hard: Primitives and Infrastructure
4. 03:20 Keeping Up With Model Advances and Cost Considerations
5. 04:40 Multi-Agent Orchestration and Flows
6. 07:00 Core Architecture: Checkpointing and Decoupling Sandboxes
7. 12:20 Memory Design and the Dreaming Process

Answers

## Questions about this video

What is Claude Managed Agents?

It is a suite of developer APIs and interfaces that allows companies of any size to build and deploy agents at scale. It provides agentic capabilities out of the box while remaining customizable, going beyond delivering raw tokens.

How does the 'dreaming' process improve agent memory?

Dreaming runs offline and reviews past session logs alongside the memory store, allowing it to find and correct incorrect memories. This is inspired by how the human brain consolidates memories with overall knowledge.

What are Flows and why are they useful?

Flows let Claude stitch together multi-agent workflows at runtime, including branching logic, loops, and parallelization. This allows agents to coordinate on complex tasks and improves task completion rates.

## Full Transcript — Download SRT & Markdown

00:00

Speaker A

In the human brain, we use dreaming to consolidate the memories that we write over the course of the day with our overall knowledge.

00:06

Speaker A

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.

00:22

Speaker A

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?

00:30

Speaker A

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.

00:40

Speaker A

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.

00:50

Speaker A

We kind of built a version of this as a platform like three different times within Anthropic.

00:55

Speaker A

It kind of started as a desire to increase our own internal productivity and have agents kind of work where we work.

01:01

Speaker A

And then we decided to bring it to our apps and we built almost the exact same infrastructure again from scratch.

01:08

Speaker A

And this time we kind of applied some of our lessons and we were kind of learning as we were going.

01:14

Speaker A

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.

01:22

Speaker A

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,

01:35

Speaker A

but they couldn't run these things at scale and they couldn't run it for hours on end.

01:41

Speaker A

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.

01:55

Speaker A

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.

02:06

Speaker A

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.

02:15

Speaker A

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.

02:20

Speaker A

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.

02:29

Speaker A

So Claude very quickly became really, really good at using a terminal and calling bash commands and editing files.

02:38

Speaker A

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.

02:44

Speaker A

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.

02:53

Speaker A

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.

02:59

Speaker A

And then around that we kept building more of the infrastructure that would make this work at scale.

03:03

Speaker A

So sure, you can have a sandbox, but you have to make sure it's very secure.

03:06

Speaker A

And if you're going to connect to MCP servers, you need to make sure that those credentials never leak anywhere.

03:11

Speaker A

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.

03:20

Speaker A

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.

03:32

Speaker A

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.

03:41

Speaker A

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.

03:50

Speaker A

Also making sure agents are cost efficient. A major aspect of that is prompt caching and other things.

03:56

Speaker A

And so those things we can build into Managed Agents and ensure that they're well optimized.

04:00

Speaker A

And what are some of the primary cost considerations and how does Managed Agents kind of address them?

04:04

Speaker A

Yeah, I think that cost is definitely one of the biggest talking points and concerns of anyone from a prosumer to an enterprise today.

04:11

Speaker A

We see a lot of users starting with a highest class model for a sophisticated task and then that's fine for development.

04:18

Speaker A

And as they scale, they realize that they need to more strategically delegate across maybe a variety of models.

04:24

Speaker A

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.

04:36

Speaker A

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.

04:47

Speaker A

And really that's where we see this heading. I actually think subagent delegation is really interesting.

04:53

Speaker A

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.

05:04

Speaker A

Tell us about how Flows supports that. 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.

05:17

Speaker A

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.

05:31

Speaker A

And that was nice and dandy, but the communication between them was relatively straightforward and basic.

05:36

Speaker A

But really what a lot of people want at scale is workflows or multi-agent harnesses that can be a lot more complex.

05:44

Speaker A

So you can have branching logic between them. You might want to put some agents on a for loop within those agents.

05:51

Speaker A

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.

05:59

Speaker A

What we realize is that we shouldn't try to dictate a specific way of doing these things.

06:05

Speaker A

And really the easiest way to do that is by letting Claude just kind of stitch together this multi-agent harness at runtime.

06:11

Speaker A

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.

06:18

Speaker A

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.

06:27

Speaker A

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.

06:40

Speaker A

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.

06:50

Speaker A

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.

07:03

Speaker A

And I think that Flows really brings these two together in a very natural way.

07:08

Speaker A

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.

07:16

Speaker A

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.

07:25

Speaker A

- 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.

07:36

Speaker A

I know you've been working a lot on this. Can you tell us a little bit more about this?

07:39

Speaker A

- 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.

07:46

Speaker A

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.

07:54

Speaker A

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.

08:05

Speaker A

So Flows makes basically the harness an affordance that Claude can tune and modify in a loop in order to satisfy an objective.

08:13

Speaker A

- 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.

08:21

Speaker A

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.

08:29

Speaker A

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.

08:40

Speaker A

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

08:53

Speaker A

to happen a little bit more naturally and also allowed our team to move a lot faster on shipping a lot of these features.

08:57

Speaker A

- 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.

09:06

Speaker A

Can you tell me about the sort of fragility of that infrastructure and what led us to revisit it?

09:11

Speaker A

- 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.

09:22

Speaker A

We realized very, very quickly how just not reliable and slow this would be. These containers are really not intended to be long-lived.

09:30

Speaker A

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.

09:37

Speaker A

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.

09:48

Speaker A

We needed to offer a platform that people can depend on and can actually grow at scale with.

09:54

Speaker A

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.

10:05

Speaker A

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

10:17

Speaker A

to do is just restore a new instance of that sandbox from the checkpoints that we had.

10:21

Speaker A

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.

10:35

Speaker A

- 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

10:47

Speaker A

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.

11:02

Speaker A

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?

11:10

Speaker A

- 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

11:28

Speaker A

and simple enough that even non-developers sort of became builders very, very quickly. 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,

11:41

Speaker A

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.

11:57

Speaker A

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.

12:12

Speaker A

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.

12:20

Speaker A

- I know you're constantly hacking together quick little prototypes with Claude Managed Agents. What has been a couple that you've been enjoying?

12:27

Speaker A

- 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.

12:36

Speaker A

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.

12:45

Speaker A

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.

12:52

Speaker A

They are not necessarily deconflicted relative to prior memories it's written, they're written greedily for that task at hand.

12:58

Speaker A

In the human brain, we use dreaming to consolidate the memories that we write over the course of the day with our overall knowledge.

13:04

Speaker A

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

13:17

Speaker A

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

13:30

Speaker A

because it's basically Claude writing memories greedily independently across lots of different tasks without ever some kind of consolidation step.

13:37

Speaker A

And so this combination of encoding at runtime and consolidation via dreaming, which Dream API supports, is I think very interesting.

13:46

Speaker A

- 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.

13:54

Speaker A

So this kind of helps with what, consolidating that? - It does. And so I've run a lot of different evaluations showing this.

14:00

Speaker A

I'll give a fun example. So I've been doing a lot of long-horizon gameplay using Claude Managed Agents in Pokémon.

14:05

Speaker A

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.

14:14

Speaker A

Okay? This is without dreaming. Claude hits this point in the game and always gets, maybe falls into a trap.

14:20

Speaker A

And so this erroneous memory can get locked in. So you have basically an incorrect memory that persists.

14:26

Speaker A

With dreaming, it can actually look at the past session logs and this incorrect memory and fix it.

14:31

Speaker A

So I've shown very consistently that when you have dreaming enabled, this particular incorrect memory gets fixed and Claude proceeds in the game.

14:38

Speaker A

So it's almost like if you look at game progress, with this incorrect memory, it always falls off.

14:43

Speaker A

But with dreaming enabled, the memory's resolved and gameplay proceeds much, much more basically past that particular trap point.

14:51

Speaker A

So it's a good example of just from trivial gameplay, incorrect memories can get locked and fixed.

14:56

Speaker A

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.

15:06

Speaker A

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.

15:11

Speaker A

- 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?

15:18

Speaker A

Because I think when we first launched memory, we were still experimenting with its performance at scale, still running the evals.

15:25

Speaker A

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.

15:40

Speaker A

And then so when we launched dreaming, we already had this platform that very clearly understood the idea that memory evolves over time.

15:48

Speaker A

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.

16:05

Speaker A

- 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.

16:12

Speaker A

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.

16:19

Speaker A

- Yeah. - Well, thanks. Great to talk to you guys about all this. - Yeah, this was fun. I had fun.

Topics: Claude Managed Agents AI agents multi-agent orchestration Flows agent memory dreaming Anthropic prompt caching agent sandbox cost optimization

Study this video

- [Flashcards from this video](https://sozai.app/tools/flashcard-maker/#from=transcript&id=97849)
- [Quiz on this video](https://sozai.app/tools/quiz-generator/#from=transcript&id=97849)
- [Crossword from this video](https://sozai.app/tools/crossword-maker/#from=transcript&id=97849)
- [Word search from this video](https://sozai.app/tools/word-search-maker/#from=transcript&id=97849)
- [Study guide from this video](https://sozai.app/tools/study-guide-maker/#from=transcript&id=97849)

Free, made by AI from this transcript. No signup.


---
This is the markdown twin of https://sozai.app/transcript/lessons-building-agents-claude-platform/ — the same content, without the markup.
Published by SozAI (https://sozai.app). Reuse and quotation are allowed with attribution and a link back.
Machine-readable index: https://sozai.app/llms.txt · data API: https://sozai.app/api/
