agent-browser
Fast browser automation CLI for AI agents. Chrome/Chromium via CDP with
accessibility-tree snapshots and compact @eN element refs.
Install: npm i -g agent-browser && agent-browser install
Start here
This file is a discovery stub, not the usage guide. Before running any
agent-browser command, load the actual workflow content from the CLI:
agent-browser skills get core # start here — workflows, common patterns, troubleshooting
agent-browser skills get core --full # include full command reference and templates
The CLI serves skill content that always matches the installed version,
so instructions never go stale. The content in this stub cannot change
between releases, which is why it just points at skills get core.
Snapshot deltas
For repeated snapshots in one tab, use snapshot -i --delta: the first call is full, later calls return unchanged or a compact delta. Keep the same flags between calls; each tab and option set has its own baseline. Apply treeChange to the previous tree; use --full to reset or capture complete state.
Recording guardrails
- Before recording, read the CLI-served recording docs (
agent-browser skills get core --full) and follow the currentrecord start/record stopsequence. - Add
--contact-sheetwhen content briefly appears, disappears, flickers, or changes during an interaction. Inspect the resulting timestamped PNG; use ordinary screenshots for static results and keep video when continuous motion or precise timing matters. - For tiny changes missed by the default sensitivity, lower
--contact-sheet-thresholdusing the CLI-served guidance. - Create the destination directory first and prefer an absolute output path for durable evidence.
- Start recording only after the page or app is loaded enough to produce frames, then perform visible interactions with short pauses.
- Stop the recording promptly, verify the file exists and is non-empty, and do not treat a saved-but-empty or no-frames recording as evidence.
- If the requested proof is a user-visible video, the video must show the claimed visible result; logs or DOM text can support the finding but cannot replace the visible result.
Specialized skills
Load a specialized skill when the task falls outside browser web pages:
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
agent-browser skills get derive-client # Record a HAR, derive a standalone API client for a site
agent-browser skills get vercel-sandbox # agent-browser inside Vercel Sandbox microVMs
agent-browser skills get protected-vercel-deployments # Access protected Vercel deployments
agent-browser skills get agentcore # AWS Bedrock AgentCore cloud browsers
Run agent-browser skills list to see everything available on the
installed version.
Local references
The CLI-served content is authoritative. These local copies match v0.39.1 and are useful when you want a quick read without running the CLI:
- authentication.md — login, saved state, OAuth/SSO, 2FA.
- session-management.md — named sessions, state, cleanup.
- snapshot-refs.md — snapshots, refs, troubleshooting.
- commands.md — full command reference and the delta contract.
- streaming.md — live viewport streaming over WebSocket.
- webgpu.md — WebGPU launch preset for screenshots and video.
- proxy-support.md — HTTP/SOCKS proxies.
- video-recording.md — WebM/MP4 evidence capture.
The templates/ directory holds copy-paste scripts for authenticated sessions, capture workflows, and form automation.
Why agent-browser
- Fast native Rust CLI, not a Node.js wrapper
- Works with any AI agent (Cursor, Claude Code, Codex, Continue, Windsurf, etc.)
- Chrome/Chromium via CDP with no Playwright or Puppeteer dependency
- Accessibility-tree snapshots with element refs for reliable interaction
- Sessions, authentication vault, state persistence, video recording
- Specialized skills for Electron apps, Slack, exploratory testing, cloud providers
Observability Dashboard
The dashboard runs independently of browser sessions on port 4848 and can also be opened through a proxied or forwarded URL such as https://dashboard.agent-browser.localhost. Agents should stay on the dashboard origin: session tabs, status, and stream traffic are proxied internally, so session ports do not need to be exposed.