Agent Browser -- Browser Automation for Agents
Browser automation CLI for AI agents. Use it when a shell agent needs compact browser snapshots, screenshots, interactions, React introspection, Web Vitals, or batch browser checks.
Official docs describe agent-browser as a native Rust browser automation CLI with compact text output and Chrome/Lightpanda engines. Source: agent-browser.dev, https://agent-browser.dev/, 2026-06-18
As of the 2026-07-04 source check, agent-browser is still 0.31.1 on npm, the GitHub main branch and v0.31.1 tag both resolve to ed2e10598c9064aecfaeb7cf21b540684db4be2c, and GitHub lists 37,781 stars. Source: npm registry, 2026-07-04; GitHub vercel-labs/agent-browser, 2026-07-04
The v0.27 bookmark is the feature provenance for agent-browser's React/Web Vitals lane. It introduced react tree, react inspect, render recording/profiling, Suspense analysis, framework-agnostic vitals, and batch command usage for React/Next/SPAs. The current README still preserves the same boundary: React commands require launch with --enable react-devtools, while Web Vitals and pushstate are framework-agnostic. Source: X/@ctatedev and self-thread, 2026-05-07; Source: GitHub vercel-labs/agent-browser, 2026-07-04
Guillermo Rauch's March 2026 bookmark is provenance for agent-browser becoming a Vercel/agent-stack primitive, not a separate feature announcement. The linked source still resolves to agent-browser.dev; the durable content is that Vercel leadership amplified Chris Tate's browser automation surface before the later MCP, session, and doctor rows. Source: X/@rauchg, 2026-03-12; Source: agent-browser.dev, checked 2026-07-04
Routing Summary
Use agent-browser as Kevin's default browser automation surface for agent-driven browsing, screenshots, scraping, forms, UI QA, logged-in Chrome work, React/perf checks, and browser state. Use Playwright only for committed regression tests or existing suites; use browser-harness only for screenshot-first self-healing flows where that harness is the point.
Current Role
agent-browser is Kevin's default CLI browser automation tool for shell-agent loops. It is not the only browser tool. Route by task:
| Task | First choice |
|---|---|
| deterministic E2E suite | Playwright |
| visual real-Chrome exploratory QA | browser-harness / Chrome session tooling |
| token-efficient snapshots and batch checks | agent-browser |
| computed styles/box model in existing Chrome | Chrome DevTools MCP |
| MCP-first browser slot | agent-browser MCP when available |
The point is not "agent-browser always." The point is "use the browser capability that matches the verification job."
Version 0.31 adds durable session memory for browser agents: stable worktree-scoped sessions, auto-restore, validation checks, transactional saves, and diagnostics. That matters for Kevin's localhost/UI loop because browser state can now be tied to the worktree rather than rediscovered every run. Source: X/@ctatedev, 2026-06-27
Agent Loop Toolchain
Chris Tate's June 2026 source row groups agent-browser with three adjacent Vercel Labs primitives: Portless for named local URLs across worktrees, Emulate (Vercel-labs) for no-network third-party API emulation, and AI CLI (Vercel) for terminal-native text/image/video generation. The durable pattern is an agent-native dev loop: verify UI changes in a real browser, give every worktree a stable URL, replace external APIs with local stateful services, and keep generation tasks callable from the shell. Source: X/@ctatedev, 2026-06-21; Source: resolved links reviewed 2026-07-03
Why It Matters
Agent-browser is designed for machine operators:
- compact accessibility-tree snapshots with stable refs
- command-line composition and batch execution
- screenshots and diffs
- React component introspection
- Web Vitals / hydration checks
- Chrome and Lightpanda engines
- cloud providers for scale or environment needs
- security controls for output boundaries, allowed domains, action policies, and confirmations
- plugin system for third-party integrations
GitHub listed the repo at 36.4K stars on 2026-06-18, which makes it a major browser-agent infrastructure project, not a niche toy with a README and a dream. Source: vercel-labs/agent-browser GitHub, https://github.com/vercel-labs/agent-browser, 2026-06-18
CLI Workflow
Basic loop:
agent-browser open https://example.com
agent-browser snapshot -i
agent-browser click @e2
agent-browser fill @e3 "kevin@example.com"
agent-browser snapshot -i
Use batch when the sequence is known:
agent-browser batch "open http://localhost:3000" "snapshot -i" "screenshot"
Re-snapshot after page changes. Refs are stateful to the current snapshot.
MCP Interface
agent-browser also exposes an MCP interface. Use it when the harness is MCP-first or a desktop/IDE agent has a browser MCP slot but not convenient shell control. In shell-driven Codex/Claude Code/Cursor loops, the CLI remains cheaper and easier to compose.
This is the Agent-Native CLIs principle in practice: one capability, multiple interfaces, route by harness.
The reviewed launch artifact shows why the MCP form matters: the agent UI presents explicit browser-tool permission cards for "Run Agent Browser Screenshot" and "Run Agent Browser Snapshot," including allowlist controls and a run button. That makes it a better fit for hands-on IDE loops where the user wants to approve browser actions instead of delegating a fully shell-driven batch. Source: local artifact wiki/assets/x-bookmarks/2066944888176849214/image-01.jpg, reviewed 2026-07-03
Engines
- Lightpanda: fast default for simple browsing and snapshots.
- Chrome: required for auth-heavy flows, profiles, extensions, file access, and browser states.
- Cloud providers: use when scale, geo/IP, or bot-detection constraints require it.
Security Controls
The upstream repo documents opt-in security controls:
export AGENT_BROWSER_CONTENT_BOUNDARIES=1
export AGENT_BROWSER_MAX_OUTPUT=50000
export AGENT_BROWSER_ALLOWED_DOMAINS="example.com,*.example.com"
export AGENT_BROWSER_ACTION_POLICY="./agent-browser-policy.json"
export AGENT_BROWSER_CONFIRM_ACTIONS="payment,email,delete"
Use them when the browser can touch authenticated, destructive, or sensitive surfaces.
Verification Patterns
Frontend check:
agent-browser batch "open http://localhost:3000" "snapshot -i" "screenshot" "vitals"
After edits:
agent-browser diff snapshot
agent-browser diff screenshot --baseline before.png
agent-browser react renders
Auth fallback:
agent-browser --engine chrome --session-name myapp open https://app.example.com
Doctor Command
agent-browser doctor is the environment sanity check. The reviewed terminal artifact shows checks for environment, Chrome, daemons, config, providers, network, and launch test; the daemon row warns while cleaning one stale daemon, then the launch test passes in 2.2s. Pair it with --fix when a browser loop fails before blaming the app under test. Source: local artifact wiki/assets/x-bookmarks/2044927187476677115/image-01.jpg, reviewed 2026-07-04
When Not To Use It
- Do not replace committed Playwright E2E suites with ad-hoc snapshots; use agent-browser to discover and prove, then Playwright to gate.
- Do not use it as a stealth scraper when the site blocks headless browsers; route to Web Scraping Stealth (TLS Fingerprinting & Anti-Bot Evasion).
- Do not use MCP if the shell CLI is available and token budget matters.
- Do not trust browser output from an unbounded domain without output limits.
Timeline
-
2026-07-04 | Promoted agent-browser from one browser option to Kevin's default agent browser substrate: browser interactions, screenshots, scraping, logged-in Chrome work, React/perf checks, and UI QA start here; Playwright is retained as the committed regression-test ratchet. Source: User request, 2026-07-04; agent-browser docs
-
2026-07-04 | Deep-reviewed the
agent-browser doctorterminal artifact and refreshed source state: npm0.31.1,main/v0.31.1ated2e10598c9064aecfaeb7cf21b540684db4be2c, GitHub 37,781 stars. Source: X/@ctatedev, 2026-04-16; GitHub/npm, 2026-07-04 -
2026-07-04 | Reviewed the v0.31 durable-session image artifact. The card shows the new restore/namespace/scope surface (
--restore [name],--namespace <name>,--scope worktree|cwd|git-root), confirming the session-memory claim is CLI-level state routing rather than only product copy. npm remains0.31.1; GitHubmainremainsed2e10598c9064aecfaeb7cf21b540684db4be2cwith Apache-2.0 and 37,813 stars. Source: X/@ctatedev, local image artifact, npm registry, GitHub, 2026-07-04 -
2026-07-04 | Source-reviewed Guillermo Rauch's March agent-browser bookmark. The resolved link remains
agent-browser.dev; row is provenance for agent-browser's Vercel/agent-stack placement rather than a new feature surface. Source: X/@rauchg, 2026-03-12; Source: agent-browser.dev, checked 2026-07-04 -
2026-07-03 | Deep-reviewed the agent-loop toolchain row that links agent-browser, Portless, Emulate, and AI CLI as a cohesive Vercel Labs loop for browser verification, stable worktree URLs, local API emulation, and terminal generation. Source: X/@ctatedev, 2026-06-21
-
2026-07-03 | Deep-reviewed the agent-browser MCP launch artifact and refreshed source state: npm
0.31.1,main/v0.31.1ated2e10598c9064aecfaeb7cf21b540684db4be2c, GitHub around 37.8K stars. Source: X/@ctatedev, 2026-06-16; GitHub/npm, 2026-07-03 -
2026-06-18 | Refreshed from official docs/GitHub: clarified CLI vs MCP routing, security controls, engines, verification patterns, and current 36.4K-star ecosystem position. Source: agent-browser.dev, https://agent-browser.dev/, 2026-06-18; vercel-labs/agent-browser, https://github.com/vercel-labs/agent-browser, 2026-06-18
-
2026-06-28 | Added v0.31 durable session memory: worktree-scoped sessions, auto-restore, validation checks, transactional saves, and diagnostics. Source: X/@ctatedev, 2026-06-27
-
2026-06-16 | agent-browser MCP became available: same automation exposed as MCP tools for IDE/desktop agents. Captured as "both from one spec" interface. Source: X/@ctatedev, 2026-06-16
-
2026-05-25 | Microsoft Webwright surfaced as a complementary terminal-native web-agent framework. Source: X/@mr_r0b0t, 2026-05-25
-
2026-05-07 | v0.27 launch thread foregrounded React introspection, Web Vitals, and batch commands for Next.js/React/SPAs. Current source review confirms
--enable react-devtoolsis required for React subcommands, whilevitalsstays framework-agnostic. Source: X/@ctatedev and self-thread, 2026-05-07; Source: GitHubvercel-labs/agent-browser, 2026-07-04