agent-browser
Originally fromvercel-labs/agent-browser
Installation
SKILL.md
Browser Automation with agent-browser
MANDATORY: Always use the
agent-browserCLI for browser automation — do NOT use MCP chrome-devtools tools. To reuse an existing Chrome session, preferagent-browser connect "${AGENT_BROWSER_CDP_PORT:-9222}"so later commands stay attached to the same browser; use--cdp <port>or--auto-connectfor one-off calls.
Core Workflow
Every browser automation follows one of these patterns:
- Fresh browser:
agent-browser open <url>when the user wants a new ephemeral browser. - Reuse existing Chrome (preferred for logged-in state and fewer browser instances):
agent-browser connect "${AGENT_BROWSER_CDP_PORT:-9222}" - Snapshot:
agent-browser snapshot -i(get element refs like@e1,@e2) - Interact: Use refs to click, fill, select
- Re-snapshot: After navigation or DOM changes, get fresh refs