██╗ ██╗██████╗ ██████╗ ███████╗████████╗████████╗ ██████╗ ██║ ██║██╔══██╗██╔══██╗██╔════╝╚══██╔══╝╚══██╔══╝██╔═══██╗ ██║ ██║██████╔╝██████╔╝█████╗ ██║ ██║ ██║ ██║ ██║ ██║██╔══██╗██╔══██╗██╔══╝ ██║ ██║ ██║ ██║ ███████╗██║██████╔╝██║ ██║███████╗ ██║ ██║ ╚██████╔╝ ╚══════╝╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═════╝
Libretto is an open-source CLI that turns website workflows into fast, reusable scripts in your codebase
Go from idea to production workflow in minutes, not days.
Libretto turns your browser actions and plain-language instructions into deterministic automation scripts.
Libretto analyzes each site's security and structure to determine the right integration approach, combining browser automation with direct API requests.
Libretto generates deterministic TypeScript that follows your existing abstractions and lives alongside your application code.
The agent builds the workflow once. Then it runs faster, cheaper and more reliably.
Libretto was initially built as an internal tool for automating complex healthcare portals where nothing else worked.
It's built to handle shadow DOMs, iframes, bot detection, and unusable APIs.
...and many more
Browser automations inevitably hit unexpected edge cases, and Libretto makes them easy to diagnose and fast to fix.
Run your workflows on managed, headed browsers with residential proxies. No infrastructure to set up.
Run browsers with Kernel, Browserbase, or Steel, or run workflows on infrastructure you control.
Libretto is an open-source toolkit for building browser automations. It gives your coding agent a live browser and a CLI to inspect pages, capture network traffic, record user actions, and turn them into deterministic automation scripts. Check out the docs to get started.
Libretto is best for teams that need reliable workflows against websites where the official API is missing, incomplete, read-only, too slow to access, or does not support the action they need. Good fits include teams that: - Integrate with customer portals, EHRs, payer sites, government systems, financial dashboards, CRMs, or legacy admin tools. - Need to automate workflows that exist in the web UI but are not exposed through an API. - Need repeatable scripts that are faster, cheaper, and easier to debug than runtime browser agents. - Already use Playwright or browser agents, but want agents to help build and repair automation instead of making decisions on every run. Libretto is probably not the right tool if the API already covers the full workflow cleanly, or if you only need a one-off scrape.
Libretto generates deterministic TypeScript workflows that can use UI automation and direct network requests. Browser Use is a runtime agent, Stagehand adds AI actions on top of Playwright, and Playwright codegen is a recorder for simple browser tests. Read the detailed comparisons: Libretto vs Browser Use, Libretto vs Stagehand, and Libretto vs Playwright codegen.
The CLI has built-in support for Browserbase and Kernel, and Steel to spin up browser sessions directly. Libretto can also connect to any browser that exposes a CDP endpoint, so you can run scripts against any arbitrary browser. Since the code lives in your repo, you can deploy it wherever you want, like AWS or GCP.
Yes, fully open source under the MIT license. You can find the code on GitHub.
Read the docs to set up Libretto and build your first integration in minutes.