DEV Community

정상록
정상록

Posted on

Claude Managed Agents: Anthropic's New Serverless Agent Infrastructure

TL;DR

Anthropic released Claude Managed Agents in public beta on April 8, 2026. It's essentially serverless infrastructure for AI agents - they manage the agent loop, sandboxing, tool execution, and session state. You focus on agent logic.

The Problem It Solves

Building a production-ready AI agent requires more than just calling a model. You need:

  • Agent loop management (tool call → execute → feed result → repeat)
  • Sandboxed execution environments
  • Session state persistence
  • Error recovery for long-running tasks

With the Messages API, you build all of this yourself. Managed Agents handles it for you.

Core Concepts

Agent → defines what (model, prompt, tools)
Environment → defines where (container, packages, network)
Session → connects Agent + Environment (stateful)
Events → communication channel (SSE streaming)
Enter fullscreen mode Exit fullscreen mode

How It Works

# 1. Create an agent
curl https://api.anthropic.com/v1/agents \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-beta: managed-agents-2026-04-01" \
  -d '{"name": "code-reviewer", "model": "claude-sonnet-4-6", "tools": [{"type": "agent_toolset_20260401"}]}'

# 2. Create an environment
curl https://api.anthropic.com/v1/environments \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-beta: managed-agents-2026-04-01" \
  -d '{"name": "python-env"}'

# 3. Start a session
curl https://api.anthropic.com/v1/sessions \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-beta: managed-agents-2026-04-01" \
  -d '{"agent_id": "AGENT_ID", "environment_id": "ENV_ID"}'
Enter fullscreen mode Exit fullscreen mode

That's it. The agent now has access to Bash, file operations, web search, and MCP servers - all built-in.

Built-in Tools

No custom implementation needed:

  • Bash - shell command execution
  • File operations - read, write, edit, glob, grep
  • Web search & fetch - search and retrieve web content
  • MCP servers - connect external tool providers

Messages API vs Managed Agents

Messages API Managed Agents
Scope Model prompting Full agent harness
Best for Custom agent loops Long-running, async tasks
Infrastructure Build yourself Anthropic-managed
Tool execution Implement yourself Built-in
State management Implement yourself Session-based, automatic
Long-running Limited Minutes to hours
Extra cost Tokens only Tokens + $0.08/hr

Pricing

  • Tokens: Standard Claude API pricing
  • Session runtime: $0.08/hour (running state only, idle is free, millisecond billing)
  • Web search: $10 per 1,000 searches

A 10-minute session costs about $0.013 in runtime alone.

Research Preview

Two features in research preview:

  1. Multi-agent: Agents can spawn sub-agents for parallel work
  2. Outcomes: Automatic quality evaluation and improvement (+10pp success rate)

Getting Started

Available for all API accounts today. Beta header managed-agents-2026-04-01 is auto-set in SDKs.

brew install anthropic-cli
Enter fullscreen mode Exit fullscreen mode

Rate limits: 60 req/min (create), 600 req/min (read).


Docs: Claude Managed Agents Overview

Quickstart: Getting Started Guide

Top comments (0)