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

> ## Agent Instructions
> Anchor Browser is cloud browser infrastructure for AI agents and automation: browser sessions you control over CDP or REST, natural-language web tasks, versioned automation tasks, managed authentication into third-party web apps (identities with MFA), persistent volumes and profiles, recordings, live view, batch sessions, webhooks, and network options including residential proxies, extra stealth, and captcha solving for sites that block standard browsers. The for-agents page (https://docs.anchorbrowser.io/for-agents) covers authentication and the first API calls. API keys are created at https://app.anchorbrowser.io/api-keys. Append .md to any page URL for its Markdown version. The SDKs read the API key from ANCHORBROWSER_API_KEY, and REST calls send it in the anchor-api-key header. End every session you create with DELETE /v1/sessions/{id}, because a session is billed until it ends. Location targeting, captcha solving and managed authentication need the Starter plan, and extra stealth needs the Growth plan; on the Free plan, create a session with an empty body. Plans and limits are at https://docs.anchorbrowser.io/pricing. The hosted MCP server is https://api.anchorbrowser.io/v1/mcp.

# Add a Browser to Your Agent Platform

> Give your AI agents cloud browsers they can open on demand — via SDK, MCP, or REST — when they need to navigate, click, or extract data.

Give your AI agents a real browser in the cloud. Instead of scraping brittle HTML or wiring up per-site APIs, your agents open an Anchor session on demand and drive it like a human would — navigate, authenticate, click, fill forms, and extract structured data.

This guide walks you through connecting Anchor to your agent platform step by step, and links to the reference pages for each integration path.

Anchor is infrastructure, not an agent framework. Your agent decides what to do. Anchor supplies the browser, the network, the logins and a recording of what happened.

## The shortest path

One call runs a task in a new cloud browser and returns JSON in the shape you ask for:

```bash theme={null}
curl -X POST https://api.anchorbrowser.io/v1/tools/perform-web-task \
  -H "anchor-api-key: $ANCHORBROWSER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Return the title of the top story",
    "url": "https://news.ycombinator.com",
    "output_schema": {
      "type": "object",
      "properties": { "title": { "type": "string" } },
      "required": ["title"]
    }
  }'
```

If you use a coding agent, the **Copy prompt** button on the [docs home page](https://docs.anchorbrowser.io/introduction.md) gives it a setup prompt for your project.

## Choose an integration path

| Path | Best for |
| - | - |
| [**SDK / CDP**](#step-1-provision-a-browser-your-agent-can-drive) | Full control from your own code (Playwright, Puppeteer) |
| [**MCP**](#option-b-expose-anchor-through-mcp) | Model-native tool use in Claude Code, Cursor, Codex, VS Code, ChatGPT, Grok and other MCP clients |
| [**Agent frameworks**](#step-3-wire-it-into-your-agent-framework) | Drop-in tools for CrewAI, LangChain, or a custom framework |

## Step 1: Provision a browser your agent can drive

**1. Get your API key**

Create an API key in the [Anchor dashboard](https://app.anchorbrowser.io/api-keys). Store it as `ANCHORBROWSER_API_KEY` in your environment.

**2. Install the SDK**

Install the official Node.js or Python client and confirm it can reach Anchor. See [Use via SDK](https://docs.anchorbrowser.io/quickstart/use-via-sdk.md).

**3. Create a session on demand**

When your agent needs a browser, create a session and connect over CDP with Playwright or Puppeteer. See [Create a Session](https://docs.anchorbrowser.io/quickstart/create-session.md) for the full connection flow.

## Step 2: Give the agent control primitives

Once connected, your agent needs a small, reliable set of actions it can call.

* **Navigate and interact** — drive the page programmatically. See [Control a Session](https://docs.anchorbrowser.io/essentials/control-a-session.md).
* **Extract data** — get the rendered HTML of any URL in one call with [Web Unlocker](https://docs.anchorbrowser.io/advanced/web-unlocker.md), or ask for structured JSON with a [web task](https://docs.anchorbrowser.io/agentic-browser-control/ai-task-completion.md) and an `output_schema`.
* **OS-level control** — when a task needs mouse, keyboard, or clipboard beyond the DOM, use [OS-Level Control](https://docs.anchorbrowser.io/advanced/os-level-control.md).

## Step 3: Wire it into your agent framework

Pick the path that matches how your agents are built.

### Option A: Use the framework integrations

> [card] [Connect Agents to Browsers](https://docs.anchorbrowser.io/agent-frameworks/connect-to-agent-frameworks)
>
> The integration overview — flexible tool, specific-flow tools, or Anchor-defined tasks.

> [card] [CrewAI](https://docs.anchorbrowser.io/agent-frameworks/crewai.md)
>
> Add Anchor as a browsing tool your CrewAI agents can call.

> [card] [LangChain](https://docs.anchorbrowser.io/agent-frameworks/langchain.md)
>
> Drive Anchor sessions from LangChain agents and chains.

> [card] [Custom Framework](https://docs.anchorbrowser.io/agent-frameworks/custom-agent-framework.md)
>
> Integrate Anchor into your own agent runtime.

### Option B: Expose Anchor through MCP

If your agent speaks the Model Context Protocol, connect Anchor as an MCP server and let the model open and drive browsers as a native tool. There are three hosted servers on one account:

* `https://api.anchorbrowser.io/v1/mcp`: web tasks, managed logins, saved automations and browser sessions. Start here.
* `https://api.anchorbrowser.io/v1/mcp/browser`: step-by-step control of a live browser.
* `https://api.anchorbrowser.io/v1/mcp/actions`: verified actions for known sites that run as code, with no model steps.

Plugins are available for Claude Code, Cursor, Grok, Antigravity and Hermes.

> [card] [MCP Server](https://docs.anchorbrowser.io/advanced/mcp.md)
>
> Setup for each client, the tool list, and the plugin install commands.

> [card] [Open Source MCP](https://docs.anchorbrowser.io/advanced/mcp-open-source.md)
>
> Self-host the Anchor MCP server.

### Option C: Deploy an existing open-source agent

Already using Browser Use or Stagehand? Point them at Anchor.

> [card] [Browser Use](https://docs.anchorbrowser.io/integrations/browseruse-deployment.md)
>
> Run Browser Use agents on Anchor's managed browsers.

> [card] [Stagehand](https://docs.anchorbrowser.io/integrations/stagehand.md)
>
> Use Anchor as the browser backend for Stagehand.

### Option D: Run the agent code in a sandbox

Keep your agent's code in a sandbox and the browser in Anchor. See [Sandboxes](https://docs.anchorbrowser.io/integrations/sandboxes.md) for E2B, Daytona, CreateOS and Tenki.

### Option E: Use a computer-use model

Drive the session with a computer-use agent from OpenAI, Anthropic or Gemini, or with Jev, Anchor's own browser agent. See [Jev](https://docs.anchorbrowser.io/agentic-browser-control/computer-use-agents/jev.md) and the other pages in that group.

## Step 4: Handle logins and stay undetected

Production agents hit sites that require auth and block bots. Anchor handles both.

* **Managed authentication** — an [identity](https://docs.anchorbrowser.io/essentials/authenticated-applications.md) is a managed login for one site. Anchor signs in and handles MFA, and the agent never sees the password. Starter plan and above.
* **Stay undetected** — start with a default session and add a proxy, captcha solving, extra stealth or Mac hardware only when a site needs it. [Overcome Bot Detection](https://docs.anchorbrowser.io/use-cases/bot-detection.md) has the settings for each step and what each plan includes.

## Step 5: Know what the agent did

An agent can say that it finished when it did not. Check the result, not the claim.

* **Check the status.** A task result has a `status`. Treat anything other than `success` as a failure.
* **Ask for a shape.** Pass an `output_schema` and validate what comes back.
* **Watch or replay.** Every session has a `live_view_url`, and [recording](https://docs.anchorbrowser.io/essentials/recording.md) is on by default.
* **Let a person step in.** [Human in the loop](https://docs.anchorbrowser.io/agentic-browser-control/human-in-the-loop.md) lets a user take over a step that the agent should not do alone.
* **End the session.** Call `DELETE /v1/sessions/{id}` when the work is done. A session is billed until it ends.

## Next steps

> [card] [Create a Session](https://docs.anchorbrowser.io/quickstart/create-session.md)
>
> Launch your first cloud browser and connect over CDP.

> [card] [Connect Agents to Browsers](https://docs.anchorbrowser.io/agent-frameworks/connect-to-agent-frameworks)
>
> Full integration overview for agent frameworks.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.