Anthropic's Managed Agents API Is Now GA: What Vibe Coders Need to Build With It
By EndOfCoding
Anthropic's Managed Agents API reached General Availability today — officially moving out of the beta program it entered in March 2026. The API lets developers create persistent, stateful AI agents that run in Anthropic's cloud infrastructure, maintain memory across sessions, use tools without per-request configuration, and coordinate with other agents in multi-agent pipelines. Until now, building persistent agentic systems required either running your own orchestration infrastructure or using third-party frameworks like LangChain, CrewAI, or AutoGen. The Managed Agents API provides that orchestration as a managed service, with Anthropic handling agent state persistence, execution reliability, and the infrastructure concerns that currently make self-hosted agent systems fragile in production. For vibe coders, the practical question is direct: does this enable agent-powered features in your applications that weren't previously accessible without significant infrastructure investment? The answer is yes — and the use cases that are newly practical are worth mapping in detail.
What You'll Learn
You'll understand what the Managed Agents API provides that the standard Claude API doesn't, the difference between sessions, agents, and tools in the managed agents model, which vibe coding use cases become newly practical with GA managed agents, how to create your first managed agent with a working code example, and the pricing and limits you need to know before building managed agents into a production application.
What the Managed Agents API Provides (vs. Standard Claude API)
The standard Claude API is stateless: each request starts fresh with whatever context you provide in the prompt. Building a persistent agent on top of the standard API requires you to manage conversation history, tool state, memory retrieval, and execution resumption yourself.
The Managed Agents API adds three managed capabilities:
Standard Claude API vs. Managed Agents API:
Standard API:
├── Stateless: each request is independent
├── Context: you pass conversation history manually
├── Tools: you define and invoke per-request
├── Reliability: if your process crashes, agent state is lost
└── Infrastructure: you manage execution, retry, state storage
Managed Agents API:
├── Stateful: agent sessions persist across requests (and across days)
├── Context: Anthropic maintains conversation and tool state
├── Tools: tools registered once per agent, available in every session
├── Reliability: Anthropic handles execution, retry, checkpoint recovery
└── Infrastructure: Anthropic manages the orchestration layer
Key API surfaces added at GA:
├── /v1/agents — create, update, list agents
├── /v1/sessions — create sessions within an agent, resume existing sessions
├── /v1/sessions/{id}/messages — send messages to a running session
├── /v1/sessions/{id}/state — inspect agent memory and tool state
└── Webhooks: agent completion, error, and checkpoint events
The Three Core Concepts: Agents, Sessions, and Tools
Before building, three concepts need to be clear:
Agent: A persistent configuration that defines an AI agent's behavior — its system prompt, available tools, memory strategy, and model. An agent persists indefinitely. You create it once and reuse it across many sessions.
Session: A single run or conversation within an agent. Sessions have state (the conversation history, tool call results, and any values the agent has stored). Sessions can be suspended and resumed. A session that's waiting for a user response can sit idle for days and resume exactly where it left off.
Tools: Functions the agent can call during a session. At GA, the Managed Agents API supports:
- Built-in Anthropic tools: web search, code execution (sandboxed), document analysis
- Custom tools: your own functions registered via the API
- MCP servers: any MCP-compliant server can be registered as a tool source
Architecture of a managed agent application:
Your Application
│
├── Agent Registry (/v1/agents)
│ ├── agent-id: "customer-support-agent"
│ │ ├── System prompt: "You are a support agent for..."
│ │ ├── Tools: [lookup_order, create_refund, send_email]
│ │ └── Memory: episodic (remembers past interactions with user)
│ └── agent-id: "code-review-agent"
│ ├── System prompt: "You are a senior code reviewer..."
│ ├── Tools: [read_pr, post_comment, approve_pr]
│ └── Memory: semantic (remembers codebase patterns)
│
└── Session Manager (/v1/sessions)
├── Session for User A → customer-support-agent (active)
├── Session for PR #847 → code-review-agent (suspended, waiting)
└── Session for User C → customer-support-agent (resumed after 3 days)
Building Your First Managed Agent: A Working Example
Here is a complete working example of creating a managed agent and starting a session using the Anthropic SDK.
Prerequisites:
# Install Anthropic SDK (Managed Agents GA requires SDK >= 0.30.0)
npm install @anthropic-ai/sdk@latest
# or
pip install anthropic --upgrade
Step 1: Create an agent
import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic({
apiKey: process.env.ANTHROPIC_API_KEY,
});
// Create a persistent agent (run once — save the agent ID)
const agent = await client.agents.create({
name: 'vibe-coding-tutor',
model: 'claude-opus-4-7',
system: `You are an expert vibe coding tutor helping developers learn to build
software with AI coding assistants. You have deep knowledge of Claude Code,
Cursor, and the vibe coding methodology. You remember each student's progress
and adapt your teaching style to their level.`,
tools: [
{
type: 'web_search', // built-in Anthropic tool
},
{
type: 'computer', // built-in sandboxed code execution
},
{
// Custom tool: look up student progress from your database
type: 'custom',
name: 'get_student_progress',
description: 'Retrieve a student\'s course progress and completed exercises',
input_schema: {
type: 'object',
properties: {
student_id: { type: 'string', description: 'The student\'s unique ID' },
},
required: ['student_id'],
},
},
],
memory: {
type: 'episodic', // remembers past sessions with each user
retention_days: 365,
},
});
console.log('Agent created:', agent.id);
// Save agent.id — you'll reference it for all sessions
// Output: Agent created: agt_01XYZ...
Step 2: Start a session and send a message
// Create a session for a specific user
const session = await client.sessions.create({
agent_id: 'agt_01XYZ...', // your agent ID from Step 1
metadata: {
student_id: 'student-12345',
course: 'beginner-track',
},
});
console.log('Session started:', session.id);
// Output: Session started: ses_01ABC...
// Send a message to the session
const response = await client.sessions.messages.create(
session.id,
{
role: 'user',
content: 'I just finished Module 1. I can set up Cursor but I\'m confused about when to use it vs Claude Code. Can you help?',
}
);
console.log('Agent response:', response.content[0].text);
// The agent will use episodic memory to check if it's met this student before,
// call get_student_progress to see their completed modules,
// and potentially use web_search for current tool comparison data.
Step 3: Handle tool calls in your application
// Tool calls from the agent come as events in the response stream
// Your application needs to handle custom tool execution:
const stream = await client.sessions.messages.stream(session.id, {
role: 'user',
content: 'What has my progress been like this week?',
});
for await (const event of stream) {
if (event.type === 'tool_use') {
if (event.name === 'get_student_progress') {
// Execute your custom tool and return the result
const progress = await fetchStudentProgress(event.input.student_id);
// Return tool result to the agent
await client.sessions.messages.create(session.id, {
role: 'tool',
tool_use_id: event.id,
content: JSON.stringify(progress),
});
}
} else if (event.type === 'content_block_delta') {
process.stdout.write(event.delta.text);
}
}
Step 4: Resume a session after a gap
// Sessions persist — resume days later with full context:
const resumedResponse = await client.sessions.messages.create(
'ses_01ABC...', // the session ID from 3 days ago
{
role: 'user',
content: 'I finished Module 2 yesterday. Ready for Module 3.',
}
);
// The agent remembers the entire prior conversation and student context
// No history re-passing needed — Anthropic maintains session state
Vibe Coding Use Cases That Are Now Practical
With GA managed agents, several application patterns that previously required custom orchestration infrastructure become accessible to vibe coders building products:
1. Persistent coding tutors (demonstrated above) An AI tutor that remembers each student's level, completed exercises, and previous questions. Anthropic manages the memory — you manage only the custom tools and UX.
2. Background code review agents An agent that monitors your pull request queue, reviews each PR when it opens, posts comments, and tracks its own review history across PRs. No orchestration server needed — the agent session persists between PR events.
// Triggered by GitHub webhook on PR open:
await client.sessions.create({
agent_id: CODE_REVIEW_AGENT_ID,
metadata: { pr_number: pr.number, repo: pr.repo.full_name },
});
3. Customer support agents with institutional memory A support agent that remembers every prior interaction with each customer — their past issues, preferences, and account context — without you building a memory retrieval system.
4. Multi-step research pipelines An agent that receives a research brief, breaks it into sub-tasks, runs web searches across multiple sessions over hours, synthesizes findings, and delivers a structured report — with checkpoint recovery if a session fails mid-run.
Pricing and Limits at GA
Managed Agents API pricing at GA (April 2026):
├── Agent creation: free (agents don't consume tokens)
├── Session messages: standard Opus 4.7 token pricing + 15% managed overhead
├── Session state storage: $0.001/MB/day for sessions in active storage
├── Memory retention: included in storage pricing
└── Tool calls (built-in): web search $0.005/call, code execution $0.01/call
Limits at GA:
├── Maximum concurrent sessions per agent: 100 (contact Anthropic for higher)
├── Maximum session duration: 30 days (then must create new session)
├── Maximum tool calls per session: 500
├── Custom tools per agent: up to 20
└── Agent count per account: 50 (contact for enterprise limits)
The 15% managed overhead on token pricing is the cost of Anthropic handling session state, reliability, and orchestration. For applications where you'd otherwise build and maintain orchestration infrastructure, this is likely a favorable trade.
Common Challenges
'Is the Managed Agents API the same as Claude Code Routines?' — No. Claude Code Routines (GA April 14) are Anthropic's managed persistent agents for developers using Claude Code as a coding assistant — they're a feature of the Claude Code tool, not an API. The Managed Agents API is for developers building applications that embed persistent agents as product features. Different layer: Routines improve the vibe coder's own workflow; the Managed Agents API lets you build agent-powered products. 'Do I need the Managed Agents API if I'm already using LangChain/CrewAI?' — Not necessarily. If your current orchestration infrastructure works and you're comfortable maintaining it, the Managed Agents API is an alternative, not a requirement. The Managed Agents API is most valuable when you want to eliminate the infrastructure management burden, or when you need Anthropic-managed reliability and checkpoint recovery that self-hosted systems don't provide. 'What happens to sessions if Anthropic has an outage?' — GA-level SLA includes 99.9% uptime with checkpoint recovery. If an outage occurs mid-session, the session resumes from the last checkpoint when service restores. No session state is lost during managed outages — this is the core reliability benefit over self-hosted orchestration. 'Can I migrate existing agents built on LangChain to the Managed Agents API?' — There's no automatic migration tool. You'd rebuild the agent definition (system prompt, tools) via the Managed Agents API and migrate your tool implementations. Sessions can't be migrated — existing conversation history would need to be injected as context if you want continuity.
Advanced Tips
Design your agent's tool surface as narrowly as possible. The Managed Agents API lets you register up to 20 custom tools per agent. Resist the temptation to give agents broad tool access. Narrow tool scopes reduce the attack surface for prompt injection (a known risk in agentic systems — see this week's Lovable breach and MCP CVE posts) and make agent behavior more predictable and auditable. Each tool should do one thing with minimal permissions. Implement webhook-based session monitoring from day one. The Managed Agents API fires webhooks on session completion, error, and checkpoint events. Set up these webhooks before deploying to production — not after an incident. Session error webhooks in particular give you visibility into agent failures that would otherwise be silent. Log every webhook event with the full session metadata for debugging purposes. Use session metadata aggressively for observability. The metadata field on sessions accepts arbitrary key-value pairs that you define. Use it to pass every dimension you might want to debug or analyze later: user ID, feature flag values, model version, A/B test cohort. This metadata is returned in webhook events and in the session list API, making it your primary observability surface for managed agent behavior in production. The Vibe Coding Academy Advanced Track Module 11 (Multi-Agent Development) covers the Managed Agents API architecture in full, including production-ready patterns for tool design, session management, and agent observability. The Vibe Coding Ebook Chapter 6 (Agent Revolution) has been updated today with the Managed Agents GA details and the architecture patterns from this post.
Conclusion
The Managed Agents API reaching GA removes the infrastructure barrier that previously made persistent agent applications a high-complexity build. The core value is straightforward: Anthropic manages session state, execution reliability, and checkpoint recovery — you manage your agent's behavior, tools, and product integration. For vibe coders building applications, this means persistent coding tutors, background code review pipelines, customer support agents with institutional memory, and multi-step research agents are now practical without custom orchestration infrastructure. The 15% managed overhead on token pricing is the cost of that infrastructure elimination — for most application use cases, the trade is favorable. The limiting factors to watch are the 100 concurrent sessions per agent ceiling (contact Anthropic for higher limits) and the 30-day maximum session duration, which requires session management logic for very long-running agent interactions. Start with a narrow tool surface, implement session monitoring via webhooks from launch day, and use session metadata aggressively for observability. The Vibe Coding Academy Advanced Track covers production managed agent architectures in full. The EndOfCoding newsletter tracks Anthropic API developments as the Managed Agents API evolves post-GA.