Claude Managed Agents overview - Claude Platform Docs
Claude Platform Docs
Managed AgentsFirst steps

Claude Managed Agents overview

Pre-built, configurable agent harness that runs in managed infrastructure. Best for long-running tasks and asynchronous work.

Anthropic offers two ways to build with Claude, each suited to different use cases:

Messages APIClaude Managed Agents
What it isDirect model prompting accessPre-built, configurable agent harness that runs in managed infrastructure
Best forCustom agent loops and fine-grained controlLong-running tasks and asynchronous work

Claude Managed Agents provides the harness and infrastructure for running Claude as an autonomous agent. Instead of building your own agent loop, tool execution, and runtime, you get a fully managed environment where Claude can read files, run commands, browse the web, and run code securely. The harness supports built-in prompt caching, compaction, and other performance optimizations for high-quality, efficient agent outputs. To build your own agent loop with direct model access instead, see Using the Messages API.

Create your first agent session

Create a session and send your first event

Event types, rate limits, CLI flags, and other lookup tables

Core concepts

Claude Managed Agents is built around four concepts:

ConceptDescription
AgentThe model, system prompt, tools, MCP servers, and skills
EnvironmentConfiguration for where sessions run: an Anthropic-managed cloud sandbox, or a self-hosted sandbox on your own infrastructure
SessionA running agent instance within an environment, performing a specific task and generating outputs
EventsMessages exchanged between your application and the agent (user turns, tool results, status updates)

How it works

  1. Create an agent

    Define the model, system prompt, tools, MCP servers, and skills. Create the agent once and reference it by ID across sessions.

  2. Create an environment

    Configure where the agent runs: a cloud sandbox, or a self-hosted sandbox on your own infrastructure.

  3. Start a session

    Launch a session that references your agent and environment configuration.

  4. Send events and stream responses

    Send user messages as events. Claude autonomously runs tools and streams back results through server-sent events (SSE). The Managed Agents service keeps the event history, and you can fetch it in full.

  5. Steer or interrupt

    Send additional user events to guide the agent while it runs, or interrupt it to change direction.

When to use Claude Managed Agents

Claude Managed Agents is best for workloads that need:

  • Long-running execution: Tasks that run for minutes or hours with multiple tool calls
  • Cloud infrastructure: Secure sandboxes with pre-installed packages and network access
  • Self-hosted execution: Sandboxes on infrastructure you control for compliance or data-residency requirements
  • Self-hosted service: The whole Managed Agents service on your own infrastructure, with self-hosted Claude Managed Agents
  • Minimal infrastructure: No need to build your own agent loop, sandbox, or tool execution layer
  • Stateful sessions: Persistent filesystems and conversation history across multiple interactions
  • Scheduled execution: Recurring agent runs on a cron schedule through scheduled deployments

Supported tools

Claude Managed Agents gives Claude access to a set of built-in tools:

  • Bash: Run shell commands in the sandbox
  • File operations: Read, write, edit, glob, and grep files in the sandbox
  • Web search and fetch: Search the web and retrieve content from URLs, optionally restricted to an allowlist or blocklist of domains
  • MCP servers: Connect to external tool providers

See Tools for the full list and configuration options.

Beta access

To get started, you need:

  1. A Claude API key from the Claude Console.
  2. The managed-agents-2026-04-01 beta header on all requests.
  3. Access to Claude Managed Agents (enabled by default for all API accounts).

Within the beta, MCP tunnels and dreaming are in a more limited research preview. To enable them, request access to the research preview.

Claude Managed Agents is stateful by design: sessions are long-running, resume cleanly after pauses, and store conversation history, sandbox state, and outputs server-side. Because of this, Managed Agents is not currently eligible for Zero Data Retention or HIPAA Business Associate Agreement (BAA) coverage. The exception for Zero Data Retention is self-hosted Claude Managed Agents, where you store that data yourself, as How long data is kept describes. You retain control over this data: you can delete sessions, and separately delete any files you uploaded, at any time through the API. For eligibility across all features, see API and data retention.

See Rate limits and Branding guidelines in the reference.

Availability

Managed Agents
Availability requirements for Managed Agents are the same across all supported platforms.
Status
Beta
Beta header
Requires
Models
  • All models

Applicable endpoints

  • /v1/agents
  • /v1/sessions
  • /v1/environments
Zero data retentionNot eligible

Not eligible for ZDR, except for self-hosted Managed Agents. Sessions are stateful resources; transcripts persist until you delete them. Learn more

HIPAANot eligible

Not eligible for HIPAA. Applies to all Managed Agents sub-features.

Was this page helpful?