Use agent-browser for ordinary browser automation where the agent can own an
isolated Chrome session:
- open a URL, inspect the page, click/fill/type/select/upload/scroll
- take screenshots, PDFs, traces, videos, console logs, and page errors
- extract visible text, HTML, attributes, URLs, counts, boxes, styles, cookies, storage, and network requests
- test local web apps with repeatable, command-line browser steps
- run exploratory QA or bug hunts
- automate Electron or Slack when the specialized
agent-browser skills get ...content says to do so
Runtime
Installed CLI:
agent-browser --version
agent-browser skills get core
agent-browser skills list
Current installation source: npm global package agent-browser@0.26.0 at
~/.npm-global/bin/agent-browser.
Core Loop
agent-browser open <url>
agent-browser snapshot -i
agent-browser click @e3
agent-browser snapshot -i
Refs such as @e3 are fresh per snapshot. Re-snapshot after navigation, form
submit, render changes, dialogs, or tab switches.
If the page loads but basic browser calls time out, treat the rendered app as
untrusted but inspectable: fetch the entry HTML, extract bundled JS assets,
search route strings, and reproduce only the requested UI flow through same-origin
API calls with verification. See references/react-app-api-fallback.md.
For Web3 wallet-gated flows, use isolated browser automation only for reconnaissance, then switch to a real Chrome session with wallet extensions via Browser Relay/CDP. See references/web3-wallet-gated-flows.md.
Prefer this order:
snapshot -iand@erefs.- Semantic locators:
find role,find text,find label,find testid. - CSS selectors.
eval --stdinfor structured extraction or page-specific JS.
Thinking Triggers
Route here when the reasoning step sounds like:
- "Need to actually open the page and look at the DOM"
- "Take a screenshot/page snapshot first"
- "Use the accessibility tree to find buttons"
- "I need to click/fill/submit a form"
- "Need to smoke-test a local web app"
- "Need to confirm whether the UI actually renders"
- "Use a browser to get page text/links/tables"
- "Electron/Slack might be automatable with a browser"
Boundaries
- If the user says current browser, real Chrome, logged-in state, reuse login state, my browser,
or wants an already-open tab, route first to
devops/badboy-br-aa-routing. Use a npm-globalbrowser-relayroute only after its binary and MCP wrapper are confirmed present. - For Web3 sites that require wallet extensions (MetaMask, Phantom, Trust, Coinbase Wallet), isolated agent-browser sessions often cannot complete the flow. Use agent-browser for reconnaissance, but switch to real Chrome via Browser Relay/CDP before connecting wallets, signing, claiming points, or submitting wallet-gated contributions.
- If the task is front-end signature tracing, JS hook injection, CDP debugger
breakpoints, AST/source-map/deobfuscation, WASM, or crypto detection, route
first to
devops/jshookmcp. - If the target is web-novel rank scanning or the oh-story browser-CDP workflow,
prefer the more specific
comm/oh/browser-cdp.
Use agent-browser close or agent-browser close --all when the browser
session is no longer needed.