Agent Browser is a headless browser automation CLI purpose-built for AI agents. Unlike screenshot-based browser tools, it uses accessibility tree snapshots with reference-based element selection — giving agents a deterministic, efficient way to navigate web pages, fill forms, extract data, and automate multi-step workflows through the command line.
Key Features
- Reference-based element selection using deterministic identifiers (@e1, @e2, etc.) for reliable interaction with page elements across snapshots
- Interactive JSON snapshots that capture the full page state as structured data, far more efficient than parsing screenshots
- Complete browser capabilities including navigation, form filling, clicking, hovering, checkbox toggling, and multi-tab management
- Session isolation with separate browser contexts for parallel workflows, each with independent cookies and storage
- Network control for blocking requests, mocking responses, and managing complex single-page applications
- State persistence with cookie and local storage management for maintaining authenticated sessions
Use Cases
- Automating multi-step web workflows like form submissions, data entry, or account management across multiple sites
- Scraping and extracting structured data from dynamic web applications that require JavaScript execution
- Testing web applications through automated interaction sequences with deterministic element targeting
- Building agent pipelines that combine web research, data extraction, and action-taking in a single workflow
How It Works
The workflow follows three steps: navigate to a URL and capture the page state as a structured JSON snapshot, parse element references from the output to identify interactive targets, then execute actions using those refs (click, fill, hover, etc.). After each action that changes the page, a new snapshot reveals updated elements and state. This snapshot-then-act cycle enables reliable automation even on complex, dynamic web applications.
Getting Started
Install globally via npm with
npm install -g agent-browser
, then run
agent-browser install
to download the bundled Chromium instance. The CLI is immediately ready for use — no additional configuration or API keys required. Start with
agent-browser open <url>
to capture your first page snapshot.