Anthropic beta · checked 2026-10-20

Claude Managed Agents Complete Guide

Claude Managed Agents is Anthropic's managed AI agent platform for running Claude as an autonomous agent: Anthropic provides the agent loop, tool execution, and sandbox runtime, and you send it events. The official docs still mark it beta as of 2026-10-20, and every endpoint needs the managed-agents-2026-04-01 beta header. It also runs on Claude Platform on AWS, with some differences in feature availability and session behavior.

#ClaudeAgents #ManagedAgents #AI Agent #Anthropic

What Are Claude Managed Agents?

Official positioning: a pre-built, configurable agent harness in managed infrastructure, best for long-running tasks and asynchronous work. The product is built around agent (model, system prompt, tools, MCP servers, skills), environment (an Anthropic-managed cloud sandbox or a self-hosted sandbox), session (a running agent instance) and events (messages between your app and the agent). The official pricing page bills two things: tokens at each model's official rates (web searches inside a session are $10 per 1,000) and session runtime at $0.08 per session-hour, counted only while the session is running, not while idle. Anthropic also says Managed Agents is not currently eligible for Zero Data Retention (ZDR) or HIPAA BAA coverage.

What does it cost to run agents yourself?

  • ✗Spending dev cycles building secure sandbox infrastructure
  • ✗Manually implementing state management and session persistence
  • ✗Hand-rolling credential security and permission isolation
  • ✗Building your own agent loop, tool execution, and runtime

What does Managed Agents take care of?

  • ✓Ready-to-use sandboxed code execution environment
  • ✓Automatic checkpointing and session recovery
  • ✓Built-in credential management and scoped permission control
  • ✓Anthropic-maintained agent loop with built-in prompt caching and compaction

Six Core Capabilities

Sandboxed Code Execution

Agent code runs in an isolated sandbox: the built-in bash tool runs commands and the built-in file operations do read, write, edit, glob and grep, all off the host system.

Checkpointing

Automatically saves agent execution state so long-running tasks can be paused and resumed at any point without restarting: when a session goes idle its sandbox is checkpointed, preserving the filesystem, installed packages and files the agent created. Sandbox state is kept for 30 days after creation.

Credential Management

Securely stores and injects API keys, OAuth tokens, and other sensitive credentials that agents access on demand without exposing plaintext: they live in a managed vault and reach the agent as environment variables, the sandbox holds only a placeholder, and the real key is attached at the network boundary.

Scoped Permissions

Fine-grained permission control — configure a minimal permission set per agent, following the principle of least privilege. Per tool you pick a policy: always_allow runs the tool, always_ask waits for your approval, auto lets the server judge each call, and the agent toolset defaults to always_allow.

End-to-End Tracing

Complete execution chain tracing — every agent action is observable, auditable, and replayable: the events you send stream back over SSE, the event history is stored server-side and can be fetched in full. Read endpoints allow 1,200 requests per minute, create endpoints 300, counted per organization.

Scheduled deployments

Cloud-hosted infrastructure, with no infrastructure ops required: give an agent a cron expression down to the minute and it starts sessions on schedule, and every run opens a new session that completes the task.

Quick Start

The official quickstart runs in this order: create an agent (model, system prompt, tools), create an environment (sandbox and networking), create a session, then send the first event. Every request needs the managed-agents-2026-04-01 beta header.

Python Python SDK

# pip install anthropic
from
anthropic
import
Anthropic
client = Anthropic()
# Create an agent (model, system prompt, tools)
agent = client.beta.agents.create(
name="Coding Assistant",
model="claude-opus-5-5",
system="You are a helpful coding assistant. Write clean, well-documented code.",
tools=[{"type": "agent_toolset_20260401"}],
)
environment = client.beta.environments.create(
name="quickstart-env",
config={"type": "cloud", "networking": {"type": "limited", "allow_package_managers": True}},
)
# Create a session and send the first event
session = client.beta.sessions.create(
agent=agent.id,
environment_id=environment.id,
)
client.beta.sessions.events.send(
session.id,
events=[{"type": "user.message", "content": [{"type": "text", "text": "..."}]}],
)

TypeScript TypeScript SDK

// npm install @anthropic-ai/sdk
import
Anthropic
from
'@anthropic-ai/sdk'
;
const client = new Anthropic();
// Create an agent (model, system prompt, tools)
const
agent =
await
client.beta.agents.create({
name: 'Coding Assistant',
model: 'claude-opus-5-5',
system: 'You are a helpful coding assistant. Write clean, well-documented code.',
tools: [{ type: 'agent_toolset_20260401' }]
});
const
environment =
await
client.beta.environments.create({
name: 'quickstart-env',
config: { type: 'cloud', networking: { type: 'limited', allow_package_managers: true } }
});
// Create a session and send the first event
const
session =
await
client.beta.sessions.create({
agent: agent.id,
environment_id: environment.id
});
await
client.beta.sessions.events.send(session.id, {
events: [{ type: 'user.message', content: [{ type: 'text', text: '...' }] }]
});

Usage Anthropic names

Anthropic's blog states: Rakuten uses scheduled deployments to analyze spreadsheet data and produce reports and decks, and lets product managers watch production logs and metrics without a dashboard; Notion uses vault environment variables to roll out its own CLI.

N

Notion

Using Managed Agents to build agents with file-upload capabilities, Notion rolls out its own CLI with vault environment variables alongside MCP tools, without API tokens ever being handed to the model.

S

Sentry

The official blog lists the Sentry CLI among the CLIs that can authenticate with vault environment variables: the sandbox holds only a placeholder and the real key is attached at the network boundary.

R

Rakuten

Deployed agents via Managed Agents: Rakuten uses scheduled deployments to analyze spreadsheet data and produce reports and decks on a weekly or monthly schedule.

Managed Agents and QCode.cc

QCode.cc speaks the Anthropic API protocol; the Managed Agents beta endpoints for agents and sessions are hosted by Anthropic itself, need the managed-agents-2026-04-01 beta header, and the entry point is Anthropic's own API. QCode.cc serves Claude models over the Anthropic Messages protocol — claude-opus-5-5 and claude-sonnet-5 are callable — billed per token, with each model's price on /models.

# Point the SDK base URL at QCode.cc
import anthropic
client = anthropic.Anthropic(
base_url="https://api.qcode.cc/api",
api_key="cr_xxxxxxxx",
)
# Claude models go through QCode.cc; agent and session endpoints sit on Anthropic's side
response = client.messages.create(
model="claude-opus-5-5",
max_tokens=1024,
messages=[{"role": "user", "content": "..."}],
)

Start Building Your Managed Agent

Via QCode.cc, Claude models are billed per token, with each model's price on /models. Claude Managed Agents' agent and session endpoints are hosted by Anthropic and need the managed-agents-2026-04-01 beta header.

Not sure where to start?

Try it for a week

Small Pack: $4 for $30 of quota, valid 7 days

Use it every day

Starter: $9.00/month with $5 of quota every day — just $0.060 per $1 of quota, vs about $0.113 for the Medium Pack