Browser Agent Token Efficiency Benchmark
A reproducible comparison of token efficiency, reliability, and speed between three modern AI browser automation frameworks: Sentinel (
@isoldex/sentinel), Stagehand (@browserbasehq/stagehand), and browser-use (browser-use). All three are driven against the same Gemini 3 Flash Preview model on the same 9 real-world tasks.
TL;DR
This is a self-benchmark by the author of Sentinel. Raw per-run JSON is committed — please stress-test the methodology.
- Sentinel uses 3.13× to 56.93× fewer tokens per task than browser-use, and 1.42× to 13.33× fewer than Stagehand across 9 real-world browser automation workloads.
- Reliability: Sentinel 100 % (45/45 runs). browser-use 100 % (45/45). Stagehand legacy 86.7 % (39/45). Stagehand hybrid 90 % (18/20 on the 4 agent-driven tasks where hybrid applies).
- The harder the task, the bigger the gap. Simple extraction on a detail page: 57× vs browser-use, 2× vs Stagehand. Login + logout: 40× vs browser-use. Amazon search + brand filter + sort: 10× vs browser-use, 13× vs Stagehand.
- Stagehand fails Task 06 (login + logout, 0/5 runs) due to a click-event behavior on anchor tags in its default DOM mode; its hybrid mode completes the same task at 37× the tokens Sentinel uses.
- Speed also favors Sentinel. Sentinel is the fastest tool on 5 of 9 tasks. browser-use is the slowest on 8 of 9 tasks, often 2–9× slower than Sentinel.
- Same model, same prompts, same schemas, same validators. Each framework is used with its idiomatic API (Sentinel: discrete
act()/extract(); Stagehand:act()/extract(); browser-use: single-prompt agent loop). Raw per-run JSON is persisted underresults/raw/for independent recomputation.
See METHODOLOGY.md for how the numbers were produced, how ties and failures are treated, and what we did not measure.
Why this benchmark exists
I'm the author of Sentinel. I built it while developing an AI agent for a client project, after trying browser-use and Stagehand and running into two recurring problems: flaky reliability on multi-step flows, and token costs that ate the budget on anything non-trivial. Both frameworks lean on the LLM re-reading large portions of the page at every step; I suspected the root cause was architectural, not model quality, and wanted to test whether a different observation strategy (Chrome's Accessibility Object Model, AOM) would measurably change that.
This benchmark is how I stress-tested that hypothesis. All three frameworks run against the same model, same prompts, and the same programmatic validators; each is used with its own idiomatic API. Raw per-run JSON is committed so you can reproduce or challenge every number - if you spot a task where Sentinel gets an unfair setup, please open an issue.
Known limitations and potential biases
- Author bias. I built Sentinel. Treat the numbers as a starting point for your own verification, not as an impartial survey.
- Interaction model asymmetry. Sentinel and Stagehand are driven with discrete
act()/extract()calls; browser-use takes a single agent-loop task prompt. Each framework is used as its docs recommend, but forcing them into the same call pattern would disadvantage whichever is optimized for the other. - Task selection. The 9 tasks mix extraction-heavy work (which favors frameworks with a direct
extract()primitive) with open-ended agent flows (which favor agent-loop frameworks). The mix aims to be balanced, but any fixed set of tasks has implicit priors. - Single model. Only
gemini-3-flash-previewwas tested. Results may look different on Claude, GPT, or local models with different tokenizers and tool-calling styles. - Small sample (5 runs per task-tool combination). p95 numbers are noisy at this sample size. Raw JSON is available for anyone who wants to recompute with stricter statistics.
- Live-site drift. Task 09 hits Amazon.com, whose DOM and anti-bot behavior shift constantly. Reproductions more than a few weeks after these runs may see different success rates, especially for agent-loop tools.
What this benchmark measures
- Token efficiency - total, input, and output tokens reported by each framework's own instrumentation.
- Reliability - success rate across 5 runs per task-tool combination.
- Speed - median and p95 wall-clock duration per run.
- Cost - derived from token counts and the official Gemini 3 Flash Preview pricing ($0.50 / $3.00 per 1M input/output tokens).
Each task is validated programmatically by a dedicated validator.ts. A failed validation counts as a run failure even if the agent technically completed without throwing.
Model
All runs in this repository use gemini-3-flash-preview for all three tools. This is a strict same-model comparison — mixing model families would make token counts incomparable (different tokenizers, different per-prompt overhead) and is intentionally out of scope.
Tasks
The 9 tasks span the surface area of real-world browser automation:
| # | Task | Surface tested |
|---|---|---|
| 01 | Simple form fill on httpbin.org | Baseline: text inputs, radios, checkboxes |
| 02 | Books-to-Scrape: browse category → paginate → open detail | Agent navigation + rating extraction |
| 03 | Wikipedia multi-hop + structured data at target | Autonomous agent + infobox/table extraction |
| 04 | JS-rendered quotes with tag filter + pagination round-trip | Dynamic DOM + list extraction |
| 05 | Self-hosted 3-step checkout with promo-code gate | Context across 3 pages + conditional UI gate |
| 06 | Login + logout round trip on the-internet.herokuapp.com | Full session lifecycle |
| 07 | Self-hosted data table with sort/filter/pagination + row modal | Tabular UI + detail overlay |
| 08 | Self-hosted flaky backend (30 % random 5xx) | Retry / error recovery |
| 09 | Amazon.com: search + brand filter + sort by customer review | Complex DOM + agent reasoning |
See tasks/*/spec.md for individual task specifications, METHODOLOGY.md for the full measurement methodology, and docs/limitations.md for known caveats.
Results
Last benchmark run: 2026-04-23T20:47:11.757Z · 155 total runs analyzed.
Detailed results
| Task | Tool | Success | Tokens (med) | Input | Output | Cost / run | p50 dur | p95 dur |
|---|---|---|---|---|---|---|---|---|
| 01-simple-form | browser-use | 5/5 | 28,307 | 23,562 | 4,802 | $0.0262 | 45.3s | 46.8s |
| 01-simple-form | sentinel | 5/5 | 5,797 | 5,462 | 338 | $0.0037 | 16.0s | 16.3s |
| 01-simple-form | stagehand | 5/5 | 9,069 | 8,783 | 287 | $0.0053 | 19.7s | 19.9s |
| 02-product-extraction | browser-use | 5/5 | 43,838 | 37,995 | 5,843 | $0.0365 | 48.3s | 58.5s |
| 02-product-extraction | sentinel | 5/5 | 770 | 731 | 39 | $0.0005 | 8.3s | 8.6s |
| 02-product-extraction | stagehand | 5/5 | 1,550 | 1,481 | 69 | $0.0009 | 14.6s | 24.4s |
| 03-multi-step-navigation | browser-use | 5/5 | 82,287 | 75,827 | 6,799 | $0.0573 | 72.5s | 91.9s |
| 03-multi-step-navigation | sentinel | 5/5 | 5,772 | 5,739 | 33 | $0.0030 | 13.2s | 13.3s |
| 03-multi-step-navigation | stagehand | 5/5 | 72,020 | 71,957 | 61 | $0.0362 | 18.7s | 22.6s |
| 04-pricing-disambiguation | browser-use | 5/5 | 16,476 | 14,529 | 1,945 | $0.0131 | 21.3s | 26.9s |
| 04-pricing-disambiguation | sentinel | 5/5 | 5,267 | 4,855 | 412 | $0.0037 | 29.2s | 41.4s |
| 04-pricing-disambiguation | stagehand | 5/5 | 19,835 | 19,671 | 157 | $0.0103 | 14.8s | 15.2s |
| 04-pricing-disambiguation | stagehand-hybrid | 5/5 | 24,416 | 24,284 | 132 | $0.0125 | 15.4s | 17.8s |
| 05-multi-step-form | browser-use | 5/5 | 49,875 | 43,608 | 6,244 | $0.0404 | 63.5s | 66.1s |
| 05-multi-step-form | sentinel | 5/5 | 10,400 | 9,717 | 684 | $0.0069 | 33.7s | 33.9s |
| 05-multi-step-form | stagehand | 5/5 | 14,803 | 14,304 | 499 | $0.0086 | 32.2s | 32.2s |
| 06-authentication-flow | browser-use | 5/5 | 114,796 | 94,888 | 18,526 | $0.1072 | 144.5s | 158.7s |
| 06-authentication-flow | sentinel | 5/5 | 2,884 | 2,662 | 222 | $0.0020 | 15.7s | 16.2s |
| 06-authentication-flow | stagehand | 0/5 | n/a | n/a | n/a | n/a | n/a | n/a |
| 06-authentication-flow | stagehand-hybrid | 5/5 | 107,456 | 106,979 | 477 | $0.0549 | 50.1s | 58.0s |
| 07-data-table | browser-use | 5/5 | 34,120 | 30,030 | 4,090 | $0.0273 | 33.6s | 37.0s |
| 07-data-table | sentinel | 5/5 | 7,781 | 7,234 | 547 | $0.0053 | 20.9s | 21.1s |
| 07-data-table | stagehand | 5/5 | 36,278 | 35,905 | 379 | $0.0191 | 26.1s | 26.6s |
| 07-data-table | stagehand-hybrid | 5/5 | 32,464 | 32,211 | 275 | $0.0169 | 19.9s | 21.2s |
| 08-error-recovery | browser-use | 5/5 | 17,967 | 15,092 | 2,816 | $0.0160 | 39.5s | 40.1s |
| 08-error-recovery | sentinel | 5/5 | 4,076 | 3,789 | 287 | $0.0028 | 25.1s | 26.2s |
| 08-error-recovery | stagehand | 5/5 | 6,016 | 5,761 | 255 | $0.0036 | 15.3s | 17.7s |
| 09-complex-ecommerce | browser-use | 5/5 | 236,562 | 212,484 | 24,078 | $0.1785 | 186.0s | 221.3s |
| 09-complex-ecommerce | sentinel | 5/5 | 23,774 | 22,581 | 1,189 | $0.0149 | 75.5s | 110.8s |
| 09-complex-ecommerce | stagehand | 4/5 | 316,934 | 316,254 | 641 | $0.1602 | 276.3s | 299.0s |
| 09-complex-ecommerce | stagehand-hybrid | 3/5 | 222,379 | 221,783 | 596 | $0.1127 | 290.1s | 290.1s |
Head-to-head ratios
| Task | Sentinel | Stagehand | Stagehand ratio | browser-use | browser-use ratio | Sentinel ok | Stagehand ok | browser-use ok |
|---|---|---|---|---|---|---|---|---|
| 01-simple-form | 5,797 | 9,069 | 1.56× | 28,307 | 4.88× | 5/5 | 5/5 | 5/5 |
| 02-product-extraction | 770 | 1,550 | 2.01× | 43,838 | 56.93× | 5/5 | 5/5 | 5/5 |
| 03-multi-step-navigation | 5,772 | 72,020 | 12.48× | 82,287 | 14.26× | 5/5 | 5/5 | 5/5 |
| 04-pricing-disambiguation | 5,267 | 19,835 | 3.77× | 16,476 | 3.13× | 5/5 | 5/5 | 5/5 |
| 05-multi-step-form | 10,400 | 14,803 | 1.42× | 49,875 | 4.80× | 5/5 | 5/5 | 5/5 |
| 06-authentication-flow | 2,884 | n/a | n/a | 114,796 | 39.80× | 5/5 | 0/5 | 5/5 |
| 07-data-table | 7,781 | 36,278 | 4.66× | 34,120 | 4.39× | 5/5 | 5/5 | 5/5 |
| 08-error-recovery | 4,076 | 6,016 | 1.48× | 17,967 | 4.41× | 5/5 | 5/5 | 5/5 |
| 09-complex-ecommerce | 23,774 | 316,934 | 13.33× | 236,562 | 9.95× | 5/5 | 4/5 | 5/5 |
Reproduce
npm install npx playwright install chromium cp .env.example .env # add your GEMINI_API_KEY # browser-use is Python; create its venv and install deps python -m venv python/.venv python/.venv/Scripts/pip install -r python/requirements.txt # macOS/Linux: python/.venv/bin/pip npm run validate # sanity-check the environment npm run benchmark # runs 9 tasks × 3 tools × 5 runs (~3–6 hours, ~$5–10) npm run aggregate # writes results/aggregated/summary.{json,md} npm run report # injects summary.md into this README under <!-- RESULTS -->
A single task can be run via:
npm run benchmark:single -- --task 09-complex-ecommerce --tool sentinel npm run benchmark:single -- --task 09-complex-ecommerce --tool browser-use npm run benchmark:single -- --task 09-complex-ecommerce --tool stagehand
Layout
tasks/ Task specs, validators, and per-tool implementations (Sentinel/Stagehand in TS, browser-use in Python).
lib/ Runner, measurement, pricing, statistics, test server.
tools/ Thin per-framework adapter. For browser-use the adapter spawns a Python subprocess.
python/ browser-use runner + requirements (Python venv is created here during setup).
sites/ Static HTML/CSS/JS for the self-hosted tasks (04, 05, 07, 08).
scripts/ CLI entry points (run-all, run-single, aggregate, report).
results/ Raw per-run JSON, aggregated summary, and visualizations.
docs/ Methodology notes and limitations.
Frameworks tested
- Sentinel -
@isoldex/sentinel· source - Stagehand -
@browserbasehq/stagehand· source - browser-use -
browser-use· source
License
MIT.




















