> ## Documentation Index
> Fetch the complete documentation index at: https://docs.browserbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Anthropic Managed Agents

> Run Claude agents in Anthropic's managed runtime and give them a Browserbase session to drive the web.

**Managed Agents** is Anthropic's hosted runtime for Claude. Anthropic provisions the container, the tool harness, and the agent loop — you supply a system prompt, a toolset, and start a session. Pair a Managed Agent with a Browserbase session and Claude can navigate, click, and extract data on the open web without you hosting a browser fleet.

This integration connects the two surfaces:

* **Managed Agents** runs Claude in an Anthropic-managed sandbox with `bash`, file tools, and any custom tools you declare.
* **Browserbase** provides the isolated Chromium session the agent connects to over CDP, plus [Live View](/platform/browser/observability/session-live-view), [session recordings](/platform/browser/observability/session-recording), and [Agent Identity](/platform/identity/overview).

<Info>
  Managed Agents is in beta. All requests use the `managed-agents-2026-04-01` beta header — the Anthropic SDKs set it automatically. See [Anthropic's docs](https://docs.claude.com/en/docs/managed-agents/overview) for current status.
</Info>

## Why pair them

Claude needs two things to browse the web reliably: a durable runtime to hold the loop, and a real browser to drive the page. Running either one yourself is painful.

* **Anthropic owns the runtime.** No Lambda cold starts, no container orchestration, no token streaming plumbing. Start a session and Anthropic runs the agent loop to completion.
* **Browserbase owns the browser.** No Chromium pinning, no fingerprint maintenance, no crashed-session cleanup. Every run gets a fresh, isolated sandbox with observability baked in.
* **The split keeps state clean.** Managed Agents holds the conversation and tool outputs. Browserbase holds the page, cookies, and downloads. You can inspect either side independently.

For the tradeoff against self-hosted Chromium, see [Managed vs self-hosted](/platform/browser/getting-started/remote-browser-versus-local-browser).

## Core concepts

Managed Agents is built around four primitives. You'll see them throughout this integration.

| Concept         | Description                                                                                   |
| --------------- | --------------------------------------------------------------------------------------------- |
| **Agent**       | The model, system prompt, tools, MCP servers, and skills. Created once and referenced by ID.  |
| **Environment** | A configured container template — pre-installed packages, mounted files, network rules.       |
| **Session**     | A running agent instance inside an environment, performing a task and producing events.       |
| **Events**      | Messages exchanged between your app and the agent — user turns, tool results, status updates. |

## How it works

<Steps>
  <Step title="Create the agent and environment">
    You call `client.beta.agents.create(...)` and `client.beta.environments.create(...)` once to register the system prompt, toolset, and packages Claude will have available. Anthropic returns an `agent.id` and `environment.id` you reuse across sessions.
  </Step>

  <Step title="Start a session">
    For each user request, you call `client.beta.sessions.create(...)` with the agent and environment IDs. Anthropic provisions the sandbox, installs the declared packages, and gets ready to run the loop.
  </Step>

  <Step title="Send a message and stream events">
    Open an SSE stream against the session and send a `user.message` event. Claude starts working — emitting `agent.message`, `agent.tool_use`, and tool-result events back over the stream until it goes idle.
  </Step>

  <Step title="Claude creates a Browserbase session">
    Inside the sandbox, Claude creates a Browserbase session — either with `curl` directly against the Browserbase REST API or with `bb sessions create` from the [Browserbase CLI](/integrations/skills/browserbase-cli). Both return a `connectUrl` and a `sessionId`.
  </Step>

  <Step title="Claude drives the browser">
    Claude issues `browse` commands against the session — `open`, `screenshot`, `snapshot`, `click`, `type` — over CDP. You watch progress in [Live View](/platform/browser/observability/session-live-view) or surface events back to your own UI through the session event stream.
  </Step>

  <Step title="Claude returns the result">
    When the agent goes idle, the session emits a `session.status_idle` event and Anthropic stops billing for compute. You end the Browserbase session (or let it time out) and surface the answer to the user.
  </Step>
</Steps>

## What the stack looks like

| Layer                                                                                | Owner                               | Role                                                   |
| ------------------------------------------------------------------------------------ | ----------------------------------- | ------------------------------------------------------ |
| Agent loop, tool execution, conversation state                                       | Anthropic Managed Agents            | Runs Claude to completion in a sandbox                 |
| `bash`, file tools, web search, custom tools                                         | Anthropic Managed Agents            | Built-in toolset, plus any custom tool you declare     |
| [`browse` CLI](https://www.npmjs.com/package/@browserbasehq/browse-cli) or Stagehand | Your code (runs inside the sandbox) | Translates Claude's intent into CDP actions            |
| Chromium session, Live View, recordings                                              | Browserbase                         | Isolated browser with observability and Agent Identity |

## When to use this

Use Managed Agents with Browserbase when:

* You want Claude to browse the web but don't want to host the agent loop yourself.
* You need persistent conversation state across many tool calls (Slack bots, long research tasks, queued jobs).
* You want Anthropic-side tool-use traces for debugging alongside Browserbase [session recordings](/platform/browser/observability/session-recording).
* You're building a chat surface (Slack, Discord, a web app) where each thread is a long-running agent session with steering.
* You're already building a general-purpose Managed Agent and want to add web browsing as another capability alongside its existing tools.

Use a lighter setup — Stagehand or direct Messages API calls — when the task is one-shot, latency-sensitive, or you need full control over every tool call.

## Getting started

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/integrations/anthropic/managed-agents/quickstart">
    Create a Managed Agent, start a session, and drive a Browserbase session end to end.
  </Card>

  <Card title="Browse CLI" icon="terminal" href="https://www.npmjs.com/package/@browserbasehq/browse-cli">
    The lightweight entry point Claude uses inside the sandbox to control Browserbase.
  </Card>
</CardGroup>

## Further reading

<CardGroup cols={3}>
  <Card title="Managed vs self-hosted" icon="scale-balanced" href="/platform/browser/getting-started/remote-browser-versus-local-browser">
    Why managed Browserbase sessions beat self-hosted Chromium in production.
  </Card>

  <Card title="Session Live View" icon="eye" href="/platform/browser/observability/session-live-view">
    Watch a Managed Agent drive a browser in real time.
  </Card>

  <Card title="Agent Identity" icon="shield-check" href="/platform/identity/overview">
    Verified browsers, proxies, and authentication for agents on the open web.
  </Card>
</CardGroup>
