Try Bifrost Enterprise free for 14 days. Request access

Claude Managed Agents vs the Claude Agent SDK: Which to Use in 2026

Claude Managed Agents and the Claude Agent SDK give you the same agent engine in two forms: a hosted service or a library you run. This guide compares architecture, tools, data handling, and control, and shows how to govern model and tool traffic for both with Bifrost.

Claude Managed Agents vs the Claude Agent SDK: Which to Use in 2026

TL;DR

  • Claude Managed Agents is Anthropic's hosted agent runtime, in public beta since April 8, 2026: you define an agent, an environment, and a session, and Anthropic runs the loop, tools, and sandbox.
  • The Claude Agent SDK (renamed from the Claude Code SDK in September 2025) is a Python and TypeScript library that runs the same kind of agent loop inside your own process and infrastructure.
  • Managed Agents suits long-running, asynchronous work without infrastructure to run; the Agent SDK suits teams that need full control of runtime, data handling, CI integration, and provider routing.
  • Hosted Managed Agents sessions are stateful, are not eligible for zero data retention, and are not HIPAA-eligible; self-hosted options exist for sandboxes and for the whole service.
  • Agent SDK services can route every model and MCP tool call through Bifrost for virtual keys, budgets, tool filtering, and one audit trail; Managed Agents can reach governed tools through MCP.

Claude Managed Agents is the newest way to run Claude as an autonomous agent, and the first question most teams ask is how it differs from the Claude Agent SDK they may already use. Bifrost, the open-source AI gateway built by Maxim AI, governs model, MCP tool, and agent traffic and is the best choice for enterprises running mission-critical AI workloads that require top-tier performance, scalability, and reliability. This guide compares Claude Managed Agents and the Agent SDK on architecture, tools, data handling, and control, and shows where a gateway fits.

Claude Managed Agents vs the Agent SDK: The Short Answer

Claude Managed Agents is a hosted service: Anthropic runs the agent loop, tool execution, and sandbox, and your application starts sessions and exchanges events. The Claude Agent SDK is a library: your code runs the same style of loop, tools, and context management on your own machines. The difference is who operates the runtime.

In practice:

  • Choose Managed Agents when you want long-running or asynchronous agent tasks without building sandboxes, session storage, or a tool runtime.
  • Choose the Agent SDK when you need agents inside your own services or CI pipelines, strict control over where data lives, custom hooks and permissions, or routing across model providers.
  • Use both when product teams want hosted agents for some workloads while platform teams keep sensitive or high-volume agents in-house.

Both build on the agent engine behind Claude Code, so concepts such as tools, MCP servers, skills, and subagents carry over. The Claude Agent SDK through a gateway guide covers the SDK side in more depth.

What Is Claude Managed Agents?

Claude Managed Agents is a set of Anthropic APIs that run Claude as an agent on managed infrastructure. It launched in public beta on April 8, 2026, is enabled by default for Claude API accounts, and requires the managed-agents-2026-04-01 beta header, which Anthropic's SDK sets automatically. Anthropic provides the agent loop, tool execution, runtime, prompt caching, and compaction.

The service is built on four concepts, according to the Claude Managed Agents documentation:

  • Agent: the model, system prompt, tools, MCP servers, and skills, created once and referenced by ID.
  • Environment: where sessions run, either an Anthropic-managed cloud sandbox or a self-hosted sandbox.
  • Session: a running agent instance working on a task and producing outputs.
  • Events: user turns, tool results, and status updates exchanged with the session and streamed over server-sent events.

Built-in tools include bash in the sandbox, file operations, web search and fetch with optional domain allow or block lists, and connections to MCP servers. Related capabilities include multi-agent orchestration, persistent memory, defined outcomes, session budgets, and credential vaults, with some features such as MCP tunnels in limited research preview. Managed Agents is available on the Claude API, Claude Platform on AWS, and Claude models on Google Cloud. Teams comparing hosted and self-run tool infrastructure can also read open-source vs managed MCP gateways.

What Is the Claude Agent SDK?

The Claude Agent SDK is Anthropic's Python and TypeScript library that exposes the agent loop, built-in tools, and context management behind Claude Code. It was renamed from the Claude Code SDK in September 2025, bundles the Claude Code binary, and runs wherever your code runs: a laptop, a container, a CI job, or a production service.

Core building blocks, per the Agent SDK overview:

  • Built-in tools for reading and editing files, running commands, and searching the web.
  • Hooks that run custom code at points in the agent lifecycle, such as before or after a tool call.
  • Subagents for parallel or specialized work.
  • Permissions that decide which tools run automatically and which need approval.
  • Sessions, skills, plugins, and MCP connections for state, reusable capabilities, and external tools.

Because the SDK runs in your process, you own the runtime: scaling, sandboxing, session storage, secrets, and monitoring. In exchange you get full control over each of those, and model calls can be pointed at any Anthropic-compatible endpoint, including a gateway. The Bifrost CLI for coding agents uses the same environment variables. Teams running Claude Code at scale will recognize the same patterns from Claude Code governance with an AI gateway.

Figure 1 shows the difference in who runs the loop.

The Agent SDK runs the loop and tools in your process and calls the Claude API; with Managed Agents your app sends events and Anthropic runs the loop

The Agent SDK runs the loop and tools in your process and calls the Claude API; with Managed Agents your app sends events and Anthropic runs the loop

Figure 1: The Agent SDK runs the loop and tools inside your process; Claude Managed Agents runs them as a hosted service, with your app sending events to a session.

Claude Managed Agents vs Agent SDK Compared

Claude Managed Agents and the Agent SDK share an agent engine but differ in hosting, state, data handling, and how much of the runtime you control. The table compares them on the dimensions that usually decide the choice for enterprise teams.

Dimension Claude Managed Agents Claude Agent SDK
What it is Hosted agent runtime (APIs) Library you embed (Python, TypeScript)
Status Public beta since April 2026 Generally available; renamed September 2025
Who runs the loop Anthropic Your code
Sandbox Anthropic cloud sandbox or self-hosted sandbox Whatever environment you run it in
State Sessions stored server-side, resumable Sessions managed by your application
Built-in tools Bash, file operations, web search and fetch, MCP File operations, commands, web search, MCP
Extensibility Skills, MCP servers, vaults, multi-agent Hooks, permissions, subagents, skills, plugins, MCP
Zero data retention Not eligible (except self-hosted service) Depends on your API arrangement
HIPAA Not eligible Depends on your API arrangement
Model endpoint Anthropic-managed Any Anthropic-compatible endpoint, including a gateway

The data-handling rows are often decisive. Hosted sessions persist transcripts, sandbox state, and outputs until you delete them, which suits long-running work but rules out zero data retention. Teams with strict requirements can run sandboxes or the whole Managed Agents service on their own infrastructure, or use the Agent SDK. The agent observability guide covers what to monitor either way.

When to Use Claude Managed Agents

Use Managed Agents when the main obstacle is infrastructure: sandboxes, session persistence, tool runtimes, and long-running execution. It suits teams that want to ship agent features quickly, run tasks that take minutes or hours, and let Anthropic handle isolation and scaling.

Good fits:

  • Asynchronous tasks such as research, report generation, and data processing that run long after the user leaves.
  • Product features where each customer task gets an isolated session and sandbox.
  • Prototypes that need a working agent runtime without a platform team.
  • Multi-agent workflows where an orchestrator delegates work to specialized agents.

Trade-offs to plan for:

  • Beta status means behavior can change between releases.
  • Data handling limits apply: hosted sessions are stored server-side and are not ZDR- or HIPAA-eligible.
  • Model scope is Anthropic's Claude models through Anthropic-operated platforms.
  • Visibility lives in Anthropic's console unless you export events into your own systems.

For tool access, Managed Agents agents connect to remote MCP servers, which is where an MCP gateway can apply organization-wide tool policy.

When to Use the Claude Agent SDK

Use the Claude Agent SDK when agents need to live inside your own systems, when data must stay within your infrastructure, or when you need control the hosted service does not offer: custom hooks, approval flows, CI integration, or routing across providers. The trade-off is that you operate the runtime.

Good fits:

  • CI and developer automation such as code review, test repair, and migration agents running in pipelines.
  • Regulated workloads where prompts, files, and outputs must stay inside a VPC or on-premises.
  • Embedded agents in existing services that already handle auth, storage, and scaling.
  • Multi-provider setups that route Claude through Anthropic, Amazon Bedrock, or Google Vertex AI, with failover between them.

Trade-offs to plan for:

  • Operations: you run sandboxes, session storage, scaling, and secret management.
  • Consistency: each service configures its own keys, limits, and tools unless something central enforces them.
  • Visibility: usage is spread across services unless model and tool calls go through one control point.

Those last two points are where a gateway matters. The OpenAI Agents SDK with an AI gateway guide shows the same pattern for another framework.

Governing Agent SDK Traffic with Bifrost

Agent SDK services can send every model call and MCP tool call through Bifrost. Set ANTHROPIC_BASE_URL to the Bifrost Anthropic-compatible endpoint and use a Bifrost virtual key as the token; point MCP connections at the Bifrost MCP endpoint. Every service then shares one set of policies, budgets, and logs.

A minimal environment for an Agent SDK service, following the Claude Code integration guide, since the SDK runs the Claude Code binary:

export ANTHROPIC_BASE_URL=https://bifrost.example.com/anthropic
export ANTHROPIC_AUTH_TOKEN=sk-bf-your-virtual-key

Figure 2 shows the resulting flow.

Agent SDK services send model calls to the Bifrost Anthropic endpoint and tool calls to the Bifrost MCP endpoint, which route to Claude providers and approved tools

Agent SDK services send model calls to the Bifrost Anthropic endpoint and tool calls to the Bifrost MCP endpoint, which route to Claude providers and approved tools

Figure 2: Setting ANTHROPIC_BASE_URL and an MCP endpoint sends every model and tool call from Agent SDK services through one governed gateway.

What the gateway adds for model traffic:

  • Virtual keys per service or team. Virtual keys control which models each agent can use and keep provider credentials off application hosts.
  • Budgets and rate limits. Budgets and limits cap spend and tokens per key, team, or customer, so a runaway agent loop stops at a known ceiling.
  • Failover across Claude providers. Retries and fallbacks move requests to another configured provider when one returns errors or rate limits.

What it adds for tools and visibility:

  • Tool filtering. MCP tool filtering restricts which tools each key can call, independent of what the agent's code requests.
  • Request logs. Every model and tool call is logged with tokens, cost, and latency in Bifrost request logs, and Claude Code session headers can group requests into one trace.
  • Data handling. Bifrost runs self-hosted, in-VPC, or air-gapped, with SOC 2 Type II, ISO 27001, HIPAA, and GDPR coverage, adding about 11 microseconds of overhead per request at 5,000 requests per second.

Connecting Managed Agents to Governed Tools

Managed Agents runs model calls on Anthropic's side, so a gateway does not sit in that path. Tool access is different: Managed Agents agents connect to MCP servers, and those connections can target a Bifrost MCP endpoint, so the same tool filtering, guardrails, and logging apply to hosted agents and in-house agents alike.

How the pieces fit:

  • One tool catalog. Register internal and third-party MCP servers in Bifrost once, and expose curated sets through virtual MCPs.
  • Per-agent scope. Give each Managed Agents agent a virtual key whose tool filter allows only what it needs, stored as a credential for that MCP connection.
  • Guardrails on tool traffic. Inspect tool arguments and results with the same rules used for other agents, as described in MCP guardrails in Bifrost.
  • Agent-to-agent calls. For agents that call other agents, the Agent Gateway governs A2A traffic separately from model and tool access.

The Bifrost endpoint must be reachable from Anthropic's infrastructure for hosted sessions, or from your own network when using self-hosted sandboxes. The announcement of Agent Gateway in Bifrost explains how models, tools, and agents share one control plane.

How to Choose Between Them

Choose by your main constraint: operational capacity, data handling, or runtime control. Teams without a platform function and with long-running, asynchronous tasks get the most from Claude Managed Agents. Teams with strict data requirements, CI-heavy workflows, or multi-provider needs get more from the Agent SDK behind a gateway.

Figure 3 summarizes the decision.

Decision flow: long-running async tasks without infrastructure point to Managed Agents, while data residency, custom runtime, or multi-provider needs point to the Agent SDK

Decision flow: long-running async tasks without infrastructure point to Managed Agents, while data residency, custom runtime, or multi-provider needs point to the Agent SDK

Figure 3: Hosted, long-running work favors Managed Agents; strict data handling, custom runtimes, and provider choice favor the Agent SDK behind a gateway.

If your priority is Lean toward Why
No infrastructure to run Claude Managed Agents Anthropic operates sandboxes, sessions, and tools
Long-running asynchronous tasks Claude Managed Agents Stateful sessions resume after pauses
Zero data retention or HIPAA Agent SDK, or self-hosted Managed Agents Hosted sessions are not eligible
CI and developer automation Agent SDK Runs inside pipelines and existing services
Multi-provider routing and failover Agent SDK with Bifrost Model calls can go through a gateway
One tool policy across all agents Either, with Bifrost MCP Tool calls can target one governed endpoint

Many organizations use both, often standardizing on one LLM gateway for whatever runs in-house: Managed Agents for product features that benefit from hosted sessions, and the Agent SDK for internal automation. Platform teams can read governing AI coding agents at scale and Claude Code monitoring for rollout patterns.

Frequently Asked Questions

What are Claude Managed Agents?

Claude Managed Agents is a set of Anthropic APIs, in public beta since April 8, 2026, that run Claude as an autonomous agent on managed infrastructure. You define an agent (model, prompt, tools, MCP servers, skills) and an environment, start sessions, and exchange events, while Anthropic runs the loop, tools, and sandbox.

What is the difference between Claude Managed Agents and the Agent SDK?

Managed Agents is a hosted service where Anthropic operates the agent runtime and sandbox. The Agent SDK is a Python and TypeScript library that runs the agent loop in your own process and infrastructure. Managed Agents removes operational work; the Agent SDK gives full control over runtime, data handling, and model routing through options such as the Bifrost Anthropic-compatible endpoint.

Is Claude Managed Agents generally available?

As of November 2026, Claude Managed Agents is in public beta and requires the managed-agents-2026-04-01 beta header, which Anthropic's SDK sets automatically. Some related features, such as MCP tunnels, are in limited research preview and require separate access. Check Anthropic's documentation for current status.

Can Claude Managed Agents run on my own infrastructure?

Partly. Environments can use self-hosted sandboxes so execution happens on infrastructure you control, and Anthropic also documents self-hosted Managed Agents for running the whole service on your own Kubernetes. Self-hosting the service is the only Managed Agents option eligible for zero data retention.

Can the Claude Agent SDK use an AI gateway?

Yes. The Agent SDK runs the Claude Code binary, which honors ANTHROPIC_BASE_URL. Pointing it at a gateway such as Bifrost with a virtual key adds budgets, rate limits, failover, and request logging to every model call, as described in the Claude Code and Bifrost guide.

How do I govern tools for both Managed Agents and the Agent SDK?

Register tools in one MCP gateway and point both kinds of agents at it. Agent SDK services connect directly; Managed Agents agents connect through their MCP server configuration. Bifrost then applies the same tool filtering, guardrails, and logging to every tool call; see enterprise MCP governance.

Run Agents Your Way, Govern Them in One Place

Claude Managed Agents and the Agent SDK answer the same question differently: who operates the runtime. Whichever you choose, model and tool traffic still needs keys, budgets, tool policy, and an audit trail across every agent. Bifrost provides that control plane for models, MCP tools, and agents. To see it with your agent stack, book a demo with the Bifrost team.