Vercel Agent Browser
Agent Browser is a fast native Rust CLI for browser automation designed for AI agents. It solves the problem of programmatic web interaction by providing a simple command-line interface for navigation, clicking, filling forms, and extracting page data. It is intended for developers building AI agents or automation scripts that need to control a browser.
✨ Key features
- Fast native Rust CLI for browser automation
- Accessibility tree snapshot with refs for AI
- Supports traditional CSS selectors and semantic locators
- Batch execution to reduce process startup overhead
- WebMCP experimental page tools
- Read agent-friendly text from URLs or active tab
🎯 Use cases
- Automate web tasks with AI agents
- Extract data from web pages
- Test web applications
- Scrape content with JavaScript rendering
- Interact with web pages in natural language via chat
📦 Installation
🧰 Requirements: Chrome (downloaded via agent-browser install), Node.js 24+ and pnpm 11+ only for building from source, Rust only for building from source.
npm install -g agent-browser
agent-browser install # Download Chrome from Chrome for Testing (first time only)
For project installation:
npm install agent-browser
agent-browser install
Homebrew (macOS):
brew install agent-browser
agent-browser install
Cargo (Rust):
cargo install agent-browser
agent-browser install
From source (requires Node.js 24+, pnpm 11+, Rust):
git clone https://github.com/vercel-labs/agent-browser
cd agent-browser
pnpm install
pnpm build
pnpm build:native # Requires Rust (https://rustup.rs)
pnpm link --global # Makes agent-browser available globally
agent-browser install
Linux dependencies:
agent-browser install --with-deps
Update:
agent-browser upgrade
🚀 Usage
agent-browser open example.com
agent-browser snapshot # Get accessibility tree with refs
agent-browser click @e2 # Click by ref from snapshot
agent-browser fill @e3 "test@example.com" # Fill by ref
agent-browser get text @e1 # Get text by ref
agent-browser screenshot page.png
agent-browser close
⚠️ Good to know
Clicks fail early when another element covers the target's click point, and WebMCP tools are experimental and page-provided content is untrusted.
❓ FAQ
How do I install agent-browser?
You can install it globally via npm (npm install -g agent-browser), or use Homebrew on macOS, Cargo, or build from source. After installation, run agent-browser install to download Chrome.
What are the system requirements?
You need Chrome, which can be downloaded automatically. Node.js and Rust are only required if building from source.
How do I update agent-browser?
Run agent-browser upgrade. It detects your installation method (npm, Homebrew, or Cargo) and runs the appropriate update command.
Can I use traditional CSS selectors?
Yes, agent-browser supports traditional selectors like #submit and .class, in addition to accessibility refs and semantic locators.
📊 Repository
🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.