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

# Browser Agent Protocol

> The fastest browser automation protocol for AI agents. Semantic selectors, fused operations, and zero-config browser control over JSON-RPC 2.0.

<Note>
  BAP is an open standard for AI agents to control web browsers. It works with any AI agent — Claude
  Code, Codex, Cursor, Gemini CLI, and more.
</Note>

## Why BAP

<CardGroup cols={3}>
  <Card title="Fewer Calls" icon="bolt">
    Fused operations combine navigate + observe, act + observe, and multi-step composite actions into single roundtrips. **37% fewer tool calls** than Playwright.
  </Card>

  <Card title="Smarter Selectors" icon="crosshairs">
    10 selector types including `role:button:"Submit"`, `label:"Email"`, and `text:"Sign in"`. Resilient to layout changes, no brittle CSS paths.
  </Card>

  <Card title="Zero Config" icon="wand-magic-sparkles">
    Auto-discovers Chrome, launches a persistent daemon, and keeps sessions warm across commands. `bap goto <url>` just works.
  </Card>
</CardGroup>

## Quick Install

```bash theme={null}
npm i -g @browseragentprotocol/cli
bap goto https://example.com --observe
```

Or run without installing:

```bash theme={null}
npx @browseragentprotocol/cli goto https://example.com --observe
```

## Choose Your Path

<CardGroup cols={2}>
  <Card title="CLI" icon="terminal" href="/getting-started/cli">
    Best for AI coding agents with shell access. Install globally and run `bap` commands.
  </Card>

  <Card title="MCP" icon="plug" href="/getting-started/mcp">
    Best for Claude, Codex, Cursor, and other MCP-native AI agents. Add BAP as an MCP server.
  </Card>

  <Card title="TypeScript SDK" icon="js" href="/getting-started/typescript-sdk">
    Best for custom apps and agent backends. Full programmatic control.
  </Card>

  <Card title="Python SDK" icon="python" href="/getting-started/python-sdk">
    Best for notebooks and Python agents. Mirrors the TypeScript API.
  </Card>
</CardGroup>

## Benchmarks

| Scenario  | BAP Standard | BAP Fused | Playwright | Fused vs PW |
| --------- | :----------: | :-------: | :--------: | :---------: |
| baseline  |       2      |     2     |      2     |     Tie     |
| observe   |       2      |     1     |      2     |     -50%    |
| form      |       4      |     3     |      5     |     -40%    |
| ecommerce |       8      |     5     |     11     |     -55%    |
| workflow  |       5      |     4     |      5     |     -20%    |
| **Total** |    **23**    |   **17**  |   **27**   |  **\~37%**  |

<Tip>
  See the full [benchmark methodology](/comparisons/benchmarks) for details on how these numbers
  were measured.
</Tip>
