Skip to main content
Back to timeline
vercel-labs/agent-browserSource publication:

Vercel Labs ships agent-browser: AI agents drive a browser one shell command at a time, and a blocked click fails instead of reporting success

Synopsis

Vercel Labs has released agent-browser, a native Rust command-line tool that lets an AI agent drive a browser one shell command at a time. Previously an agent had to work from the whole page; now snapshot returns the page as compact text with a ref such as @e1 for each element, and the agent acts on a ref, reads the page again to check the result, and repeats. The browser stays open between commands, so each step is one short shell call, and a click fails rather than reporting success when the target is hidden, disabled, outside the viewport, or covered.

Source-provided article image: vercel-labs / agent-browser
GitHub Trending

Interpretation

An AI agent now drives a persistent browser one command at a time from the shell, instead of reading a whole page in one pass. Previously the agent faced the full page content and had to locate actionable elements itself. The snapshot returns page text with a ref such as @e1 attached to each element; the agent clicks that ref, reads the page again to check the result, and repeats.

Each command goes to a background daemon that controls the browser over the Chrome DevTools Protocol. The daemon starts on the first command, and each --session gets its own daemon and browser. By default the daemon closes a headless browser and exits after one hour without commands, saving state first when session persistence is configured.

A click fails instead of reporting success when the target is hidden, disabled, outside the viewport, or covered by another element such as a consent banner. After a failure, the covering element must be dismissed, a new snapshot taken, and the click retried. Refs describe the page at the time of the snapshot, so after navigation or a DOM change a new snapshot is required before refs can be used again.

Perspective

The tool targets AI-agent users who need to drive a browser from the shell; the material shows an example.com snapshot excerpt and the command flow of open, snapshot, click, get url and close.

Refs are valid only at the time of the snapshot, so a new snapshot is required after navigation or a DOM change; a click fails when the target is hidden, disabled, outside the viewport, or covered, and the covering element must be handled before retrying.