Vercel Labs released agent-browser, a CLI tool that lets AI agents control browsers via accessibility trees and compact element refs instead of fragile CSS selectors.
Vercel Labs has released agent-browser, a native Rust CLI that automates browser tasks for AI agents. The tool gives agents a way to drive browsers one command at a time, reading pages as accessibility trees with compact text references for each element.
How it works
Instead of relying on CSS selectors or XPath queries that break when layouts change, agent-browser returns a snapshot of the page as compact text with a ref such as @e1 for each interactive element. An agent reads the snapshot, acts on a ref, takes a new snapshot to verify the result, and repeats. The browser stays open between commands, so each step is one short shell call.
The CLI sends each command to a background daemon that controls the browser over the Chrome DevTools Protocol. By default, the daemon closes a headless browser and exits after one hour without commands. Each session gets its own daemon and browser instance.
Install and quick start
Install with npm install -g agent-browser, then run agent-browser install to download Chrome for Testing on first use. Homebrew and Linux packages are also available; Linux users can run agent-browser install --with-deps to install system libraries.
To start: agent-browser open example.com, then agent-browser snapshot -i to see interactive elements with their refs. Act on a ref with agent-browser click @e1, then agent-browser get url to check the result.
Refs describe the page at the time of the snapshot. After navigation or DOM changes, take a new snapshot before using refs again. CSS selectors, text, XPath, and semantic locators also work; for example, agent-browser find role button click --name "Submit".
Browser engines and integrations
Chrome for Testing is the default. The tool also supports Lightpanda and Obscura engines, Mobile Safari in the iOS Simulator, and cloud browser providers including Browserbase, Browserless, Browser Use, Kernel, and AgentCore. For MCP clients, agent-browser mcp starts an MCP server over stdio.
The CLI ships skills matched to its version. Run agent-browser skills get core to load instructions for the core loop, refs, waiting, and common workflows. Install the discovery skill into an agent harness with npx skills add vercel-labs/agent-browser.
Current state
The project is Apache-2.0 licensed and has 47,803 stars on GitHub with 3,269 forks. It has 524 open issues. The tool is built for AI engineers, LLM app developers, and automation builders who need reliable browser control in agent loops.
Go deeper
Get the latest AI updates in the Tech AI Magazine app
iPhone · Android
Frequently asked questions
What is agent-browser?
Agent-browser is a Rust CLI tool released by Vercel Labs that allows AI agents to control browsers using accessibility trees.
How does agent-browser work?
Agent-browser works by taking snapshots of web pages as compact text, allowing agents to interact with elements using references like @e1.