Deploy Autonomous Agents Without Building Loops

Claude Managed Agents eliminates the need to code agent loops, tool execution, or sandboxes by offering a fully managed harness in Anthropic's infrastructure. Define an agent once with model, system prompt, tools, MCP servers, and skills—reference it by ID for reuse. Pair it with an environment: a cloud container pre-loaded with Python, Node.js, Go, etc., plus network rules and mounted files. Start sessions to run tasks; Claude autonomously calls tools like Bash for shell commands, file read/write/edit/glob/grep, web search/fetch, and MCP for external providers. Stream events via SSE for user messages, tool results, and status—history persists server-side for retrieval. Interrupt or steer mid-run by sending new events, enabling stateful interactions over minutes or hours.

To implement: Use managed-agents-2026-04-01 beta header (SDK auto-sets it). Create agent/environment first, then launch session. Rate limits enforce 60 create requests/min (agents, sessions, environments) and 600 read requests/min (retrieve, list, stream), plus org spend tiers.

Target Long-Running, Stateful Workloads

Choose Managed Agents over Messages API when tasks demand extended execution (minutes-hours, multi-tool calls), secure cloud infra, zero custom runtime, and persistence. Messages suits custom loops with fine control; Agents excel at async autonomy with optimizations like prompt caching and compaction for efficient, high-quality outputs. Supports stateful sessions via persistent filesystems and history, perfect for complex workflows like code execution or web research.

Access requires Claude API key (enabled by default); research previews (outcomes, multiagent, memory) need form request. Avoid for quick prompts—stick to Messages.

Leverage Built-in Tools and Secure Execution

Agents grant Claude secure access to container-native tools: Bash for commands, full file ops (read/write/edit/search), web search/fetch for external data, MCP connectors for custom providers. Configure permission policies and vaults for auth (e.g., GitHub). No self-hosted infra needed—Anthropic manages scaling and security.

Branding tip: Use "Claude Agent" or "{YourAgentName} Powered by Claude" in UIs; avoid mimicking Anthropic products like "Claude Code."