Anthropic launched Claude Managed Agents on April 8, 2026, and it represents the biggest shift in how developers build AI agents since the introduction of tool use. Instead of stitching together your own agent infrastructure from scratch, you now get a fully hosted system that handles sandboxing, state management, tool execution, and orchestration out of the box.
The promise is straightforward: go from prototype to production in days rather than months. Early adopters like Rakuten, Notion, and Sentry are already reporting dramatic efficiency gains. But what exactly are Claude managed agents, how does the architecture work, and should you use them for your next project?
This guide breaks down everything you need to know.
Key Takeaways
- Claude Managed Agents is Anthropic's fully hosted infrastructure that handles sandboxing, state management, tool execution, and orchestration so teams can go from prototype to production in days rather than months.
- The five-component architecture (Harness, Tools, Session, Sandbox, Orchestration) decouples AI reasoning from code execution, making the system horizontally scalable, fault-tolerant, and resilient to disconnections.
- Early enterprise adopters report dramatic results: Rakuten cut task turnaround by 79% (from 24 days to 5 days) across five business functions, each going live in under a week.
- The Claude Agent SDK and Managed Agents are distinct: the SDK gives full control on your own infrastructure (ideal for CI/CD and local execution), while Managed Agents runs everything in Anthropic's cloud for zero-infrastructure deployment.
- Pricing is $0.08 per session-hour (idle time is free), with native MCP integration and built-in prompt caching making it cost-competitive against the engineering time required to build equivalent self-managed infrastructure.
- Getting started takes four steps: create an agent definition, create an execution environment, start a session, and stream events, all available across seven official SDKs including Python, TypeScript, Go, and Java.
Learn this hands-on
Ready to ship a real production app, not just pick a model? Check out the Master Course: Build and Ship a Production-Ready App with Lovable and Cursor.
What Are Claude Managed Agents?
Claude Managed Agents is a fully managed infrastructure service from Anthropic that lets you deploy production-grade autonomous AI agents without building your own agent harness. It is currently in public beta, accessible through the /v1/agents API endpoint with the beta header managed-agents-2026-04-01.
The core idea is simple: you define what an agent should do (its model, system prompt, tools, and skills), and Anthropic handles the entire execution environment. No container management, no state persistence logic, no sandbox configuration. You send a task, and the agent runs it to completion in Anthropic's cloud.
This is fundamentally different from using the raw Claude API, where you manage the entire agentic loop yourself: calling the model, parsing tool calls, executing them, feeding results back, handling errors, and maintaining session state. Claude managed agents abstract all of that away.
The Architecture: Decoupling the Brain from the Hands
Anthropic published a detailed engineering blog explaining how they built the managed agents infrastructure. The architecture is elegant and centers on one key insight: decouple the AI reasoning (the brain) from the code execution (the hands).

The system splits into five interconnected components:
The Harness (Center)
The harness is the core orchestration layer that sits at the center of everything. It is a stateless process that coordinates between Claude's reasoning and the execution environments. The harness decides when to call tools, manages context windows, handles error recovery, and routes requests to the right components.
Critically, the harness is stateless by design. This means it scales horizontally without complexity. Multiple harness instances can connect to execution environments on demand, and if one fails, another picks up seamlessly from the session log.
Tools and Resources / MCP
At the top of the architecture sits the tools layer. Claude managed agents come with a rich set of built-in tools: bash execution, file operations (read, write, edit, glob, grep), web search and fetch, and full MCP (Model Context Protocol) server support.
The MCP integration is a major differentiator. You can connect any MCP-compatible tool server to your agent, giving it access to external APIs, databases, and services through a standardized protocol. This means your agent can interact with Slack, GitHub, Jira, or any custom service without writing custom integration code.
Session (Left)
The session is a durable context object that lives outside both Claude's context window and the harness itself. This is what makes managed agents resilient. Every interaction, tool call, and result is logged to the session as an event.
If a connection drops or a harness crashes, the system recovers by calling wake(sessionId), retrieving the session log, and resuming from the last event. No work is lost. The session also enables event transformations before passing context to Claude, which Anthropic uses for prompt cache optimization.
This architecture reduced p50 time-to-first-token by approximately 60% and p95 by over 90%, because the system no longer needs to pay full container setup costs for every interaction.
Sandbox (Right)
The sandbox is an isolated execution environment where agent code actually runs. Containers are treated as disposable infrastructure. When an agent needs to execute bash commands, write files, or run code, it happens inside a sandboxed container.
If a container fails, the harness catches the error as a tool call response and passes it back to Claude, which can retry with a fresh container. This makes the system remarkably fault-tolerant. Importantly, untrusted code never reaches credentials: a dedicated proxy holds OAuth tokens in a secure vault, so even if agent-generated code behaves unexpectedly, it cannot access sensitive secrets.
Orchestration (Bottom)
The orchestration layer manages the overall workflow: how agents are created, how sessions are started, how events flow between components, and how multi-agent coordination works. It handles the lifecycle of agent definitions, environment configurations, and running sessions.
Four Core Concepts You Need to Understand
Before writing your first line of code, you need to understand the four building blocks of the managed agents system:
| Concept | What It Is | Created Once or Per Task? |
|---|---|---|
| Agent | The definition: model, system prompt, tools, MCP servers, skills | Once (reusable) |
| Environment | A container template: packages, network access, mounted files | Once (reusable) |
| Session | A running instance of an agent in an environment, performing a task | Per task |
| Events | Messages exchanged via SSE between your app and the agent | Continuous |
An agent is like a job description. An environment is like an office setup. A session is an employee actually doing a task. Events are the conversation between you and that employee.
How to Build Your First Claude Managed Agent
Here is a complete working example using the Python SDK. You can install it with pip install anthropic:
from anthropic import Anthropic
client = Anthropic()
# 1. Create an agent definition
agent = client.beta.agents.create(
name="Coding Assistant",
model="claude-sonnet-4-6",
system="You are a helpful coding assistant.",
tools=[{"type": "agent_toolset_20260401"}],
)
# 2. Create an execution environment
environment = client.beta.environments.create(
name="quickstart-env",
config={
"type": "cloud",
"networking": {"type": "unrestricted"}
},
)
# 3. Start a session
session = client.beta.sessions.create(
agent=agent.id,
environment_id=environment.id,
title="My first managed agent session",
)
# 4. Send a message and stream the response
with client.beta.sessions.events.stream(session.id) as stream:
client.beta.sessions.events.send(session.id, events=[{
"type": "user.message",
"content": [{
"type": "text",
"text": "Create a Python script that generates Fibonacci numbers"
}],
}])
for event in stream:
match event.type:
case "agent.message":
for block in event.content:
print(block.text, end="")
case "agent.tool_use":
print(f"\n[Using tool: {event.name}]")
case "session.status_idle":
print("\nAgent finished.")
break
The agent_toolset_20260401 tool type gives your agent access to the full set of built-in tools: bash, file operations, web search, and more. SDKs are available in Python, TypeScript, Go, Java, C#, Ruby, and PHP.
There is also a CLI tool called ant that you can install via Homebrew for quick experimentation.
Claude Agent SDK vs Claude Managed Agents: What Is the Difference?
This is a common source of confusion, so it is worth being precise. Anthropic offers two distinct products for building agents, and they serve different purposes:
| Claude Agent SDK | Claude Managed Agents | |
|---|---|---|
| What it is | A library (Python/TypeScript) that gives you Claude Code's tools programmatically | A hosted API service with full cloud infrastructure |
| Where it runs | Your machine, your server, your CI/CD pipeline | Anthropic's cloud containers |
| Best for | Custom agent loops, local execution, CI/CD integration | Long-running tasks, async work, zero-infrastructure deployment |
| How you use it | pip install claude-agent-sdk | API calls to /v1/agents, /v1/sessions |
| Infrastructure | You manage everything | Anthropic manages everything |
The Claude Agent SDK (formerly the Claude Code SDK, renamed in early 2026) gives you the same tools, agent loop, and context management that power Claude Code, but programmable on your own infrastructure. If you want to go deep on Claude Code itself, the How to Master Claude Code series covers everything from shipping code faster to building custom AI agents. Managed agents is the hosted version where Anthropic runs everything in their cloud.
When to use the Agent SDK: You want full control, you are running agents in CI/CD, you need to integrate with existing infrastructure, or you want to keep execution local.
When to use Managed Agents: You want to deploy agents fast without managing infrastructure, you need long-running async tasks, or you want built-in sandboxing and session persistence.
Many teams use both. The Agent SDK for development and testing, managed agents for production deployment.
Real-World Use Cases and Enterprise Adoption
Several major companies have already adopted Claude managed agents in production:
Rakuten deployed agents across five business functions: product, sales, marketing, finance, and operations. Task turnaround dropped from 24 days to 5 days, a 79% reduction. Each function went live in under a week.
Notion uses managed agents to let engineers ship code and knowledge workers generate presentations and websites without leaving the platform. Their implementation runs dozens of parallel tasks simultaneously.
Sentry paired their existing debugging agent with a Claude-powered agent that writes patches and opens pull requests autonomously, going from bug flag to completed PR without human intervention.
As Indragie Karunaratne, Senior Director of Engineering (AI/ML) at Sentry, put it: "Managed Agents not only allowed us to build the initial integration in weeks instead of months, but has also eliminated the ongoing operational overhead of maintaining bespoke agent infrastructure."
Asana built AI Teammates that are embedded in project management workflows. These agents pick up assigned tasks, draft deliverables, and hand back outputs for human review.
These are not experimental prototypes. These are production deployments handling real workloads at scale.
Managed Agents not only allowed us to build the initial integration in weeks instead of months, but has also eliminated the ongoing operational overhead of maintaining bespoke agent infrastructure.
How Claude Managed Agents Compare to Other Frameworks
The agent framework landscape in 2026 is crowded. If you are still choosing your primary AI coding tool, our guide to the best AI coding assistants in 2026 breaks down how Claude Code, Cursor, GitHub Copilot, and others compare. Here is how managed agents stack up:
| Framework | Key Difference from Claude Managed Agents |
|---|---|
| LangChain / LangGraph | Model-agnostic, you build everything yourself. More control but significantly more work. Best for teams that need multi-provider flexibility. |
| CrewAI | Role-based multi-agent orchestration with model-agnostic support. Good for multi-agent team workflows but requires your own infrastructure. |
| AutoGen (Microsoft) | Research-oriented conversational agents with strong Microsoft ecosystem integration. Less production-ready than managed agents. |
| OpenAI Agents SDK | Similar provider-native concept, but uses a sequential handoff pattern versus Anthropic's supervisor-delegate pattern. |
The key differentiators for Claude managed agents are:
- Zero infrastructure: Unlike every other framework, you do not manage containers, sandboxes, or execution environments
- Deepest MCP integration: Native support for the Model Context Protocol, which is becoming the standard for agent-tool communication
- Provider-native optimization: Tuned specifically for Claude models, with features like prompt caching and context compaction built in
- Resilient sessions: Durable session state that survives disconnections and failures
The trade-off is vendor lock-in. Managed agents only work with Claude models. If multi-provider flexibility is critical for your use case, LangChain or CrewAI give you that at the cost of managing your own infrastructure.
Pricing: What Does It Cost?
Claude managed agents pricing has three components:
- Token costs: Standard Claude API pricing per input and output token
- Session runtime: $0.08 per session-hour, measured to the millisecond
- Idle time is free: You only pay when the agent is actively executing
Some practical examples:
- A system running 24 agents for 8 hours per day costs approximately $15.36 per day in session overhead (before token costs)
- An always-on agent costs roughly $58 per month in runtime before token costs
- Web search usage is billed at $10 per 1,000 searches
The session-hour pricing is competitive for the infrastructure it replaces. Building and maintaining your own sandboxed execution environment with session persistence typically costs significantly more in engineering time alone.
Features Coming Soon
Several features are currently in research preview and require an access request:
- Outcomes: Define success criteria for agent self-evaluation, so agents can assess whether they completed a task correctly
- Multi-agent coordination: Multiple agents working together on complex tasks with shared context
- Persistent memory: Agent memory that persists across sessions, enabling agents that learn and improve over time
You can request access to these features through the Anthropic platform.
Getting Started: Your Next Steps
If you want to start building with Claude managed agents, here is the path:
- Get API access: Sign up at console.anthropic.com and generate an API key
- Install the SDK:
pip install anthropic(Python) ornpm install @anthropic-ai/sdk(TypeScript) - Start with the quickstart: Create an agent, environment, and session using the code example above
- Add tools progressively: Start with built-in tools, then connect MCP servers for external integrations
- Move to production: The same agent definition works in development and production with no changes
The managed agents documentation is comprehensive and includes examples for every SDK. Once you are up and running, you can extend Claude's capabilities further using Claude Code hooks to automate repetitive steps in your development and deployment workflow.
For a hands-on approach to building production-ready applications with AI tools, our master course covers the complete workflow from idea to deployed product, including how to integrate AI agents into real applications.
Related Course on Vibe Coding Academy
Conclusion
Claude managed agents represent a meaningful evolution in how we build AI-powered applications. By abstracting away the infrastructure complexity of agent execution (sandboxing, state management, tool orchestration, error recovery), Anthropic is making it possible for smaller teams to build the kind of autonomous AI systems that previously required dedicated platform engineering.
The architecture is sound: decoupling the brain from the hands, making sessions durable, and treating containers as disposable infrastructure solves real problems that every team building agents has encountered.
Whether you should adopt managed agents today depends on your situation. If you are building a new agent-powered product and want to ship fast, the managed approach saves weeks of infrastructure work. If you have existing agent infrastructure and need maximum control, Claude Code vs Cursor is a good read for understanding the tradeoffs between different approaches to AI-assisted development, and the Claude Agent SDK might be the better starting point.
Either way, the direction is clear: agent infrastructure is becoming a managed service, just like databases and hosting before it. The teams that learn to build on these platforms now will have a significant advantage as AI agents become a standard part of every software product.