██╗     ██╗██████╗ ██████╗ ███████╗████████╗████████╗ ██████╗
 ██║     ██║██╔══██╗██╔══██╗██╔════╝╚══██╔══╝╚══██╔══╝██╔═══██╗
 ██║     ██║██████╔╝██████╔╝█████╗     ██║      ██║   ██║   ██║
 ██║     ██║██╔══██╗██╔══██╗██╔══╝     ██║      ██║   ██║   ██║
 ███████╗██║██████╔╝██║  ██║███████╗   ██║      ██║   ╚██████╔╝
 ╚══════╝╚═╝╚═════╝ ╚═╝  ╚═╝╚══════╝   ╚═╝      ╚═╝    ╚═════╝

Turn website workflows into reliable APIs

Libretto is an open-source CLI that turns website workflows into fast, reusable scripts in your codebase

Claude CodeClaude Code
// BUILD --

Build new automations easily

Go from idea to production workflow in minutes, not days.

01. Record user actions

Libretto turns your browser actions and plain-language instructions into deterministic automation scripts.

Recording
Search patients
You
Agent

02. Smart integration selection

Libretto analyzes each site's security and structure to determine the right integration approach, combining browser automation with direct API requests.

03. Native to your codebase

Libretto generates deterministic TypeScript that follows your existing abstractions and lives alongside your application code.

extractReferrals.ts
app/
server.ts
routes.ts
shared/
loginToECW.ts
navigation.ts
extractTable.ts
types.ts
workflows/
extractReferrals.ts
syncPatients.ts
1
// BENCHMARKS --

Benchmark Results

The agent builds the workflow once. Then it runs faster, cheaper and more reliably.

Browser Use79.5s
Libretto16.3s
Average per workflow across 27 public website evals. Code here.

Battle-tested on the worst of the web

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.

healthcare/
athenahealth.com
eclinicalworks.com
uhc.com
availity.com
social/
linkedin.com
reddit.com
x.com
ecommerce/
ebay.com
craigslist.org

...and many more

// MAINTAIN --

Effortless debugging

Browser automations inevitably hit unexpected edge cases, and Libretto makes them easy to diagnose and fast to fix.

libretto --help
Capabilities
--deterministic
Every failure is reproducible. No flaky AI calls in the hot path means bugs are consistent and fixable.
--agent-debug
The agent reruns broken workflows with pause statements to step through failures, just like a developer would.
--read-only
Restrict the agent to observation only. It can inspect the page but won't fill forms or submit data.
$
// DEPLOY --

Deploy with one command

Run your workflows on managed, headed browsers with residential proxies. No infrastructure to set up.

  • → Managed headed browsers, residential proxies included
  • → Debugging agents that auto-fix scripts or email a full analysis with video
  • → No browser pool to manage
$libretto cloud deploy
OR

Alternative providers

Run browsers with Kernel, Browserbase, or Steel, or run workflows on infrastructure you control.

  • → Connect Browserbase, Kernel, or Steel with your API key
  • → Or run the workflow as a container with guides for Cloud Run and ECS
provider setup →
// FAQ --

Frequently asked questions

What is Libretto?

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.

Who is Libretto good for?

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.

How is Libretto different from Browser Use, Stagehand, and Playwright codegen?

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.

What cloud providers do you support?

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.

Is it open source?

Yes, fully open source under the MIT license. You can find the code on GitHub.

Where can I get help?

Jump into our Discord for quick help, open an issue on GitHub, or read through the docs.

Ready to get started?

Read the docs to set up Libretto and build your first integration in minutes.