Want your AI agent to open pages, click buttons, and fill forms on its own instead of hand written scripts for every step? agent-browser is an open source command line tool from Vercel, written in Rust, that lets AI drive a browser like a human. It reads the page into compact text with references, so the agent acts on references and confirms the result, which closes the last mile between agents and the real web.

What Is agent-browser

agent-browser is an open source browser automation CLI from Vercel, written in Rust and built for AI agents. It lets an agent drive a browser like a person: one command opens a page, the page is read into an accessibility tree, and a snapshot returns compact text with references such as @e1. The agent clicks or types on those references and reads the page back to confirm, looping as needed. The browser stays open between commands, so each step is a short shell call that fits the LLM style. Compared with Playwright or Puppeteer, which target scripts, it turns seeing and acting into reference text that models handle more reliably, and it supports CDP, cloud browsers, and an iOS simulator out of the box.

Since the browser stays open between calls, each command is short and cheap, which fits the request pattern of a language model loop.

Features

  • Snapshot with references. The page becomes compact referenced text, so the agent acts in small verifiable steps instead of parsing raw HTML or pixel noise.
  • Step by step. Each step is a short command, and you can read the page right after to confirm and retry, which suits the way language models operate.
  • Multiple engines. It supports Chrome DevTools Protocol directly, plus Lightpanda, Obscura, and an iOS simulator for mobile style flows.
  • Cloud browsers. It connects to providers like Browserbase, Browserless, and Browser Use, so you can run agents without a local browser.
  • Session isolation. Each session gets its own daemon and browser, and exits after idle, with optional persistence for long running jobs.
  • Agent friendly. A built in MCP server and versioned agent skills plug into agent frameworks out of the box, with no glue code.
  • Low cost entry. Open source and free, with native support on major operating systems, so teams skip commercial automation licenses.
  • Deterministic references. Elements are addressed by stable ids like @e1 rather than fragile selectors, so a click survives a layout change.
  • Parallel sessions. Run several isolated browsers at once for independent tasks, with state kept per session.

How to Use

  1. Install. Run npm install -g agent-browser for a global install, or grab a native binary on macOS, Windows, or Linux.
  2. Open a session. Run agent-browser open <url> and the browser stays resident in the background while the agent works.
  3. Read the page. Run agent-browser snapshot to get the compact referenced text for the agent to understand.
  4. Act. Operate on a reference, for example agent-browser click @e1 or agent-browser fill @e2 "text".
  5. Confirm. Snapshot again to check the result and continue as needed, retrying a step if the page changed.
  6. Plug in. Run agent-browser mcp to start the MCP server, or agent-browser skills get core to fetch skills.
  7. Keep alive. For long jobs, configure session persistence so the browser does not exit when idle.

Supported Platforms

ItemDetail
LanguageRust (CLI core)
EcosystemNode and TypeScript
Installnpm global or native binary
SystemsmacOS, Windows, Linux
ProtocolChrome DevTools Protocol
Command shapeShort commands with references
EnginesCDP, Lightpanda, Obscura
Cloud browsersBrowserbase, Browserless, and others
LicenseApache-2.0

The CLI talks to a background daemon through Chrome DevTools Protocol, and each session owns its own browser instance. Because the daemon model keeps the browser alive between calls, agents pay only a tiny shell cost per action instead of launching a fresh browser each time.

Pricing

agent-browser is Apache-2.0 and free for commercial and personal use with no tier limits. The source is on GitHub, and the CLI and MCP server are ready to use with no fee or signup. Vercel maintains it as part of its AI infrastructure, and you can self host the daemon and connect your own browsers without sending traffic to a third party.

Use Cases

  • Agent browsing. Let a coding assistant or support bot open pages, fill forms, and click without human written scripts.
  • Browser testing. Drive end to end checks with natural language or agent control rather than brittle selectors.
  • Data entry and scraping. Read and fill reliably on pages that need login or interaction that generic scrapers miss.
  • Engine flexibility. Use CDP locally and Browserbase in the cloud, switching freely per environment.
  • Agent workflows. Wire browser power into existing frameworks through MCP and skills. If you also use Vercel's other agent tool, see What Is agent-desktop and How to Use It: Vercel's Open Source Computer Use Tool for AI Agents.
  • Form heavy workflows. Automate multi step signup, checkout, and internal admin forms that change their field order between releases.
  • Regression checks. Replay the same referenced snapshot after a deploy to confirm key controls still respond as expected.

How It Works

agent-browser is open sourced and maintained by Vercel as the bridge between agents and browsers. The CLI sends each command to a background daemon, which controls the browser through Chrome DevTools Protocol, with per session lifecycle management. Licensed under Apache-2.0, it evolves around MCP and agent skills, aiming to become the standard browser interface that any agent framework can call directly. As part of Vercel's AI infrastructure, it complements agent-desktop and helps standardize how agents operate computers. Its design philosophy is to expose the browser as a set of stable, verifiable primitives rather than one off scripts, which fits how agents need to observe, act, and retry.

References are resolved against the latest snapshot, so stale ids fail loudly instead of silently acting on the wrong control.

Conclusion

If you are building AI agents that truly use the web, agent-browser fits the LLM model well. It lowers the difficulty with snapshots and references, and ships MCP and cloud browser support natively. It turns the browser into a tool the agent calls directly, not just a page to scrape, and it keeps your automation portable across local and cloud environments. Project address https://github.com/vercel-labs/agent-browser , docs https://agent-browser.dev .

Install it once, try a snapshot on a real page, and the trade offs become obvious quickly.