vercel-labs/agent-browser

Browser automation CLI for AI agents

What it solves

AI agents often need to interact with real websites, but browsers aren't built for machines to drive them. agent-browser is a command-line tool that gives an AI agent a real browser it can control one command at a time — opening pages, reading their content, and clicking or typing on elements — without a human in the loop or complex scripting.

How it works

The tool is a native Rust CLI. Each step is one short shell call. The first command starts a background daemon that controls a browser over the Chrome DevTools Protocol, and the browser stays open between commands so every step is quick. The key idea is the "snapshot": the snapshot command returns the page as compact text with a reference (like @e1) for each element. The agent acts on a ref (e.g., click @e1), reads the page again to check the result, and repeats. Refs describe the page at snapshot time, so after navigation or a DOM change you take a new snapshot before reusing refs. Clicks fail — rather than falsely reporting success — when the target is hidden, disabled, outside the viewport, or covered by another element such as a consent banner.

Who it's for

AI agents and the developers building them. The CLI ships "skills" that match its installed version — instructions the agent loads so it knows the core loop, refs, waiting, and common workflows. It also works with MCP clients via agent-browser mcp, and can be wired into an agent harness from skills.sh or by adding a note to AGENTS.md.

Highlights

  • Snapshot-based interaction: pages become compact text with element refs the agent can act on
  • One short shell call per step, with the browser kept open between commands
  • Broad command set: navigate, click, fill, type, wait, screenshot, PDF, record, cookies, network, tabs, frames, dialogs, debugging, profiling, sessions, auth, and more
  • Multiple engines and providers: Chrome for Testing by default, plus Lightpanda, Obscura, Firefox, Mobile Safari in the iOS Simulator, and cloud providers like Browserbase, Browserless, Browser Use, Kernel, and AgentCore
  • Ships version-matched skills for agents, plus an MCP server over stdio
  • Native binaries for macOS, Linux, and Windows; installable via npm, Homebrew, or npx

Related

  • Project
  • Project
  • Project
  • Project
  • Project