

Reflex
Lets an AI assistant drive a real web browser, using a quarter of the usual cost
The problem
Give an AI agent a browser and it drowns. Existing automation tools were built for scripts, not agents, so they return the whole page: every node, every attribute, every time. A single navigation can burn tens of thousands of tokens before the agent has done anything useful. Worse, each action is its own round trip, and every round trip costs seconds of inference.
The bottleneck is not the browser. It is the agent's context window and its turn count.
What I built
Reflex is a local MCP server and CLI that drives your own Chrome. It wraps Playwright's engine in an interface designed for a model rather than a script: distilled page snapshots instead of DOM dumps, change deltas instead of full re-reads, stable element refs, batched actions with guards, and failure reports an agent can act on in a single turn.

Measured against Playwright MCP on the same tasks across live sites: roughly 4x fewer tokens, 2.8x fewer round trips, and 1.7x faster end to end.
The design bet
Reflex deliberately trades tool-side wall clock for fewer turns and smaller payloads. That is the right trade only when a model is in the loop, and the README says so plainly: if no agent is involved, plain Playwright is the better tool. Being honest about where the product does not apply turned out to matter more to developers than another round of benchmark claims.
How the interface works
- Distilled snapshots. The page is compressed to its interactive and semantic skeleton with stable refs like
[a3f2], rather than serialised HTML. - Deltas, not dumps. After an action, the agent receives what changed. Re-reading an unchanged page costs nothing because it never happens.
- Batched, guarded steps. A whole flow (navigate, fill, assert, click, screenshot) goes out in one call with
expectguards between actions, so the common path is a single round trip. - Forensic failures. When a step fails, the report names the near-miss candidates, the console and network errors, and what changed just before the failure. The agent fixes it and resends in the same turn instead of blindly retrying.
- Replayable flows. Once a path works it can be recorded and re-run with zero tokens and no model at all.
Engineering constraints
The tool definitions themselves have to fit a token budget, because eleven tool schemas sit in the agent's context for the entire session before a single call is made. The CLI and the MCP server ship as one package at one version, so they cannot skew. Everything runs on the user's machine: the server, the browser, their logins. Page content never reaches a server I control, which is what makes it usable against authenticated sites.
Where it runs
Published to npm as reflex-browser and installable with a single command into Claude Code, Claude Desktop, Cursor, and VS Code. Metering and accounts run on Cloudflare Workers with a D1 ledger. macOS is fully supported and Windows is in beta.
Building something in this territory? Start a conversation →
