Agent Browser: Deterministic Web Automation
Headless browser automation for AI agents using accessibility tree snapshots and ref-based element selection, enabling fast and reliable web interactions.
The skill document provides clear usage boundaries (when to use agent-browser vs built-in browser tool) and mentions session isolation and state persistence, but lacks details on least privilege, user confirmation, data-flow transparency, or sensitive-data handling. As a wrapper around a CLI tool, no malicious or overreaching risks found, but security guidance is missing, deducting to 15.
Document includes installation commands, core workflow, and many command examples, but no tests or error-handling instructions; static review cannot verify actual operation. Deducted to 6.
Clearly describes applicable scenarios (complex SPAs, multi-step workflows) and non-applicable scenarios (needing screenshots/PDFs), trigger conditions are clear. But no mention of environment dependencies (e.g., network access) or Chinese language support, and core function depends on an external CLI tool, limiting applicability. Deducted to 10.
Documentation is well-structured with installation notes, command examples, and best practices, but lacks versioning, changelog, troubleshooting, or known limitations; maintenance responsibility unclear due to dependency. Deducted to 9.
Shows two examples (search & extract, multi-session testing) but no actual outputs or verification; static review cannot confirm direct usability. Deducted to 5.
Document is purely author description without tests or other verification evidence; static review cannot independently confirm functionality. Deducted to 4.
- Skill depends on external CLI tool agent-browser; its availability and security are not verified in the document.
- No mention of sensitive data handling, credential storage, or network request security; users must evaluate these themselves.
- No troubleshooting guide, making it hard to diagnose issues.
- Documentation is in English; Chinese users may need translation, and mainland China network reachability is not addressed.
- Static review; not executed, reliability needs further verification.
What does this skill do, and when should you use it?
This skill wraps the agent-browser CLI tool to provide fast, deterministic browser automation. It generates element refs from accessibility tree snapshots, avoiding brittle CSS selectors. It supports multi-tab, iframe, network interception, cookie and storage management, session isolation, and state persistence. The skill is ideal for complex single-page applications (SPAs) and multi-step workflows requiring stable, repeatable interactions.
Performs headless browser operations including: opening/navigating/back/forward/reloading/closing pages; generating accessibility tree snapshots (interactive elements, JSON output, scoped to selector); clicking, filling, typing, hovering, checking/unchecking, selecting, pressing keys, scrolling, and dragging via refs; getting text, html, value, attributes, title, URL, and element count; checking element visibility, enabled state, and checked state; waiting for elements, delays, text, URL, network idle, or custom function; creating and managing isolated browser sessions; saving and loading auth state (cookies and storage); taking screenshots and generating PDFs; intercepting and mocking network routes; managing cookies and localStorage; switching tabs and iframes.
- Automating multi-step web form submissions, such as registration or checkout flows, requiring stable and deterministic element selection.
- Scraping data from websites requiring login, by saving and loading auth state to avoid repeated logins.
- Testing user flows in complex single-page applications (SPAs) like internal dashboards, where DOM updates frequently.
- Handling multiple user sessions (e.g., admin and user) simultaneously for parallel browser testing.
- Mocking API responses via network interception for frontend development or testing without a backend service.
What are this skill's strengths and limitations?
- Ref-based selection is more stable than CSS selectors, resistant to DOM changes
- Lightweight with only a Node.js CLI and Chromium dependency
- Supports session isolation and state persistence to skip login flows
- Network interception and mocking capabilities for versatile testing
- Accessibility tree snapshots output JSON for easy parsing, AI-agent friendly
- Requires installation and download of Chromium, which may consume significant disk space
- Chromium-only; does not support other browser engines
- Documentation does not mention Windows support (installation commands include Linux-specific `--with-deps`)
- Smaller ecosystem and community compared to other automation tools
- Headless mode may require additional wait logic for complex pages to ensure stability
How do you install this skill?
Install the agent-browser CLI globally: npm install -g agent-browser. Then run agent-browser install to download Chromium (add --with-deps on Linux for system dependencies). This skill requires no special installation beyond ensuring the command is available in your PATH.
How do you use this skill?
Invoke agent-browser commands as a tool. Typical workflow: first agent-browser open <url>, then agent-browser snapshot -i --json to get interactive element snapshot and parse refs, then interact with agent-browser click @e2 or agent-browser fill @e3 "text". Re-snapshot after page changes. Best practices: always use -i --json flags, wait for stability (wait --load networkidle), use sessions to isolate contexts, and save auth state with state save/load. Use --headed for debugging.