Skip to content

Browser

The browser skill wraps Vercel’s agent-browser CLI so flow-next sessions can drive a real browser when the task needs one.

Headless by default, headed on request. Interaction uses ref-based selection (@e1, @e2) drawn from accessibility snapshots so the model is operating on stable identifiers, not on flaky CSS selectors.

  • Verifying a deployed UI change matches the spec.
  • Reading documentation that has no clean text version.
  • Capturing baseline screenshots before a redesign.
  • Logging into a service and pulling structured data.
  • Light e2e probes that do not warrant a full test framework.

For programmatic UI automation across many environments, reach for the project’s own test harness instead. browser is a session tool, not a CI primitive.

Terminal window
agent-browser open https://example.com
agent-browser snapshot -i # interactive elements with refs
agent-browser click @e1
agent-browser wait --load networkidle
agent-browser snapshot -i # re-snapshot after DOM change

The pattern is always: open → snapshot → interact via refs → re-snapshot after the DOM changes. Re-snapshot is not optional; stale refs are the most common failure mode.

A background daemon keeps the browser alive between calls, so commands can be chained with && when you do not need intermediate output:

Terminal window
agent-browser fill @e1 "user@example.com" && \
agent-browser fill @e2 "password123" && \
agent-browser click @e3

Chain when output is irrelevant. Run separately when you need to parse a snapshot before deciding the next action.

Terminal window
command -v agent-browser >/dev/null 2>&1 && agent-browser --version \
|| echo "MISSING: npm i -g agent-browser && agent-browser install"

The CLI iterates quickly. If the installed version is more than a week old, refresh it:

Terminal window
npm view agent-browser version
  • Not a test framework. There is no assertion DSL, no parallel runner, no flake retry.
  • Not a scraper for restricted sites. Respect robots.txt and the target’s terms of service.
  • Not Electron-specific automation. Use it for web; reach for Peekaboo / axe for desktop or simulator UIs.
  • Forgetting to re-snapshot after a click or form submission — refs become stale.
  • Treating --headed as the default — most sessions should stay headless to save resources.
  • Long-running selectors when refs are available — refs are stable across snapshots within a session; selectors are not.