@ulpi/browse 0.7.4 → 0.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +44 -22
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -10,26 +10,33 @@ Ten actions and you've burned **146K tokens — 73% of a 200K context window**
10
10
 
11
11
  **Same 10 actions: ~11K tokens. 6% of context. 13x less than @playwright/mcp.**
12
12
 
13
- ## Benchmarks (Measured)
14
-
15
- Tested on 4 e-commerce sites (mumzworld, amazon, ebay, nike) across homepage, search results, and product detail pages ([raw data](BENCHMARKS.md)):
16
-
17
- | Site | Page | @playwright/mcp navigate | browse snapshot -i | Reduction |
18
- |------|------|-------------------------:|-------------------:|----------:|
19
- | mumzworld.com | Homepage | ~51,151 | ~15,072 | **3x** |
20
- | mumzworld.com | Search | ~13,860 | ~3,614 | **4x** |
21
- | mumzworld.com | PDP | ~10,071 | ~3,084 | **3x** |
22
- | amazon.com | Homepage | ~10,431 | ~2,150 | **5x** |
23
- | amazon.com | Search | ~19,458 | ~3,644 | **5x** |
24
- | ebay.com | Homepage | ~4,641 | ~1,557 | **3x** |
25
- | ebay.com | Search | ~35,929 | ~7,088 | **5x** |
26
- | ebay.com | PDP | ~1,294 | ~678 | **2x** |
27
- | nike.com | Homepage | ~2,495 | ~816 | **3x** |
28
- | nike.com | Search | ~7,998 | ~2,678 | **3x** |
29
- | nike.com | PDP | ~3,034 | ~989 | **3x** |
30
- | **TOTAL** | **11 pages** | **~160,362** | **~41,370** | **4x** |
31
-
32
- And that's the per-snapshot comparison. The real gap is architectural — @playwright/mcp dumps a snapshot on every action (navigate, click, type). `browse` only returns ~15 tokens per action:
13
+ ## Benchmarks
14
+
15
+ ### vs Agent Browser & Browser-Use (Token Cost)
16
+
17
+ Tested on 3 sites across multi-step browsing flows navigate, snapshot, scroll, search, extract text:
18
+
19
+ **browse is 2.4-2.8x cheaper on tokens, 1.3-2.6x faster, and uses 7% of context vs 17-20%.**
20
+
21
+ | Tool | Total Tokens | Total Time | Context Used (200K) |
22
+ |------|-------------:|-----------:|--------------------:|
23
+ | **browse** | **14,134** | **28.5s** | **7.1%** |
24
+ | agent-browser | 39,414 | 36.2s | 19.7% |
25
+ | browser-use | 34,281 | 72.7s | 17.1% |
26
+
27
+ **Per site:**
28
+
29
+ | Site | browse tokens | agent-browser tokens | browser-use tokens | browse time | agent-browser time | browser-use time |
30
+ |------|-------:|-------------:|------------:|------:|------:|------:|
31
+ | amazon.com | 7,531 | 11,596 | 20,508 | 10.1s | 12.9s | 21.9s |
32
+ | bbc.com | 4,032 | 24,861 | 8,827 | 9.8s | 13.5s | 29.9s |
33
+ | booking.com | 2,571 | 2,957 | 4,946 | 8.6s | 9.8s | 20.9s |
34
+
35
+ browse uses **2.4x fewer tokens** than browser-use and **2.8x fewer** than agent-browser — and completes **2.5x faster** than browser-use across the same workflows.
36
+
37
+ ### vs @playwright/mcp (Architecture)
38
+
39
+ @playwright/mcp dumps the full accessibility snapshot on every action (navigate, click, type). browse returns ~15 tokens per action — the agent requests a snapshot only when it needs one:
33
40
 
34
41
  | | @playwright/mcp | @ulpi/browse |
35
42
  |---|---:|---:|
@@ -241,8 +248,10 @@ browse click @e52
241
248
 
242
249
  ### Snapshot & Refs
243
250
  ```
244
- snapshot [-i] [-c] [-C] [-d N] [-s sel]
245
- -i Interactive elements only (buttons, links, inputs)
251
+ snapshot [-i] [-f] [-V] [-c] [-C] [-d N] [-s sel]
252
+ -i Interactive elements only — terse flat list (minimal tokens)
253
+ -f Full — indented tree with props and children (use with -i)
254
+ -V Viewport — only elements visible in current viewport
246
255
  -c Compact — remove empty structural nodes
247
256
  -C Cursor-interactive — detect hidden clickable elements
248
257
  -d N Limit tree depth
@@ -362,6 +371,19 @@ Inspired by and originally derived from the `/browse` skill in [gstack](https://
362
371
 
363
372
  ## Changelog
364
373
 
374
+ ### v0.7.0 — Token Optimization
375
+
376
+ - `snapshot -i` now outputs terse flat list by default (no indentation, no props, names truncated to 30 chars)
377
+ - `-f` flag for full indented ARIA tree with props/children (the old `-i` behavior)
378
+ - `-V` flag for viewport-only snapshot — filters to elements visible in the current viewport (BBC: 189 → 28 elements, ~85% reduction)
379
+ - `browse version` / `--version` / `-V` — print CLI version
380
+ - 2.4-2.8x fewer tokens than browser-use and agent-browser across real-world benchmarks
381
+
382
+ ### v0.4.0 — Video Recording
383
+
384
+ - `video start [dir]` | `video stop` | `video status` — compositor-level WebM recording
385
+ - Works with local and remote (CDP) browsers
386
+
365
387
  ### v0.3.0 — Headed Mode, Clipboard, DevTools
366
388
 
367
389
  - `--headed` flag — run browser in visible mode for debugging and demos
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ulpi/browse",
3
- "version": "0.7.4",
3
+ "version": "0.7.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/ulpi-io/browse"