agent-browser
$ agent-browser Official Med Riskagent-browser drives headless browsers via compact accessibility-tree snapshots and deterministic element refs (@e1, @e2) instead of brittle CSS selectors or heavy screenshots. Designed natively for AI agents with --json output and kebab-case flags.
npm install -g agent-browser Built specifically to outperform bloated browser MCP schemas by returning compact @e accessibility snapshots and --json directly in bash.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Purpose-built for AI coding agents: accessibility @e refs, --json output, bounded maxOutput config, and official agent skills.
- Native
--jsonoutput, accessibility@erefs, andagent-browser.jsonschema
Local-first execution with restricted project-local ./agent-browser.json keys, though browser navigation can execute untrusted page JS and submit forms.
- Local config restricts untrusted keys; headless browser executes page scripts
Easy npm install with Rust native binary, though still requires Chromium (local or remote provider) to drive pages.
- Distributed via npm (
agent-browser), requires Chromium runtime
Accessibility snapshots consume a fraction of the tokens required by raw DOM dumps or repeated screenshots.
- Compact
@e1ref snapshots shrink browser context footprint
Official Vercel Labs repository (vercel-labs/agent-browser) under Apache-2.0.
- Official
vercel-labs/agent-browserrepository
Thorough README, JSON schema (agent-browser.schema.json), and agent skill instructions.
- Published JSON schema and docs at agent-browser.dev
Security, Auth & Guardrails
Stores optional session profiles/cookies locally under ~/.agent-browser/ or configured paths; no cloud auth required.
Free, Apache-2.0 open-source CLI; uses local Chromium or optional remote browser providers.
# agent-browser Agent Rules - Always re-run `snapshot -i --json` after navigation or clicks so `@e` element refs stay fresh. - Use `--` before literal text in `fill`/`type` (e.g. `fill @e2 -- "--flag"`) and close sessions when done.
Agent-Ready Command Recipes
Safe Read-Only Queries
agent-browser open http://localhost:3000 && agent-browser snapshot -i --json
Navigates headlessly and prints compact interactive @e element refs as JSON.
Controlled Writes & Previews
agent-browser fill @e2 -- 'test-query'
Types into the referenced form field (-- prevents option-shaped text from parsing as flags).
Strengths for Agents
- + Purpose-built
@e1accessibility tree snapshots save huge numbers of LLM tokens. - + First-class
--jsonoutput and strict kebab-case CLI flags. - + Restricts local
./agent-browser.jsonkeys for safer repo-level defaults.
Caveats & Pitfalls
- ! Maintains stateful background browser daemon sessions that should be closed explicitly.
- ! Requires local Chromium or an external browser provider.