Skip to content
BENIBIX Learn

Claude Managed Agents

Development🧬 AI EngineeringLLM APIs

Also known as Managed Agents, Claude Managed Agents API, Anthropic Managed Agents

A Claude service that runs your agent for you. Its tools run in a sandbox.

Think of it like

It is like a helper who comes with a desk and tools. You just say what job to do.

Example

Emma's team makes one agent that fixes failing tests. Each night a session copies the code into a cloud sandbox, runs the tests and streams back what it changed.

Why it matters

You skip building the agent loop, the sandbox and the tool runner yourself. Long jobs can run for minutes or hours and pick up again after a pause.

Definition

Claude Managed Agents is a part of the Claude API that runs a whole agent for you. You set up an agent once, with a model, a system prompt and its tools. Then you pick an environment, which is a cloud sandbox or one on your own servers. Each job runs as a session, and you talk to it by sending events and reading a stream back. Claude runs commands, edits files and searches the web inside that sandbox. It is in beta, so each call needs the managed-agents-2026-04-01 beta header.

Example code

python
session = client.beta.sessions.create(
    agent=agent.id,
    environment_id=environment.id,
    title="Nightly test fix",
)
A session joins one agent to one environment. Work starts when you send it an event.
An agent and an environment make a session. Events go in, and a stream comes back.

Common mistake

Sending it data that must not be kept. Sessions keep their history on the service until you delete them. So it is not zero data retention.

Key takeaways

  1. 1
    Agent, environment, session. Set up once, run many times.
  2. 2
    Events in, stream out. Steer it while it works.
  3. 3
    A beta header. Needed on every call for now.

Compare