May 1, 2026 · Free Guide

Stop Burning Tokens on Playwright (Use Vercel's agent-browser Instead)

It was about time someone built a real AI browser. Playwright is slow because it's dumb — it ships full screenshots of every page to the model, every step. Vercel's agent-browser just hands the model what it actually needs. Same result. 93% fewer tokens. Way faster. Here's what it is and how to get it running today.

Why Playwright is the wrong tool for AI agents

Playwright was built for humans writing tests. Then everyone started bolting AI on top and pretending it fit. It doesn't.

When an AI agent uses Playwright (or the Playwright MCP), every step usually means: take a full-page screenshot, send it to the model, model decides what to do, repeat. Multiply that by 20 steps in a real workflow and you're burning tens of thousands of tokens just on pixels the model didn't need.

It's slow. It's expensive. And the model still misses stuff because it's reading a picture instead of structured data.

What agent-browser does differently

Vercel's agent-browser is a native Rust CLI built specifically for AI agents. Two things make it different.

First, it gives the AI an accessibility tree with refs instead of a screenshot. So the model sees something like @e1: button "Sign in"instead of a 2MB PNG. The model picks the ref, agent-browser does the click. That's where the 93% token reduction comes from.

Second, it's a Rust binary. No Node.js daemon. No Playwright runtime. It connects to a real Chrome instance and runs commands fast.

31,000+ stars on GitHub. Maintained by Vercel Labs. This isn't a weekend project.

How the workflow actually looks

The pattern your AI agent will use is dead simple:

agent-browser open https://example.com
agent-browser snapshot
agent-browser click @e2
agent-browser fill @e3 "test@example.com"
agent-browser screenshot

snapshot returns a compact accessibility tree with refs like @e1, @e2, @e3. The model picks one, agent-browser does the action. Screenshots only when you actually need pixels.

Compared to MCP Playwright dumping huge HTML or screenshots into your context every step, this feels like cheating.

It also supports semantic locators if you want them: agent-browser find role button click --name "Submit". Same idea — the AI describes what it wants in plain language, the binary handles the DOM lookup.

HOW TO INSTALL

Install it in 10 seconds

Easiest path — just tell Claude Code to do it:

Tell Claude: "install agent-browser globally and run agent-browser install to download Chrome"

Prefer to do it manually? One line in your terminal:

npm install -g agent-browser && agent-browser install

That second command (agent-browser install) downloads Chrome from Chrome for Testing — Google's official automation channel. First-time setup only. After that you're ready.

Mac users can also use Homebrew: brew install agent-browser && agent-browser install.

What to use it on

  • Any AI agent that browses the web. Lead scraping, content research, testing, form-filling. All of it gets cheaper and faster.
  • Replacing Playwright MCP. If you're using mcp__playwright__* in Claude Code right now, switch. The token savings alone pay for the migration in one day of usage.
  • Multi-step browser workflows. Use agent-browser batchto chain commands in one process. Kills startup overhead when you're running 20 steps in a row.
  • Logged-in scraping. Session persistence, cookies import, and connecting to existing Chrome via CDP. Real production stuff.

When to skip it: one-off "open this URL and screenshot it" jobs where token cost doesn't matter. For everything else, this is the new default.

All Resources

Vercel agent-browser (GitHub)The repo — 31k+ stars, native Rust CLI
Chrome for TestingGoogle's official automation Chrome channel
Claude CodeThe AI coding agent that pairs with this

The Next Step

Guides show you what. AI Builders shows you how.

Inside the community, I walk through every build live — including the stuff that doesn't make it into guides. Regular people (not developers) figuring out AI together, shipping real projects, asking me anything. No fluff, no theory, just the actual work.

Join AI Builders

skool.com/ten-fold