agent-browser
Fast browser automation CLI for AI agents. Chrome/Chromium via CDP with accessibility-tree snapshots and compact @eN element refs (~200-400 tokens vs 3-5K for DOM dumps). Installed via brew (2026-07-20); headless by default, --headed for visible.
Lane routing (ours, overrides the vendor's "prefer over everything")
| Need | Tool |
|---|---|
| Operator's logged-in Chrome, SSO sites, real tabs | claude-in-chrome MCP (interactive sessions only) |
| Static page fetch / crawl at scale | WebFetch / Firecrawl |
| Scripted or headless automation, JS-rendered pages, web-app verification, subagent/scout/launchd/autonomous contexts | agent-browser |
Start here
This file is a discovery stub, not the usage guide. Before running any agent-browser command, load the workflow content from the CLI itself — it always matches the installed version:
agent-browser skills get core # workflows, common patterns, troubleshooting
agent-browser skills get core --full # + full command reference and templates
Specialized skills (CLI-served)
agent-browser skills list # everything on the installed version
agent-browser skills get electron # Electron desktop apps (VS Code, Slack, Discord, Figma, ...)
agent-browser skills get slack # Slack workspace automation
agent-browser skills get dogfood # Exploratory testing / QA / bug hunts
Core loop
agent-browser open https://example.com
agent-browser snapshot -i # @e1 [heading] … @e2 [link] …
agent-browser click @e2
agent-browser get url
agent-browser close
Also: eval <js> · set viewport <w> <h> / set device <name> · network requests · console · react tree / vitals (web-dev) · --session <name> isolation · connect <port> CDP-attach · cookies set --curl <file> for auth.
Gotchas
- Bundled-Chrome download (
agent-browser install) can time out; system-Chrome fallback works — don't block on it. - Interactive and JSON snapshots can omit state attributes even when the page exposes them. If a decision depends on state such as
aria-pressed, query the principal value directly (agent-browser get attr @eN aria-pressed) instead of inferring it from the snapshot. closecloses the browser pages, but the session daemon may remain active. Insession info --json, distinguish daemonactivefromruntime.browserLaunchedandpageCount; useclose --allonly when every session should be reset.- Observability dashboard on port 4848 (independent of sessions).
Calibration history: references/calibration.md.