Skip to main content
BAP (Browser Agent Protocol) gives your AI agent a real browser — fast, semantic, and reliable. It keeps a browser session warm, observes pages in an AI-friendly way, and lets agents act with semantic selectors and fused operations instead of brittle CSS and endless roundtrips.

Integration Paths

CLI + SKILL.md

Best for coding agents with shell access. Install globally, run bap install-skill, and your agent learns browser commands automatically. bash npm i -g @browseragentprotocol/cli

MCP Server

Best for tool-native MCP clients like Claude Code, Codex, and Cursor. Zero config — just add the MCP server. bash npx -y @browseragentprotocol/mcp

TypeScript SDK

Best for apps and agent backends. Full programmatic control with semantic selector helpers. bash npm i @browseragentprotocol/client

Python SDK

Best for notebooks, Python agents, and data pipelines. Async and sync APIs available. bash pip install browser-agent-protocol

Prerequisites

  • Node.js >= 20.0.0 (for CLI, MCP, and TypeScript SDK)
  • Python >= 3.10 (for Python SDK only)
  • Playwright browsers: Install with npx playwright install chromium
BAP defaults to your installed Chrome browser with a persistent session. No separate browser install is needed for most setups.

Architecture

All four integration paths talk to the same BAP Playwright server:
The server runs as a background daemon (CLI) or child process (MCP), keeping browser sessions warm across commands.

Why BAP

Quick Example

Next Steps

CLI Quickstart

Install and run your first commands

Selectors

Learn the 10 selector types

Fusion

Reduce roundtrips with fused operations

Workflows

Record and replay browser workflows