agent-browser

Automate browser interactions via a CLI using Chrome DevTools Protocol and accessibility-tree snapshots.

78|27|Updated May 4, 2024
One-click install
npx skills add https://github.com/fedixyz/fedi --skill agent-browser-fedixyz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-browser
Source: https://github.com/fedixyz/fedi/tree/main/.agents/skills/agent-browser
Command: npx skills add https://github.com/fedixyz/fedi --skill agent-browser-fedixyz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires agent-browser, and includes references (resource) and assets (resource) components.

What problem does it solve? Manually testing web apps, filling forms, scraping pages, and verifying UI behavior is repetitive and error-prone. This Skill gives an AI agent a deterministic CLI to drive Chrome/Chromium directly, so any web interaction can be scripted, replayed, and verified. ## Core Features & Use Cases - Page Interaction via Refs: Take compact accessibility-tree snapshots that assign @refs to elements, then click, fill, select, and drag using those refs instead of brittle CSS selectors. - Auth & Session Management: Save and restore cookies/localStorage state, use named isolated sessions, persistent profiles, and an auth vault so logins (including OAuth and 2FA) only happen once. - Capture & Debugging: Take screenshots, export PDFs, record video, capture Chrome performance profiles, view console errors, and route or mock network requests. - Use Case: Run an exploratory QA pass on a staging web app: open the login page, authenticate once, save the session, then navigate key flows while recording video and screenshots as evidence for a bug report. ## Quick Start Ask the agent to open a website with agent-browser, snapshot the page, and click or fill the elements you describe.

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 actions from the command line?

Install agent-browser globally with npm, run agent-browser install, then use commands like open, snapshot -i, click, and fill to drive Chrome. Snapshot assigns @refs to elements so you can interact without writing CSS selectors.

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

Open the form URL, run agent-browser snapshot -i to get element refs, then use fill for text inputs, select for dropdowns, and check for checkboxes. Click the submit button ref and wait for navigation or a success URL to verify.

Does agent-browser support saving login sessions?

Yes. Save cookies and storage with agent-browser state save, restore with state load, or use --session-name for automatic persistence. Persistent Chrome profiles via --profile and an auth vault for credentials are also supported.

Can agent-browser handle OAuth and two-factor authentication?

Yes. For OAuth, follow the redirect flow by waiting for URL patterns and filling each step. For 2FA, launch with --headed so a human completes the challenge, then save the authenticated state for reuse.

Why do I get a ref not found error when clicking elements?

Refs are invalidated whenever the page changes, including navigation and dynamic updates. Re-run agent-browser snapshot -i after any page change to get fresh refs before interacting again.

What are the limitations of agent-browser profiling and recording?

Profiling only works on Chromium-based browsers and caps at 5 million trace events. Video recording outputs WebM, adds slight overhead, and some headless environments may have codec limitations.