Upload test cases and get automated Playwright tests back
Replaces manual Playwright scripting, but Claude-generated tests and GitHub Copilot already cover this.
The AI toolkit for building reliable browser automations
Deterministic scripts beat runtime AI guessing when Browseruse fails on complex sites.
Engineers building web integrations and browser automations
Browseruse · Stagehand · Playwright
Here’s a demo: https://www.youtube.com/watch?v=0cDpIntmHAM. Docs start at https://libretto.sh/docs/get-started/introduction.
We spent a year building and maintaining browser automations for EHR and payer portal integrations at our healthcare startup. Building these automations and debugging failed ones was incredibly time-consuming.
There’s lots of tools that use runtime AI like Browseruse and Stagehand which we tried, but (1) they’re reliant on custom DOM parsing that's unreliable on older and complicated websites (including all of healthcare). Using a website’s internal network calls is faster and more reliable when possible. (2) They can be expensive since they rely on lots of AI calls and for workflows with complicated logic you can’t always rely on caching actions to make sure it will work. (3) They’re at runtime so it’s not interpretable what the agent is going to do. You kind of hope you prompted it correctly to do the right thing, but legacy workflows are often unintuitive and inconsistent across sites so you can’t trust an agent to just figure it out at runtime. (4) They don’t really help you generate new automations or help you debug automation failures.
We wanted a way to reliably generate and maintain browser automations in messy, high-stakes environments, without relying on fragile runtime agents.
Libretto is different because instead of runtime agents it uses “development-time AI”: scripts are generated ahead of time as actual code you can read and control, not opaque agent behavior at runtime. Instead of a black box, you own the code and can inspect, modify, version, and debug everything.
Rather than relying on runtime DOM parsing, Libretto takes a hybrid approach combining Playwright UI automation with direct network/API requests within the browser session for better reliability and bot detection evasion.
It records manual user actions to help agents generate and update scripts, supports step-through debugging, has an optional read-only mode to prevent agents from accidentally submitting or modifying data, and generates code that follows all the abstractions and conventions you have already in your coding repo.
Would love to hear how others are building and maintaining browser automations in practice, and any feedback on the approach we’ve taken here.
Replaces manual Playwright scripting, but Claude-generated tests and GitHub Copilot already cover this.
Deterministic offline verification of AI pipeline outputs with Merkle hashing—novel framing, early stage.
Executes scripts inside the live tab to inherit auth, solving session management headaches.
Natural-language keywords plus implicit file metadata in loops make common file tasks unexpectedly readable, and the built-in --dry-run and explicit error reporting show a sensible safety-first design. It isn't revolutionary — PowerShell and dozens of RPA/DSL tools exist — but as a compact, distributable exe for teams that loathe terse shell one-liners it’s a practical, usable effort; the main gaps are cross-platform clarity and a larger ecosystem of libraries/examples.
Token efficiency beats Stagehand — 2-5k vs 29-51k per action with cached selectors.
The write-up zeroes in on a concrete, painful failure mode: MCP setups streaming full DOMs and logs into models and burning token budgets. It shows how playwright-cli keeps browser state external and emits compact element references and YAML flows you can replay into npx playwright test — a realistic pattern for long agent sessions. Valuable practical guidance for teams already on Playwright, but it's an explainer, not a new system you can drop in without plumbing.