# BAP Docs ## Docs - [Python SDK](https://piyushvyas.mintlify.app/api/python.md): Python client for BAP with async/sync APIs, semantic selectors, and Pydantic models. - [Shared Types](https://piyushvyas.mintlify.app/api/types.md): Core type definitions shared across BAP SDKs: selectors, interactive elements, execution steps, and results. - [TypeScript SDK](https://piyushvyas.mintlify.app/api/typescript.md): BAPClient API reference for connecting to BAP servers, controlling browsers, and building agent workflows. - [Action Commands](https://piyushvyas.mintlify.app/cli/actions.md): Interact with page elements: click, fill, type, press, select, check, uncheck, hover, and scroll. - [Composite Actions](https://piyushvyas.mintlify.app/cli/composite-actions.md): Execute multiple browser steps in a single command with bap act. Fewer commands, fewer tokens, fewer roundtrips. - [Configuration](https://piyushvyas.mintlify.app/cli/configuration.md): Configure BAP CLI defaults, install skills to AI agents, and set global options. - [Navigation](https://piyushvyas.mintlify.app/cli/navigation.md): Browser lifecycle and navigation commands: open, goto, back, forward, reload, close, close-all. - [Observation](https://piyushvyas.mintlify.app/cli/observation.md): Observe page elements with smart filtering, incremental diffs, response tiers, and accessibility snapshots. - [CLI Overview](https://piyushvyas.mintlify.app/cli/overview.md): CLI-first browser automation for AI coding agents. Like playwright-cli but with composite actions, semantic selectors, and structured extraction. - [bap plan](https://piyushvyas.mintlify.app/cli/plan.md): Goal-based action suggestions. Observe the page and get recommended next steps for achieving a goal. - [Recipes](https://piyushvyas.mintlify.app/cli/recipes.md): Pre-built recipe commands for common browser tasks: login, fill-form, and wait-for. - [bap run](https://piyushvyas.mintlify.app/cli/run.md): Optimized workflow execution with compilation into fused batches and action cache warming. - [Sessions, Tabs & Frames](https://piyushvyas.mintlify.app/cli/sessions-tabs.md): Manage browser sessions, tabs, and frames. Named sessions persist across CLI invocations. - [Tracing](https://piyushvyas.mintlify.app/cli/tracing.md): View, filter, replay, and export session traces for debugging and analysis. - [bap watch](https://piyushvyas.mintlify.app/cli/watch.md): Stream live browser events to the terminal. Monitor console errors, network failures, dialogs, and downloads in real time. - [Workflows](https://piyushvyas.mintlify.app/cli/workflows.md): Record, replay, and manage deterministic browser workflows. Capture a sequence of BAP commands and replay them with parameter substitution. - [Benchmarks](https://piyushvyas.mintlify.app/comparisons/benchmarks.md): Full methodology, 6 scenarios, 3 variants, and fair disclaimers for BAP vs Playwright tool call benchmarks. - [BAP vs Chrome DevTools Protocol](https://piyushvyas.mintlify.app/comparisons/vs-cdp.md): BAP wraps CDP with agent-ready semantics. When to use raw CDP vs the BAP abstraction. - [BAP vs Playwright](https://piyushvyas.mintlify.app/comparisons/vs-playwright.md): Feature matrix and benchmark comparison between BAP and Playwright MCP/CLI for AI agent browser automation. - [BAP vs WebMCP](https://piyushvyas.mintlify.app/comparisons/vs-webmcp.md): Universal browser automation vs cooperative website tools -- complementary technologies for AI agents. - [Action Cache](https://piyushvyas.mintlify.app/concepts/action-cache.md): File-system LRU cache for instant selector resolution on repeat workflows - [Element Identity](https://piyushvyas.mintlify.app/concepts/element-identity.md): Stable refs, identity signals, and the PageElementRegistry - [Fusion Operations](https://piyushvyas.mintlify.app/concepts/fusion.md): Eliminate redundant roundtrips by combining multiple operations into single server calls - [Selectors](https://piyushvyas.mintlify.app/concepts/selectors.md): 10 selector types for targeting elements by purpose, not position - [Sessions](https://piyushvyas.mintlify.app/concepts/sessions.md): Persistent browser sessions that survive across CLI invocations - [Stealth Mode](https://piyushvyas.mintlify.app/concepts/stealth.md): Reduce bot detection fingerprint and connect to existing Chrome instances - [Workflow Fusion](https://piyushvyas.mintlify.app/concepts/workflow-fusion.md): Compiler-optimized workflow execution with batching, dry-run, and cache warming - [Workflows](https://piyushvyas.mintlify.app/concepts/workflows.md): Record, parameterize, and replay deterministic browser workflows as YAML - [CLI Quickstart](https://piyushvyas.mintlify.app/getting-started/cli.md): Install the BAP CLI and run your first browser commands - [MCP Setup](https://piyushvyas.mintlify.app/getting-started/mcp.md): Add BAP as an MCP server for Claude Code, Codex, Cursor, and other MCP clients - [Overview](https://piyushvyas.mintlify.app/getting-started/overview.md): Four ways to integrate BAP into your AI agent workflow - [Python SDK](https://piyushvyas.mintlify.app/getting-started/python-sdk.md): Control browsers from Python with async and sync APIs - [TypeScript SDK](https://piyushvyas.mintlify.app/getting-started/typescript-sdk.md): Programmatic browser control with the BAP TypeScript client - [Agent Integration](https://piyushvyas.mintlify.app/guides/agent-integration.md): Build AI agent loops with observe-decide-act, fusion operations, session persistence, and token efficiency. - [Form Automation](https://piyushvyas.mintlify.app/guides/form-automation.md): Automate login flows, multi-step forms, and complex inputs using bap act composite actions. - [Multi-Tab Workflows](https://piyushvyas.mintlify.app/guides/multi-tab.md): Manage multiple browser tabs with tab-new, tab-select, and cross-tab patterns. - [Data Extraction & Scraping](https://piyushvyas.mintlify.app/guides/scraping.md): Extract structured data from web pages using bap extract with JSON Schema, field hints, and pagination. - [Stealth Mode](https://piyushvyas.mintlify.app/guides/stealth-mode.md): Three-tier stealth configuration to avoid bot detection when automating browsers. - [Testing & CI](https://piyushvyas.mintlify.app/guides/testing.md): Use BAP workflows for deterministic browser assertions in CI pipelines with bap run. - [WebMCP Discovery](https://piyushvyas.mintlify.app/guides/webmcp.md): Discover and use website-exposed tools via the W3C WebMCP standard through BAP's built-in bridge. - [Browser Agent Protocol](https://piyushvyas.mintlify.app/introduction.md): The fastest browser automation protocol for AI agents. Semantic selectors, fused operations, and zero-config browser control over JSON-RPC 2.0. - [In-Process Mode](https://piyushvyas.mintlify.app/mcp/in-process.md): Run the Playwright server in the same process as the MCP server for zero-overhead communication. - [MCP Overview](https://piyushvyas.mintlify.app/mcp/overview.md): MCP server for Browser Agent Protocol. Gives any MCP-compatible AI agent full browser control. - [Agent Setup](https://piyushvyas.mintlify.app/mcp/setup.md): Configure BAP MCP server for Claude Code, Codex CLI, Cursor, Claude Desktop, and other AI agents. - [Slim Mode](https://piyushvyas.mintlify.app/mcp/slim-mode.md): Expose only 5 essential MCP tools to reduce token overhead from ~4,200 to ~600 tokens. - [MCP Tools Reference](https://piyushvyas.mintlify.app/mcp/tools.md): Complete reference for all 23+ MCP tools exposed by the BAP MCP server. - [Error Codes](https://piyushvyas.mintlify.app/protocol/error-codes.md): Complete reference for BAP error codes, recovery hints, and retry behavior. - [Events](https://piyushvyas.mintlify.app/protocol/events.md): Server-pushed notifications for console messages, network activity, dialogs, and page lifecycle. - [Methods](https://piyushvyas.mintlify.app/protocol/methods.md): Complete reference for all 55 BAP protocol methods organized by category. - [Protocol Overview](https://piyushvyas.mintlify.app/protocol/overview.md): BAP uses JSON-RPC 2.0 over WebSocket to give AI agents structured browser control. - [Selectors](https://piyushvyas.mintlify.app/protocol/selectors.md): 10 protocol selector types for targeting elements by semantic meaning, accessibility attributes, or DOM position. - [Transport](https://piyushvyas.mintlify.app/protocol/transport.md): WebSocket configuration, message format, authentication, and security for BAP connections. ## OpenAPI Specs - [openapi](https://piyushvyas.mintlify.app/api-reference/openapi.json) ## Optional - [GitHub](https://github.com/browseragentprotocol/bap)