Skip to content

Agent Browser

Category: OSS Agent Browser
License: Apache-2.0 (free and open source, no paid tier)
Official site: agent-browser.dev
GitHub: github.com/vercel-labs/agent-browser (38k stars)
npm: npmjs.com/package/agent-browser

What It Is

Agent Browser is a browser automation CLI built in native Rust and designed specifically for AI agents. Instead of returning full HTML or DOM dumps, it generates compact accessibility trees with deterministic element references (e.g. @e1, @e2). This keeps context window usage low when LLMs need to interpret and interact with web pages.

It ships native binaries for macOS (ARM64 and x64), Linux (ARM64 and x64), and Windows (x64), and works without Node.js once installed globally.

Why Use It Over Playwright / Puppeteer

  • Output is token-efficient: accessibility tree refs instead of raw HTML
  • 50+ commands for navigation, forms, screenshots, network, storage, video recording
  • Session persistence: save and restore auth state and cookies across runs
  • Proxy support built in
  • Integrates directly with Claude Code, Cursor, GitHub Copilot, OpenAI Codex, and Google Gemini via shell commands

Safety Notes

  • Session state files store tokens in plaintext -- add them to .gitignore
  • Set AGENT_BROWSER_ENCRYPTION_KEY for AES-256-GCM at-rest encryption
  • Use --allowed-domains to restrict navigation to trusted domains only
  • --remote-debugging-port exposes browser control locally; close Chrome when done
  • Auto-acceptance of alert and beforeunload dialogs can be disabled with --no-auto-dialog