The problem · your AI builds BLIND
This happens to everyone who builds with AI, and almost nobody notices it: the AI generates a screen, a form, a flow… and tells you "done, it works." But did it open it to see? No. The AI writes the code and assumes it's fine — it has no eyes to check. It's like a cook who plates the dish without tasting it. Sometimes it comes out right; other times, the button does nothing, the login is broken, or the image doesn't load — and you're the one who finds out, in production, in front of a customer.
What is agent-browser? · your AI's eyes
agent-browser is an open-source tool from Vercel that gives your AI agent the ability to drive a real browser: open your app, see what's on screen, click, type in fields, fill out forms, take screenshots, and read errors from the console. In plain terms: it gives it eyes and hands in the browser. No more guessing; now it checks.
Benefit #1 · make it validate constantly (not blind)
This is the use that changes how you work: you ask your AI to, every time it builds something, open it and validate it itself before telling you it's done. It built a login → have it register with a test account and confirm it gets in. It made a form → have it fill it out and verify it submits. It changed a screen → have it open it and check that it looks right and there are no console errors. You go from "I think it works" to "I tested it and it works."
Benefit #2 · it opens up a world of possibilities
Giving your AI eyes isn't just for validating your own work. With a browser at its disposal, it can do a lot more:
- Validate your app end-to-end: register, navigate, test your key flow, and report what breaks.
- Pull information from websites (prices, data, listings) and bring it back to you neatly organized.
- Fill out repetitive forms and automate tedious browser tasks.
- Research: open several pages, read them, and summarize what matters.
- Reuse your session: if you're already logged into Chrome, it can work with that session (with your permission).
What makes it special (no jargon)
Unlike traditional automation tools (like Playwright), agent-browser is built for AI agents: instead of reading the whole page (which burns tons of tokens), it gives the AI a compact "map" of the elements it can interact with. That means cheaper and faster for your agent. It's open-source, from Vercel, with a permissive license.
agent-browser from Vercel — a browser automation CLI built for AI agents. It gives your agent (Claude Code, Cursor, Codex) eyes and hands in the browser: open, see, click, fill, extract, validate. It uses accessibility-tree snapshots (token-efficient) and comes with an MCP server. Open-source.
How to install it (you need a coding agent)
You install it on your computer with a command, and the first time it downloads its browser. Then your AI agent uses it. (There are several ways — npm is the most common.)
npm install -g agent-browser agent-browser install
brew install agent-browser) and Cargo if you prefer.Prompt 1 · Make it validate EVERYTHING it builds (the golden rule)
This is the prompt that changes how you work. Paste it into your agent so it stops building blind:
You have agent-browser installed. From now on, do NOT tell me something "works" without having checked it yourself in the browser with agent-browser. Every time you build or change something in the interface: 1. Open my app (it runs at [your URL, e.g. http://localhost:3000]) with agent-browser. 2. Navigate to what you just built or changed. 3. Test it like a real user: click, fill in the fields, complete the key flow [describe your flow, e.g. "register → get into the dashboard"]. 4. Check that it looks right and that there are NO errors in the browser console. 5. If something is broken or looks off, fix it and validate again, until it truly works. 6. Only then tell me "done," and tell me what you validated and what you saw. Golden rule: no interface task is considered finished without validating it in the browser. Don't build blind.
Prompt 2 · Automate / pull info from the web
To take advantage of the other superpower — browsing and automating — this prompt asks your AI to use agent-browser for a specific web task:
Use agent-browser for this web task, step by step: I want you to [describe your task, e.g.: "open this page [URL], pull the list of products with their prices, and bring them to me in a neatly organized table" / "go into my [service] dashboard and tell me the status of X" / "fill out this form with this data"]. 1. Open the page and take a snapshot to see which elements you can interact with. 2. Do the task step by step, checking at each step that the correct element is there. 3. If I need to log in, tell me how to store my credentials securely (agent-browser has an encrypted vault; never put my passwords in plain text). 4. Give me the result neatly organized and tell me if anything couldn't be done.
.gitignore, never to GitHub. (This ties into the security guide in the series.)