agent-browser

Automate headless browser interactions using element refs from accessibility tree snapshots.

1|Updated May 6, 2026
One-click install
npx skills add https://github.com/surfingalien/FinSurfing --skill agent-browser-surfingalien
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-browser
Source: https://github.com/surfingalien/FinSurfing/tree/main/.claude/skills/agent-browser
Command: npx skills add https://github.com/surfingalien/FinSurfing --skill agent-browser-surfingalien

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually scripting browser automation with fragile CSS selectors breaks whenever page layouts change, and raw DOM dumps overwhelm LLM context windows. This Skill provides a CLI that exposes stable element references (@e1, @e2) derived from accessibility trees, making browser control deterministic and readable for AI agents. ## Core Features & Use Cases - Element Ref Automation: Snapshot pages into accessibility trees with stable refs, then click, fill, type, and select elements by ref instead of brittle selectors. - Session Isolation: Run parallel browser workflows with named sessions, JSON output for scripting, and CDP connections to existing Chrome instances. - Network & Capture Tools: Mock API responses, block requests, record video, take screenshots, and export pages as PDF. - Use Case: Automate a login flow, navigate to a reports dashboard, extract table data as JSON, and capture a verification screenshot — all from shell commands an AI agent can reason about. ## Quick Start Ask the agent to open a URL with agent-browser, take an interactive snapshot to get element refs, then fill the login form and click submit.

Frequently Asked Questions about agent-browser

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate browser interactions with agent-browser?

Open a URL with agent-browser open, then run snapshot -i to get interactive elements with refs like @e1 and @e2. Use click, fill, and type commands against those refs, and re-snapshot after any navigation since refs become stale when the DOM changes.

How do I fill out and submit a web form programmatically?

Snapshot the page to find form field refs, focus each field, then use fill to clear and enter text. Click the submit button ref, wait for navigation, and verify the result with get url, get value, or a screenshot.

Can I run multiple browser sessions in parallel?

Yes, use the --session flag with unique names to isolate browser instances, or set the AGENT_BROWSER_SESSION environment variable. List active sessions with session list and clean up with session kill or close.

Why does my element ref stop working after clicking?

Element refs are only valid for the current DOM snapshot and become stale after navigation, reloads, or dynamic content updates. Re-run snapshot -i after any page change to get fresh refs before interacting again.

Can agent-browser mock API responses for testing?

Yes, use network route with a URL pattern and --body to mock responses, or --abort to block requests like analytics. You can also inspect captured traffic with network requests and set auth headers via the --headers flag.

What are the requirements to install agent-browser?

You need Node.js 18 or later or the Bun runtime, plus Chromium installed via agent-browser install. On Linux, use install --with-deps to fetch system dependencies, and verify with agent-browser --version.