agent-browser
agent-browser is a browser automation CLI for AI agents. Its compact text output minimizes context usage, and it is implemented as 100% native Rust.
Visit vercel-labs/agent-browserOverview
agent-browser is a browser automation CLI designed for AI agents. It provides compact text output to reduce context usage and is implemented as a native Rust CLI with a client-daemon architecture that manages Chrome via the Chrome DevTools Protocol.
Key Features
- Agent-first compact text output uses fewer tokens than JSON for AI context efficiency.
- Snapshot returns an accessibility tree with refs for deterministic element selection.
- 50+ commands cover navigation, forms, screenshots, network, storage, files, tabs, frames, and debugging.
- Built-in observability includes video recording, streaming, debugging, profiler, and diffing tools.
- Stateful sessions, profiles, auth state, cookies, storage, proxy, and security controls support long-running agents.
- Cross-platform native binaries are available for macOS, Linux, and Windows.
Use Cases
- AI coding agents and shell-capable agents can drive browsers through CLI commands.
- Agents can navigate pages, inspect accessibility snapshots, interact by ref, capture screenshots, and close the browser.
- Long-running agents can use sessions, profiles, auth state, cookies, storage, and proxy controls.
- Developers can use built-in recording, streaming, debugging, profiling, and diffing for browser workflow observation.
Getting Started
- Install globally with npm install -g agent-browser, then run agent-browser install to download Chrome on first use.
- Try without installing by running npx agent-browser open example.com.
- Use agent-browser open example.com, agent-browser snapshot, agent-browser click @e2, agent-browser fill @e3 "test@example.com", agent-browser get text @e1, agent-browser screenshot page.png, and agent-browser close for a basic workflow.
Deployment & Requirements
- Chrome is required; run agent-browser install to download Chrome from Chrome for Testing, and existing Chrome, Brave, Playwright, and Puppeteer installations are detected automatically.
- No Playwright or Node.js is required for the daemon.
- Node.js 24+ and pnpm 11+ are required only when building from source; Rust is also required only when building from source.
- On Linux, agent-browser install --with-deps installs system dependencies and exits nonzero if the package manager cannot install every required browser library.
- Native binaries are provided for macOS ARM64 and x64, Linux ARM64 and x64, and Windows x64.
Before You Adopt
- License: Apache-2.0. Review its terms before using, modifying, or distributing the project.
- Chrome is the runtime browser dependency; existing Chrome, Brave, Playwright, and Puppeteer installations are detected automatically, and the daemon does not require Playwright or Node.js.
- The daemon exits after one hour without commands or dashboard input by default; headed browsers, Safari and iOS WebDriver sessions, and user-attached browsers are exempt, while provider-owned cloud browsers are not.
- WebMCP page-provided names, descriptions, schemas, annotations, and results are untrusted data.