AI DEVELOPMENT
Claude Managed Agents vs Agent SDK: Which Should You Use?
Anthropic launched Claude Managed Agents in beta on April 8, 2026 - a hosted service that runs long-horizon Claude agents in their infrastructure. If you're choosing between Managed Agents and the Agent SDK, the short answer is: pick Managed Agents for multi-hour production workloads, pick the Agent SDK when you need full control over the runtime.
- Managed Agents = Anthropic runs the agent harness, sandbox, and runtime for you (hosted, beta)
- Agent SDK = you run the same engine yourself, with full control over infrastructure
- Pricing: standard token rates + $0.08 per session-hour of active runtime + $10 per 1,000 web searches
- Early adopters: Notion, Rakuten, Asana - focused on long-running enterprise workflows
- Beta header required:
managed-agents-2026-04-01
What Are Claude Managed Agents?
Claude Managed Agents is a hosted service Anthropic launched on April 8, 2026 that runs long-horizon Claude agents in their infrastructure. Instead of building your own agent loop, tool execution layer, and sandbox, you get a fully managed environment where Claude can read files, run commands, browse the web, and execute code securely. Anthropic describes it on their engineering blog as "decoupling the brain from the hands."
The service provides secure sandboxed code execution, authentication, checkpointing, scoped permissions, and persistent long-running sessions. Agents can run for multiple hours on a single task. If a session crashes, checkpointing lets it resume where it left off. Connections to third-party services are handled through MCP servers, which is the same pattern Claude Code and Claude Desktop already use.
According to SiliconANGLE's launch coverage, early adopters include Notion, Rakuten, and Asana. That lineup tells you the target audience: companies shipping agents to production, not hobbyists building weekend projects. The managed service model makes sense for long-running workflows where infrastructure setup would take longer than writing the agent logic.
Claude Managed Agents is in beta. All endpoints require the beta header managed-agents-2026-04-01, which the official Anthropic SDKs set automatically when you use the beta namespace. Features like advanced memory tooling, multi-agent orchestration, and self-evaluation loops are in limited research preview.
What Is the Claude Agent SDK?
The Claude Agent SDK is the same engine that powers Managed Agents, exposed as a library you can run anywhere. It's the infrastructure behind Claude Code, packaged so you can point it at whatever problem you want. You get the agent loop, the built-in tools, context management, and tool execution - basically everything you'd otherwise have to build from scratch.
The SDK is available in Python and TypeScript through the anthropics/claude-agent-sdk-python repository and its TypeScript counterpart. Unlike Managed Agents, the SDK runs in your infrastructure: your laptop, your VPS, your Kubernetes cluster, wherever. That means you control the runtime, the network boundary, and the cost model.
Think of it this way. Managed Agents is like renting a fully-equipped kitchen. The Agent SDK is like getting the industrial oven and the fryer delivered to your house - same equipment, but you set it up and pay the utility bill. Both cook the same food. The question is who handles the overhead.
I've been using the SDK for a few smaller experiments and it's the right choice when you want tight feedback loops during development. Point it at a local directory, let it use tools, watch exactly what it does. For production workloads though, the operational cost of keeping that runtime healthy adds up fast.
Managed Agents vs Agent SDK: Decision Framework
Here's the comparison most posts skip. Both options use the same Claude models and same MCP pattern, but they solve different problems. Pick based on where the work runs and who owns the operational burden.
| Factor | Managed Agents | Agent SDK |
|---|---|---|
| Who runs it | Anthropic | You |
| Best for | Multi-hour production jobs | Custom runtimes, local work |
| Sandboxing | Built-in (managed) | Your responsibility |
| Checkpointing | Automatic | DIY |
| Pricing model | Tokens + $0.08/session-hour | Tokens + your infra costs |
| Network access | Public internet + MCP | Whatever your host allows |
| Local file access | No (sandboxed) | Yes |
| Debugging | Via logs and traces | Full runtime introspection |
| MCP server support | Yes | Yes |
Pick Managed Agents when: you're shipping an agent to production, the work runs for more than a few minutes, you don't want to maintain sandboxing or checkpointing infrastructure, and your tools either live on the public internet or behind MCP servers you've already deployed.
Pick the Agent SDK when: you need agents to touch local files or private networks, cost predictability matters more than operational convenience, you want full runtime introspection during development, or your workload doesn't justify the session-hour premium.
Hybrid approach: prototype with the Agent SDK for fast iteration, then ship the stable version through Managed Agents. Same MCP servers work on both, so the migration path is mostly configuration and pricing, not rewrites.
Claude Managed Agents Pricing Explained
The pricing model has three components. Standard Claude API token rates cover the model inference. On top of that, you pay $0.08 per session-hour of active runtime (measured in milliseconds, so idle time doesn't count). Web searches cost an extra $10 per 1,000 queries. Per The New Stack's analysis, this lines up with how other managed agent services price compute.
Here's a worked example. Say you run an agent that processes a support ticket backlog overnight. It reads 50 tickets, pulls context from your CRM via an MCP server, generates responses, and runs for 3 hours total with 30 minutes of idle time.
| Cost Component | Amount | Estimated Cost |
|---|---|---|
| Input tokens (context) | ~500K tokens | ~$7.50 (Opus 4.6) |
| Output tokens (responses) | ~150K tokens | ~$11.25 (Opus 4.6) |
| Active runtime | 2.5 hours | $0.20 |
| Web searches | ~20 searches | $0.20 |
| Total | ~$19.15 |
The token cost dominates. The session-hour charge at $0.08/hour barely matters unless your agent runs idle for very long periods or you're spinning up hundreds of parallel sessions. For most single-task workloads, Managed Agents ends up costing roughly the same as calling the API directly, with the infrastructure included free. That's the pitch.
The web search premium ($10 per 1,000) is worth noting. If your agent does a lot of research work, it adds up quickly. For comparison, most direct search APIs charge $2 to $5 per 1,000 queries. Anthropic is bundling reliability and rate limit management into that price, but it's a line item to watch.
Getting Started with Managed Agents
The official Anthropic Python SDK handles the beta header automatically when you use the beta namespace. Here's the basic pattern for creating a Managed Agent session using the documented beta header approach. Keep in mind this is a beta API, so exact method names and parameters may shift before GA.
# Install the Anthropic Python SDK
pip install anthropic
# Set your API key
export ANTHROPIC_API_KEY=sk-ant-...With the SDK installed, you can call into the beta namespace. The beta header managed-agents-2026-04-01 unlocks the Managed Agents endpoints. The exact shape of the session API is documented at platform.claude.com/docs/en/managed-agents/overview.
from anthropic import Anthropic
client = Anthropic()
# Create a managed agent session using the beta header.
# Check the official docs for the current session API shape.
response = client.beta.messages.create(
model="claude-opus-4-6",
max_tokens=4096,
betas=["managed-agents-2026-04-01"],
messages=[
{
"role": "user",
"content": (
"Read the support tickets in the CRM, summarize common "
"issues from the last 7 days, and write a report."
),
}
],
)
print(response.content[0].text)For MCP server integration, you configure connections at the session level. This is the same MCP pattern I use for my Jenkins MCP server and Method CRM integration with Claude Code. If you've already built MCP servers, they plug into Managed Agents with minimal changes.
During development, cap the agent's max runtime and token budget. Beta APIs sometimes have edge cases around session cleanup, and a runaway agent in a managed sandbox will still cost you tokens even if nothing useful comes out of the session. Set limits before you trust the agent with a long-running job.
When to Use the Agent SDK Instead
The Agent SDK wins in four specific scenarios. These are the cases where Managed Agents either won't work or doesn't make economic sense.
Local file and network access
Managed Agents run in sandboxed containers on Anthropic's infrastructure. If your agent needs to read your local filesystem, hit private network services, or touch a database that isn't exposed to the public internet, the SDK is the only option. You run it on a machine that already has the access it needs.
Predictable cost control
The session-hour charge is small but real. If you run thousands of agents a day for short tasks, those charges add up. Running the SDK on your own infrastructure means you pay for tokens plus fixed compute costs, which can be cheaper at scale. Do the math on your workload shape before committing.
Development and debugging
When you're iterating on agent behavior, running the SDK locally gives you full visibility. You can step through the tool execution, inspect context state, and print anything. Managed Agents expose logs and traces, but that's a slower feedback loop than watching your agent run in front of you.
Custom tool execution
Managed Agents come with a fixed set of built-in tools (code execution, web search, file ops). If you need tool execution that doesn't fit that model - custom GPU workloads, specialized runtime environments, or tools with unusual security requirements - the SDK lets you wire in whatever you want.
One scenario I want to call out specifically: if you're building on top of Claude Code workflows where the agent needs to interact with your local development environment, the Agent SDK is the natural fit. Managed Agents can't see your local repo.
What This Means for AI Agent Infrastructure
Managed Agents is Anthropic moving up the stack. Until now, if you wanted to ship a Claude-powered agent to production, you had to build a lot of plumbing: the agent loop, sandboxing, tool execution, checkpointing, failure recovery, scoped permissions. That's a few weeks of work even with the Agent SDK doing the heavy lifting. Managed Agents takes all of it off your plate.
This is the same pattern as AWS Lambda versus running your own Node.js server. The managed version is a markup on raw compute, but it saves you from thinking about the parts that aren't your business. For most companies shipping agents, that tradeoff makes sense. Your differentiation is in the prompts, the tools, and the domain expertise, not in how you bolt together a sandbox.
The MCP integration story matters a lot here. If you've already built MCP servers for Claude Code or Claude Desktop - like my basic MCP server or Jenkins MCP - those plug into Managed Agents with almost no changes. The protocol stays the same, you just point the agent config at the MCP endpoint. That's the network effect Anthropic has been building toward with MCP from day one.
What I'm watching over the next few months: how the beta pricing evolves, whether multi-agent orchestration graduates from research preview, and how the session API stabilizes. Beta APIs change, and the current shape will almost certainly shift before GA. But the direction is clear. Agent infrastructure is becoming a commodity, and Anthropic wants to be the provider.
Frequently Asked Questions
Build Your First Managed Agent
Start with the official docs and an MCP server you've already built. If you're new to MCP, check out my calculator server project for the basic pattern.