Agent-browser
Browser automation CLI designed for AI agents. Compact text output minimizes context usage. Fast Rust CLI with Node.js fallback.
Install
npm install -g agent-browser # all platforms (fastest, native Rust CLI)
brew install agent-browser # macOS
# or try without installing
npx agent-browser open example.com
Features
- Agent-first - Compact text output uses fewer tokens than JSON, designed for AI context efficiency
- Ref-based - Snapshot returns accessibility tree with refs for deterministic element selection
- Fast - Native Rust CLI for instant command parsing
- Complete - 50+ commands for navigation, forms, screenshots, network, storage
- Sessions - Multiple isolated browser instances with separate auth
- Cross-platform - macOS, Linux, Windows with native binaries
Example
# Navigate and get snapshot
agent-browser open example.com
agent-browser snapshot -i
# Output:
# - heading "Example Domain" [ref=e1]
# - link "More information..." [ref=e2]
# Interact using refs
agent-browser click @e2
agent-browser screenshot page.png
agent-browser close