vercel-labs/agent-browser
Agent-browser is a Rust-powered CLI that gives AI coding agents direct browser control while using 5.7x fewer tokens than Playwright MCP. Built by Vercel Labs, it hit 28,000 GitHub stars in roughly two months — making it one of the fastest-growing browser automation tools in 2026. The core innovation is token efficiency. A standard Playwright MCP setup consumes approximately 13,700 tokens just for tool definitions on every request. A 10-step browser automation task burns through roughly 114,000 tokens via MCP. Agent-browser completes the same task in approximately 27,000 tokens. That 76% reduction in token usage means your AI agent can run nearly 4x more browser operations within the same context window. How it works: instead of dumping the full DOM or accessibility tree, agent-browser's snapshot command returns only interactive elements with stable references. A button shows up as @e1: button "Sign In". An input field becomes @e2: input[type=email]. Each snapshot runs 200-400 tokens instead of the 3,000-5,000 tokens a full DOM representation requires. When you click a button, the response is "Done" — six characters, not a full page state update. The architecture is a three-tier stack. Tier 1 is the Rust CLI handling argument parsing and command routing in sub-millisecond time. Tier 2 is a Node.js daemon that manages a persistent Playwright browser instance and maintains state between commands. Tier 3 is the Chrome browser itself, connected via Chrome DevTools Protocol (CDP). The daemon launches automatically and persists — you do not restart the browser between commands. 50+ commands cover navigation, form filling, clicking, hovering, screenshots, PDF export, network interception, HAR recording, cookie management, localStorage access, device emulation, and geolocation spoofing. A batch mode accepts JSON arrays for multi-command workflows. An AI chat mode accepts natural language instructions. Compatible agents: Claude Code, Cursor, GitHub Copilot, OpenAI Codex, Google Gemini, opencode, and any agent that can execute shell commands. Cross-platform native binaries ship for macOS (ARM64/x64), Linux (ARM64/x64), and Windows (x64). Install via npm install -g agent-browser, brew install agent-browser, or cargo install agent-browser. Try it without installing: npx agent-browser open example.com. Important caveat: this is a Vercel Labs project — experimental, with no guarantee of long-term support. For production browser automation, evaluate accordingly. For teams managing multiple browser automation and MCP tools, check out MCP Gateway Registry for centralized server management. For building AI agent pipelines that include browser interactions, see Langflow.
Why It Matters
Agent-browser uses 76% fewer tokens than Playwright MCP for identical browser automation tasks. At 28K GitHub stars in two months, it is the fastest-adopted browser automation CLI for AI coding agents — and the token savings translate directly into more operations per context window, which means faster and cheaper AI-driven testing and web scraping.