Back to Skills

agent-browser-automation

Headless browser automation CLI for AI agents using native Rust binary with Chrome DevTools Protocol

42stars10forksUpdated 6/18/2026

Security Assessment

Safe(100/100)
Security Score100/100

About agent-browser-automation

agent-browser is a headless browser automation CLI built in Rust that provides AI agents with fast, ergonomic control over Chrome through the Chrome DevTools Protocol (CDP). Unlike traditional browser automation tools that require Node.js runtimes or heavy frameworks like Playwright, agent-browser delivers a lightweight native binary that AI agents can invoke directly from the command line. It solves the challenge of giving AI systems reliable, structured access to web content and interactions without the overhead of JavaScript-based automation stacks.

The tool's standout feature is its accessibility snapshot command, which returns a structured tree of page elements with @ref identifiers that AI agents can directly reference in subsequent commands. This approach eliminates the fragility of CSS selectors and XPath queries. Core capabilities include navigation, form filling, clicking, typing, screenshot capture, PDF generation, network interception, cookie management, and JavaScript execution. The CLI supports both single commands and batch operations via JSON input, making it suitable for both interactive debugging and programmatic automation workflows.

Primary use cases include web scraping for AI agents, automated testing workflows, form automation, content extraction, and browser-based data collection pipelines. The tool targets AI systems that need deterministic browser control, developers building automation scripts without JavaScript dependencies, and teams seeking a minimal-footprint alternative to Selenium or Puppeteer. It's particularly valuable in environments where Rust's performance and reliability matter, such as high-throughput scraping operations or resource-constrained deployment targets.

FAQ

Do I need Node.js or Python installed to use agent-browser?

No. agent-browser is a native Rust binary with no JavaScript or Python runtime dependencies. You can install it via npm for convenience, but it runs as a standalone executable. The only requirement is Chrome for Testing, which agent-browser can download automatically with the 'agent-browser install' command.

How do @ref identifiers work in accessibility snapshots?

When you run 'agent-browser snapshot', the tool generates an accessibility tree with unique @ref IDs like @e1, @e2, @e3 for each interactive element. You can then use these refs directly in commands like 'agent-browser click @e2' or 'agent-browser fill @e3 "text"' without writing CSS selectors or XPath queries. This makes automation more reliable since refs are stable within a single snapshot.

Can I run multiple browser commands in a single invocation?

Yes. Use the batch command with a JSON array of operations: 'agent-browser batch commands.json'. This is more efficient than spawning separate processes for each action and maintains browser state across all commands in the batch.

Does agent-browser support headful mode for debugging?

Yes. Use the --headful flag when opening the browser: 'agent-browser open https://example.com --headful'. This launches Chrome with a visible window so you can see what the automation is doing in real-time.

What platforms are supported?

agent-browser supports macOS, Linux, and Windows. On Linux, you may need to install system dependencies for Chrome; use 'agent-browser install --with-deps' to handle this automatically. The tool can be installed via npm (cross-platform), Homebrew (macOS), or Cargo (Rust toolchain).

Install agent-browser-automation

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill