Guide

Browser Layer vs playwright-cli, measured.

On eight agent tasks, Browser Layer and Microsoft’s playwright-cli (0.1.22) both passed every one. Browser Layer used 34% fewer tokens (1,255k against 1,909k), 56 steps against 83, and 258 seconds against 292. It is one run per tool per task, so single-task differences under about 20% are noise.

The test

The same agent (Cursor’s agent on Sonnet), model, prompt and task for each tool. Only the browser tool changed, and each answer was checked against ground truth. Eight tasks: six local fixture apps (shop, flights, reports, orders, signup, settings) and two live sites (Hacker News and GitHub).

The numbers

  • Score: 8 of 8 for both.
  • Tokens: Browser Layer 1,255k, playwright-cli 1,909k, 34% fewer.
  • Steps: 56 against 83.
  • Time: 258 against 292 seconds.
  • Per task, Browser Layer was cheapest on 6 of 8 and playwright-cli on shop (103k against 128k) before our fixes. After them, shop was within noise.

Where it was close or went the other way

On orders (pagination), playwright-cli took 246k tokens and 9 steps while Browser Layer first took 388k and 17. After fixing how a page of new records is answered, Browser Layer used 219k and 10 steps. On flights, Browser Layer used 330k tokens against 506k, and after the fix 292k.

Limits

One run per tool per task, fixtures we wrote, and one agent. Treat it as a measurement of this setup, not a rule. We measured Microsoft’s playwright-cli, not the Playwright MCP server, so we have no numbers for the MCP. The runner and raw data are public.

Questions

Is Browser Layer a Playwright alternative for AI agents?

It does the same job for an agent: a browser it drives from a terminal. In our eight-task test both passed everything, and Browser Layer used 34% fewer tokens against playwright-cli.

Is this a Playwright MCP alternative?

We measured playwright-cli 0.1.22, not the MCP server, so we do not have numbers for the MCP.

How reliable is the comparison?

It is one run per tool per task on small fixtures, so differences under about 20% on a single task are noise. The total across eight tasks is a better guide.

Keep reading