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.
When to use it
Section titled “When to use it”- 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.
Core workflow
Section titled “Core workflow”agent-browser open https://example.comagent-browser snapshot -i # interactive elements with refsagent-browser click @e1agent-browser wait --load networkidleagent-browser snapshot -i # re-snapshot after DOM changeThe 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.
Chaining
Section titled “Chaining”A background daemon keeps the browser alive between calls, so commands can be chained with && when you do not need intermediate output:
agent-browser fill @e1 "user@example.com" && \ agent-browser fill @e2 "password123" && \ agent-browser click @e3Chain when output is irrelevant. Run separately when you need to parse a snapshot before deciding the next action.
Setup check
Section titled “Setup check”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:
npm view agent-browser versionWhat this is not
Section titled “What this is not”- 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.
Common pitfalls
Section titled “Common pitfalls”- Forgetting to re-snapshot after a click or form submission — refs become stale.
- Treating
--headedas 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.