logoalt Hacker News

We made Playwright 2x faster and 80% more token efficient

64 pointsby wittydeveloperyesterday at 4:25 PM15 commentsview on HN

Comments

wittydeveloperyesterday at 4:25 PM

We built Stagehand 2 years ago (24k stars and 4M monthly npm downloads) and recently fixed its biggest flaw: round-trip latency.

Every action performed requires a round trip between your script and the browser (short when running locally but increased when running in the cloud). We also saw multiple posts complaining about the eager token appetite of Playwright MCP.

For this reason, we rebuilt Stagehand from the ground up and shipped v4, where Stagehand controls the browser from an extension automatically loaded upon your browser startup.

Stagehand v4 comes with batch command support, dedicated token-efficient methods `act()` and `extract()`, and a brand new architecture making it 2x faster than Playwright and 80% more token efficient.

You can see for yourself by looking at our benchmarks, comparing its performance across a dozen models (frontier and open weights) and tools (Codex, Claude Code, and more): https://www.stagehand.dev/evals

Ask me anything!

show 1 reply
bensyversontoday at 1:32 AM

If your needs are simpler, I created a tiny headless WebKit browser specifically for agents called Sleepy Hollow [0]

[0]: https://github.com/bensyverson/sleepyhollow

vishalantonyesterday at 4:53 PM

So for an enterprise with a 1,000 test Playwright suite, does this basically mean ~2x faster CI times? That would be huge.

show 1 reply
ishankunamyesterday at 5:54 PM

seems really cool! although, one question i have is why not keep agent() alongside the new primatives? it seems v4 removed agent() entirely rather than offering it with all of act(), observe(), extract().

show 1 reply
dot_louisyesterday at 5:06 PM

Do I need to pay for Browserbase to use this?

show 2 replies
cl685yesterday at 4:46 PM

what did you lose compared to CDP (e.g. cross-origin iframes, downloads running in envs where you can't load extensions)?

show 1 reply
alyssamaruyesterday at 4:52 PM

How much does the harness really matter for evals?

show 1 reply
cl685yesterday at 4:48 PM

lowk why not just do astra computer use

show 2 replies