Skip to main content

webrain vs agent-browser

agent-browser (vercel-labs) is a Rust CLI that gives an agent a browser one command at a time, with a background daemon and @e1 element refs. webrain is a Rust MCP server with a CLI for the same job. Both drive CDP, both are single binaries. This page is not a feature race. agent-browser is also a browser tester — a11y audits, react tree, vitals, trace, profiler, record, mouse, clipboard, frame, find, is — and none of that is our scope. What follows compares only crawling and scraping, which is the whole of webrain. Command names were taken from the agent-browser command reference and from our own HELP table (webrain-cli/src/main.rs:37), and the CDP calls from webrain-core/src/backends/cdp.rs — not from memory.

Where a scraper would notice the difference

The gaps worth closing, in order

  1. Click-triggered download. Page.setDownloadBehavior + a wait for the file, so “click the CSV button, give me the file” works. Ours only fetches a URL.
  2. Viewport / device / geo emulation. Three CDP calls next to the timezone and locale we already set. It is how you get a mobile layout, or localised results.
  3. Frame-scoped snapshot and extraction. eval_in_frame proves frame addressing works; observe and extract should accept the same selector.
  4. --if-changed screenshots. Hash the bytes, return unchanged, so a repeated capture does not spend image tokens.

Closed since the first pass

  • read shipped as webrain read (CLI, no browser, no model) — negotiation, .md retry, llms.txt walk, --outline, --filter. See the row above for what was measured.
  • CLI pdf shipped as webrain pdf <file-or-url> [--json].

Not gaps

open/goto, click, dblclick, fill, type, press, hover, focus, select, check, scroll, drag, upload, wait, is, find, scrollintoview, dialog, tab, mouse and clipboard commands exist here as the webrain_interact / webrain_observe surface (by element index, not @e1 refs), which is the same job through one tool instead of fifteen commands. trace, profiler, record, react, vitals, a11y audits, dashboard, stream and inspect are browser testing and DevTools: deliberately absent.

Pick agent-browser when

You want a CLI-shaped browser tester — one shell call per step, refs in the output, plus tracing, recording and React introspection. Pick webrain when the job is getting data out of pages: crawling, extraction without an LLM in the path, many URLs at once, and an MCP surface any client can call.