ZeroDOM vs Playwright MCP, Browser Use and Stagehand
An agent driving a browser has to represent the page somehow, and that representation is the single largest line item in its context budget. Here is what each option actually sends the model — and where ZeroDOM is the wrong choice.
ZeroDOM figures measured 2026-08-03 · other tools characterised by architecture, not by benchmarks we did not run
| Tool | What it is | What the model sees | Context cost | Stable handles | Agent logic |
|---|---|---|---|---|---|
| ZeroDOM | MCP server + Python library over a Page you control | Flat interaction graph — one line per actionable node | ~10 tokens per action, flat | None — you keep the loop | |
| Playwright MCP | Official MCP tool layer over Playwright | ARIA accessibility snapshot, mode="ai" | 23–70 tokens per action | None — tool layer only | |
| Playwright CLI | Same engine, results written to disk | Snapshots to files the agent reads selectively | Low, if the agent reads sparingly | None | |
| Browser Use | Full Python agent framework, now on CDP directly | DOM analysis plus vision | Varies with the page and the model | Included — it is the agent | |
| Stagehand | AI-authored Playwright actions | Natural-language act/extract over the DOM | Varies — an LLM is in the loop | Included | |
| Vision / computer use | Screenshots into a multimodal model | Pixel coordinates | High — image bytes per step | Model-side |
Pick ZeroDOM when
Your agent already drives a browser and the snapshot is eating the context window.
Pick Playwright MCP when
You want the official, broadest tool surface and context cost is not the binding constraint.
Pick Playwright CLI when
Your agent has filesystem access and you would rather it grep a file than hold a snapshot.
Pick Browser Use when
You want an autonomous multi-page agent out of the box rather than a tool for your own.
Pick Stagehand when
You are building extraction pipelines and want to write intent instead of selectors.
Pick Vision / computer use when
The surface is a canvas or WebGL app with no elements to parse. ZeroDOM cannot help there either.
Why totals lie and cost per action doesn't.
A representation that exposes less of the page always wins a total-token comparison. It also gives your agent fewer things it can do.
ARIA snapshot 1,677 tok · 72 nodes exposed
ZeroDOM 1,692 tok · 170 nodes exposedARIA snapshot 23.3 tok/action
ZeroDOM 9.9 tok/actionIf your target draws its controls on a canvas the way Figma does, there is no element to emit and screenshot-based computer use is the right answer. If the controls you need live in an iframe — payment fields, embedded editors, consent gates — ZeroDOM parses the top document and won't see them. And if you want an agent rather than a tool, Browser Use or Stagehand start closer to where you want to end up.
Common questions
Is ZeroDOM a replacement for Playwright MCP?
It replaces the part of Playwright MCP that spends your context window — the ARIA snapshot — not Playwright itself. ZeroDOM is middleware over a Playwright Page you already control, so it runs on top of the same browser and the same session, and returns a flat interaction graph that measured 71.0% smaller on average than aria_snapshot(mode="ai").
Should I use ZeroDOM or Browser Use?
Browser Use is an agent; ZeroDOM is a tool for the agent you already have. Pick Browser Use when you want autonomous multi-page behaviour out of the box, and ZeroDOM when you own the agent loop and want the page representation it reads to cost ~10 tokens per action instead of 23–70.
Does ZeroDOM work alongside Playwright MCP?
Yes. Both are MCP servers and an agent can hold both, but they answer the same question, so the usual setup is to let ZeroDOM handle reading and targeting the page while Playwright MCP covers anything ZeroDOM deliberately does not do, such as iframes, file uploads or network interception.
Why does per-action cost matter more than total tokens?
Totals flatter whoever exposes less of the page. On Airbnb the plain ARIA snapshot looks 15 tokens cheaper than ZeroDOM until you notice ZeroDOM found 170 actionable nodes there and the accessibility tree exposed 72 — so the honest unit is tokens per actionable node, where ZeroDOM costs 9.9 and the snapshot costs 23.3.