Anthropic Engineers Introduce Claude Managed Agents Session
The session covered the historical development of managed agents, common pitfalls in their design, and practical approaches to building them effectively, with a focus on hands-on coding.
Anthropic's new architecture for Claude Managed Agents decouples core components to enhance security, flexibility, and operational efficiency.
The session covered the historical development of managed agents, common pitfalls in their design, and practical approaches to building them effectively, with a focus on hands-on coding.
Priyanka described an agent as fundamentally "a model in a loop with tools," highlighting the iterative process where the model continuously decides on and takes the next action by calling various tools.
This decision-making and tool-calling loop persists until the designated task is successfully completed, with the entire structure comprising the model itself, a surrounding harness, and a sandbox or computational environment.
It proactively compensates for inherent model limitations and specific behaviors, such as 'context anxiety' observed in models like Sonnet 45, by filling gaps the model cannot address on its own, thereby maintaining agent functionality across evolving model capabilities, including newer versions like Opus 45.
Agents necessitate access to a sandbox or computing environment to execute the code they generate, as this code can be untrusted or contain bugs, making robust isolation essential.
To mitigate risks, Anthropic mandates running each task within its own separate container, a best practice that prevents unintended side effects and effectively limits the 'blast radius' of potential failures to a single isolated instance.
This feedback prompted a strategic re-evaluation and subsequent pivot to an entirely new architecture, departing from the original design that consolidated all components, including the session log and harness, within a single container.
The initial architectural setup for Claude Managed Agents combined the brain and sandbox execution into a single, tightly coupled container, which was described using the "pet" analogy.
Unlike a disposable "cattle" instance that can be easily replaced, a "pet" is a unique, hand-tended entity that, if it failed, would cause significant operational overhead, as was the case with the initial monolithic design.
Operational hurdles, including the difficulty of isolating failure points within a single container, complicated the debugging process for the original monolithic architecture.
Security concerns also arose from customer data residing directly on the containers, and integrating with Multi-Cloud Provider (MCP) environments proved inefficient due to the complexities of network peering or shipping software harnesses to customer Virtual Private Clouds (VPCs).
This decoupling allows each component to be treated as 'cattle,' meaning sandboxes can be spun up and replaced as needed for recovery, and if the harness fails, the system can seamlessly resume operations by re-reading the append-only event log, ensuring only the session log is critical, while other elements are interchangeable.
Previous versions of Claude Managed Agents exposed credentials within the sandbox, making them vulnerable to prompt injection attacks where a model could be tricked into revealing sensitive tokens.
The redesigned system now employs a proxy to securely inject tokens only when necessary for external API calls, ensuring that Claude itself never directly accesses or processes the actual credentials, thereby significantly mitigating the risk of token exposure.
The new architecture incorporates a persistent, append-only event log that retains all interactions without compaction or discarding, while a separate compaction strategy independently determines which parts of the log enter the context window for the model.
This architectural change also dramatically improved inference performance, specifically reducing time-to-first-token by 90% due to the ability to spawn sandboxes on-demand rather than incurring startup delays.
This design philosophy ensures that interfaces can adapt and outlast early assumptions often embedded in initial harness designs, providing long-term flexibility and resilience.
The modular architecture allows developers to easily swap out various components, such as compaction strategies and even entire harnesses, without altering the core interface.
This extensibility ensures the system remains generic and adaptable, capable of withstanding future technological shifts and facilitating a more pluggable mode of operation.
The append-only session log meticulously records all interactions, the interchangeable harness decouples the execution environment from the agent's core logic, and the 'hands' provide the model with flexible access to external capabilities, collectively making the system more generic and extensible for future needs.
The second step involves creating the agent itself, which entails assigning a name, selecting a suitable model such as Opus, Haiku, or Sonnet, and then defining the necessary system prompts and tool sets for its operation.
Finally, the third step is to create a session, utilizing the previously defined agent ID and environment ID, which then serves as the fundamental unit of work for the agent.
Custom tools allow developers to define specific functionalities and handle their responses; when a custom tool is invoked, Claude places a 'custom tool use' event onto the event stream, which the system can then listen to and process to return a result.
This interaction model enables developers to define custom tools that can intercept specific tool-use events, process them, and then return a 'tool result' to Claude, facilitating complex, interactive workflows within distributed systems.
The 'status idle' event signifies that a session is inactive and not connected to a sandbox, while the 'interrupt' function allows users to forcefully terminate a session, halting any ongoing work when it is no longer needed.
Developers can access their API credits and begin working with Claude Managed Agents by navigating to platform.claude.ai.
Within the Anthropic console, a dedicated 'managed agent section' features a 'Quick Start' guide, which provides a comprehensive, guided tour for developers looking to build their first AI agent.
Answers come from the transcript, with the exact spot cited.
Want the next article from AI Engineer?
When AI Engineer publishes, we'll write it up like the one you just read and email it to you.
AI Engineer published 96 in the last 7 days.
Buildings as Data: Spatial Memory for Asset TrackingAI Engineeryesterday · 10:28 · 679 views · Created yesterday
Three Levels to Catch When Agents Get It WrongAI Engineeryesterday · 12:25 · 2.2K views · Created yesterday
Just-in-Time Ontologies Reshape Data StrategyAI Engineer2 days ago · 21:03 · 379 views · Created 2 days ago