You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: rewrite README with benchmark data and clear positioning
Position BAP as the execution layer for browser agents:
- Lead with cost-per-action comparison (BAP vs Stagehand vs Browser Use)
- Show what the LLM sees (structured refs vs raw HTML)
- Include real benchmark numbers from browserbench
- Add "when to use what" decision table
- Highlight uSEID (self-healing) and DBAR (deterministic replay)
- Recommend BAP MCP in-process as the fastest interface
Key message: "You bring the LLM, BAP brings the browser."
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Give your AI agent a real browser — fast, semantic, and reliable.
3
+
The execution layer for browser agents. 10-25ms per action, zero token overhead, structured observations your LLM can actually use.
4
4
5
-
BAP keeps a browser session warm, observes pages in an AI-friendly way,
6
-
and lets agents act with semantic selectors and fused operations instead
7
-
of brittle CSS and endless roundtrips.
5
+
BAP sits between your AI agent and the browser. The agent decides *what* to do, BAP does it — instantly, reliably, with semantic selectors and session persistence.
8
6
9
7
<palign="center">
10
8
<imgsrc="./assets/demos/blog-reader.gif"alt="BAP navigating a website, clicking through pages, and scrolling through a blog post"width="960" />
@@ -20,6 +18,31 @@ of brittle CSS and endless roundtrips.
20
18
21
19
---
22
20
21
+
## Why BAP
22
+
23
+
Every browser action in your agent pipeline has a cost — latency, tokens, and dollars.
24
+
25
+
```
26
+
per action per 20-action task 1000 tasks/day
27
+
Stagehand 800ms, $0.01 $0.20 $200
28
+
Browser Use 1500ms, $0.02 $0.40 $400
29
+
BAP (in-process) 20ms, $0.00 $0.00 $0
30
+
```
31
+
32
+
Stagehand and Browser Use send every click and fill through an LLM. BAP doesn't — your agent's LLM decides the action, BAP executes it directly via Playwright. The LLM call happens once (in your agent), not per-action (in the browser layer).
33
+
34
+
**BAP is for teams that want to control the intelligence.** You bring the LLM, BAP brings the browser.
35
+
36
+
## What BAP gives your agent
37
+
38
+
|| Without BAP | With BAP |
39
+
|---|---|---|
40
+
|**What the LLM sees**| Raw HTML (10,000+ tokens) |`@submit button: "Submit"`, `@email textbox: "Email"` (50 tokens) |
41
+
|**Latency per action**| 800-1500ms (LLM in the loop) | 10-25ms (direct execution) |
42
+
|**Session state**| Lost between turns | Persisted — browser stays warm |
BAP MCP (in-process) is within 2x of raw CDP and matches Playwright's direct API — while giving your agent structured observations, semantic selectors, and session persistence.
127
+
128
+
## When to use what
129
+
130
+
| Use case | Recommendation |
131
+
|---|---|
132
+
|**Known workflows on known sites** (scraping, testing, data entry) | BAP MCP or Playwright — you know the selectors, AI per-action adds no value |
133
+
|**Agent on unfamiliar sites** (find pricing, navigate docs) | BAP for execution + your LLM for planning. Structured observations make the LLM cheaper and more accurate |
134
+
|**Don't want to build the planning layer**| Stagehand — bundles LLM + execution, but 40x slower and $200+/day at scale |
|**TypeScript SDK**|`npm i @browseragentprotocol/client`| Apps and agent backends |
89
-
|**Python SDK**|`pip install browser-agent-protocol`| Notebooks and Python agents |
90
-
91
152
## Tips
92
153
93
154
- BAP defaults to headful Chrome with a persistent session.
94
155
- Use `--headless` for CI or background runs.
95
156
- Use `--no-profile` if your Chrome profile is busy.
157
+
- Use `--slim` mode to cut tool definitions to ~600 tokens (vs ~4,200 for Playwright MCP).
96
158
- Use `bap close-all` to stop the daemon and all sessions.
97
159
98
-
## Against Other Tools
99
-
100
-
-**vs Playwright CLI** — BAP is built for agent workflows, not human shell scripting.
101
-
-**vs Playwright MCP** — When shell access is available, BAP CLI solves the same job with fewer roundtrips. In MCP mode, `--slim` cuts tool definitions to ~600 tokens vs ~4,200 for Playwright MCP's 70+ tools.
102
-
-**vs Chrome DevTools / CDP** — CDP is the low-level transport; BAP is the agent layer on top.
0 commit comments