vercel-labs/agent-browser
Rust CLI and stdio MCP for agents that read and act on live web pages
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
agent-browser is a native Rust CLI with a stateful daemon behind short-lived shell invocations. The first command starts the daemon, which drives Chrome for Testing over the Chrome DevTools Protocol (CDP) by default. Each --session gets its own daemon and browser. The daemon normally closes an idle headless browser after one hour and exits, saving state first when session persistence is configured.
The npm package exposes the agent-browser executable and selects a platform-specific native build; the Rust checks run from cli/. An MCP client can launch agent-browser mcp over stdio instead of issuing shell commands directly. Stdio is the client-facing MCP transport, not the browser-control protocol: Chrome uses CDP, while Firefox support uses WebDriver BiDi.
Key Capabilities & Differentiators
The primary interaction loop is to read a compact accessibility-tree snapshot, act on an element ref such as @e1, then snapshot again to verify the result. snapshot -i focuses on interactive elements. CSS, text, XPath, and semantic locators are also available. From v0.43.0, controls with missing or duplicate accessible names can carry hints such as data-testid or nearby row text, helping an agent distinguish otherwise similar controls.
The command surface extends to form input, waits, tabs, frames, dialogs, file transfers, screenshots, PDFs, and recordings. Console output, traces, profiling, and accessibility checks support diagnosis. Backend choices include an existing Chrome instance via --cdp or --auto-connect, local Firefox, Lightpanda and Obscura engines, Mobile Safari in the iOS Simulator, and cloud browsers such as Browserbase and Browserless. Check the commands your workflow needs on the intended backend rather than assuming parity.
Trade-offs & Limitations
Compared with writing a Playwright-style test suite, a text snapshot and a few shell actions are a better fit when an agent must inspect an unfamiliar page and choose the next step at runtime. They do not replace coded assertions, fixtures, or test reports for stable CI regression coverage. Refs describe a particular snapshot and should be refreshed after navigation or DOM changes. Clicks fail when a control is hidden, disabled, off-screen, or covered; agents need an explicit recovery path instead of assuming a click succeeded.
Local browsers keep browser execution on a host you manage, while cloud providers shift browser operations elsewhere and introduce a network and provider dependency. Named sessions separate browser instances but increase concurrency costs. For authenticated workflows, plan how to protect saved session state and review domain allowlists, action policies, and confirmation controls before allowing an agent to take consequential actions.
Hardware & Deployment Guide
For a standard local deployment, install the package with npm install -g agent-browser, then run agent-browser install to download Chrome for Testing. The npm manifest requires Node.js 22 or newer; on Linux, agent-browser install --with-deps can also install browser system libraries. Homebrew is another installation path. Building from source is separate and requires Node.js 24+, pnpm 11+, and Rust. A self-hosted Chrome session does not require a cloud browser provider; for MCP, configure the client to launch the stdio entrypoint.
Recent releases broaden the browser matrix: v0.44.0 added the Ladybird WebDriver provider, and v0.45.0 added local Firefox 150+ via --engine firefox or AGENT_BROWSER_ENGINE=firefox. Validate representative flows on the exact browser and version you intend to deploy. Size hosts around active browsers and page workload, especially when using multiple named sessions; no CPU, RAM, or VRAM sizing figures are specified.
snapshot -i returns interactive elements as compact text with @eN refs; v0.43.0 added hints for controls with missing or duplicate accessible names.agent-browser mcp serves MCP over stdio, and agent-browser skills get core loads guidance shipped with the installed CLI.Coding agents that need to inspect and interact with live pages for UI verification, form testing, or diagnosis through shell or stdio MCP.
Your main need is a deterministic CI regression suite with coded assertions and fixtures, or you expect identical behavior across browser backends without compatibility testing.
Quick Start & Installation
npm install -g agent-browser agent-browser install # download Chrome for Testing (first time only)
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| agent-browser ★ | 55.4k | +1k | Rust | Apache-2.0 | Rust CLI and stdio MCP for agents that read and act on live web pages |
| chrome-devtools-mcp | 60.4k | +760 | TypeScript | Apache-2.0 | Chrome DevTools via MCP and CLI for live browser debugging and performance analy |
| rea | 488.8k | +7.6k | TypeScript | MIT | A local CLI and MCP server for evidence-backed app and binary analysis |
| skills | 338.7k | +4.4k | Shell | MIT | Composable Markdown skills that bring engineering workflows to coding agents |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/vercel-labs/agent-browser.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about agent-browser
How does an agent connect, and where does browser state live?
agent-browser executable for shell integration, or configure an MCP client to launch agent-browser mcp over stdio. Browser state lives in the background session across commands. After navigation or a DOM change, take a fresh snapshot before acting on an element ref.What hardware should I budget for?
Can we self-host it for commercial use?
When would I choose this over a Playwright-style test suite?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy