There's a silent problem with almost every AI that builds code: it works blind. It generates a screen, tells you "done, it works"… but it never OPENED it to check. It has no eyes. agent-browser — an open-source tool from Vercel — gives it exactly that: the ability to open your app in a real browser, look at it, click, fill out forms, confirm it actually works, and tell you what's broken. You install it in your agent (Claude Code, Cursor, Codex) and ask it to constantly VALIDATE what it builds, instead of guessing. And that's just the beginning: with eyes on the web, your AI can also browse sites, pull information, and automate repetitive tasks. In this guide you'll see how to install it, the prompt that makes it validate without you having to remind it, and the world of possibilities it opens up.
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.
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.
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."
Giving your AI eyes isn't just for validating your own work. With a browser at its disposal, it can do a lot more:
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.
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.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.
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.)Join 4,200+ builders. No credit card. Build your first app with AI in minutes.