← Back to the library

REPOVibe coding

agent-browser: let your coding agent open, click and screenshot your pages

A free command-line browser from Vercel Labs built for AI agents. Your agent opens a page, reads it, clicks and types, takes screenshots at phone width and lists page errors.

WHAT YOU’LL GET

Your agent checks its own work in a real browser, with screenshots and error lists, before it tells you a page is done.

WHO IT’S FOR

Builders whose agent says a page is finished without ever looking at it, and anyone testing forms or flows by hand.

DIFFICULTY

Intermediate

TIME

About 15 minutes

WORKS WITH

Claude Codex

Get the full file

The whole resource as one Markdown file for your notes or your AI workspace.

FREEOpen on GitHub

What it does

A coding agent that edits your website usually never sees the result. It changes the code, the build passes, and it tells you "done". Then you open your phone and the menu covers the headline.

agent-browser is a browser your agent drives by typing commands. It opens a page, reads it as a short list of elements with labels such as @e2, clicks and fills by those labels, takes screenshots and reports page errors. It comes from Vercel Labs and is written in Rust, so it starts fast.

The agent-browser CLI and skill are installed on my own machine.

What you need first

  • Node.js (for the npm install) or Homebrew on a Mac.
  • About 15 minutes, most of it for the one-time Chrome download.
  • A page to check. Your local dev server is ideal.
  • agent-browser is free, but you drive it through a coding agent such as Claude Code or Codex, which may need a paid plan.

Install (checked 30 Sep 2026)

In a terminal:

npm install -g agent-browser

then:

agent-browser install

The second command downloads Chrome for Testing, Google's browser build for automation, the first time only. On a Mac, brew install agent-browser followed by agent-browser install also works.

Then tell your agent about it. The README's route for Claude Code, Codex, Cursor and others is:

npx skills add vercel-labs/agent-browser

We ran that on a throwaway project on 30 Sep 2026. It added a small agent-browser skill to the project's .claude/skills folder; the skill tells the agent to load the full instructions from the installed tool, so they match your version.

First use

Try it yourself once so you know what the agent sees. With your site running locally (the README's commands):

  1. agent-browser open http://localhost:3000
  2. agent-browser snapshot prints the page as a list of headings, links and buttons, each with a label like @e1.
  3. agent-browser set viewport 390 844 switches to phone size.
  4. agent-browser screenshot home-phone.png saves what a phone visitor sees.
  5. agent-browser errors lists JavaScript errors on the page.
  6. agent-browser close

What we actually ran on 30 Sep 2026: the same sequence against a local test file opened with a file:// address rather than a dev server, with the version installed on my machine (0.22.3; the current release is newer). The snapshot listed the page's heading and text with labels, the phone screenshot saved, and the error list was empty.

Then hand it to your agent:

How it chains with other library skills

Watch-outs

  • Licence: Apache-2.0.
  • It can act, not just look. The same tool can fill forms, click Buy and send messages on real websites. Keep it on your own pages, and make your agent ask before it submits, pays, posts or sends anything.
  • Logins. It can save and reuse login sessions. Do not give it your bank, email or admin logins to "test".
  • Screenshots show how it looks, not that it works. A screenshot proves the page renders at that size. To check the main action, have the agent click it and fill the form with made-up data (the README's click and fill commands), and confirm where it ends up.
  • Customer information in snapshots. Snapshots and screenshots go into your coding agent's AI model. Point it at pages with test data, not at an admin screen or inbox full of real customer details.
  • Screenshots are not proof it sells. Whether the page brings enquiries is something only real visitors can tell you.

github.com/vercel-labs/agent-browser, by Vercel Labs, Apache-2.0. This page is our own summary; check the README for the full command list.