Give your AI agent a real browser — fast, semantic, and reliable.
BAP 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.
CLI · MCP · Python · Docs · Apache-2.0
npm i -g @browseragentprotocol/cli
bap install-skillOr run bap demo for a guided walkthrough.
Then give your agent a task:
Use BAP to open https://piyushvyas.com, go to Writing, find the
"Introducing Browser Agent Protocol" post, and summarize it.
Start a fresh agent session after installing the skill so it picks up the BAP guidance.
| Real browser | Prefers installed Chrome, keeps session state warm, stays close to a normal user browser |
| Semantic selectors | role:button:"Submit" and label:"Email" instead of brittle CSS |
| Fewer roundtrips | goto --observe, act --observe, stable refs, and structured extraction |
| Warm daemon | Browser stays alive across commands — agents keep momentum |
| Token efficient | --slim mode exposes 5 tools (~600 tokens) vs 70+ in competitors (~4,200 tokens) |
| Multiple surfaces | CLI, MCP, TypeScript SDK, Python SDK — pick what fits your stack |
Navigate → click → browse: 3 commands, one workflow
Multi-site workflow: browse GitHub → open skills.menu → paste & score
# Navigate and observe the page
bap goto https://piyushvyas.com --observe
# Click through to a blog post
bap act click:text:"Writing" --observe
bap act click:text:"Introducing Browser Agent Protocol" --observe
# Scroll and extract
bap scroll down --pixels=5000
bap extract --fields="title,content"| Interface | Install | Best for |
|---|---|---|
| CLI + SKILL.md | npm i -g @browseragentprotocol/cli |
Coding agents with shell access |
| MCP | npx -y @browseragentprotocol/mcp |
Tool-native MCP clients |
| TypeScript SDK | npm i @browseragentprotocol/client |
Apps and agent backends |
| Python SDK | pip install browser-agent-protocol |
Notebooks and Python agents |
- BAP defaults to headful Chrome with a persistent session.
- Use
--headlessfor CI or background runs. - Use
--no-profileif your Chrome profile is busy. - Use
bap close-allto stop the daemon and all sessions.
- vs Playwright CLI — BAP is built for agent workflows, not human shell scripting.
- vs Playwright MCP — When shell access is available, BAP CLI solves the same job with fewer roundtrips. In MCP mode,
--slimcuts tool definitions to ~600 tokens vs ~4,200 for Playwright MCP's 70+ tools. - vs Chrome DevTools / CDP — CDP is the low-level transport; BAP is the agent layer on top.
Apache-2.0. See LICENSE for details.
