# Libretto

> Open-source CLI, debug agents, and browser tools for building and maintaining reliable web integrations.

Open-source CLI, debug agents, and browser tools for building and maintaining reliable web integrations.

## Facts
- Website: https://libretto.sh
- Pricing: free
- Categories: Developer Tools, Automation, Open Source
- LotsDirectory page: https://lots.directory/products/libretto
- Listing state: Unclaimed. We listed this product from its public website, and its owner has not claimed it yet.

## Detailed info

## What is Libretto?

Libretto turns a website workflow into a stable API and into reusable scripts in a codebase. It helps coding agents manage browser workflows, web scrapers, and on-prem apps.

## What Libretto does

The open-source CLI records actions, can capture network, and can write scripts. When a Playwright automation fails, an agent inspects the live page and opens a pull request with the fix. The Browser Tools SDK has six tools that let an AI agent read pages and control a real browser with Playwright. The Chrome extension can save a workflow from Chrome, then run it again or schedule it in the cloud. The site says Libretto is backed by Y Combinator.

## Who Libretto is for

Libretto is for coding agents and for a Node.js package that contains browser automations, in a new package or in an existing package.

## How Libretto works

From the directory where a new package should be created, npm create libretto@latest scaffolds the package, installs dependencies, runs setup, and downloads Chromium. A package name can be passed directly, as in npm create libretto@latest my-automations. An existing package runs npm install libretto zod and then npx libretto setup. A workflow file exports a workflow with a zod input and output, a startUrl, and a page. npx libretto run with --headless runs that file. npx libretto open records a session and can write scripts.

## Key features

- Open-source CLI that turns website workflows into reusable scripts, run with npx libretto.
- npm create libretto@latest scaffolds a package, installs dependencies, runs setup, and downloads Chromium.
- A failed Playwright run can be inspected on the live page, and a pull request can be opened with the fix.
- Six browser tools let an AI agent read pages and control a real browser with Playwright.
- The Chrome extension can save a workflow from Chrome, then run it again or schedule it in the cloud.
- A smoke workflow reads the page title and returns it, and that workflow can iterate into a minimal real workflow.

## Facts from libretto.sh, checked 14 October 2026

- Libretto is backed by Y Combinator.
- Option A creates a new package. Option B adds Libretto to an existing Node.js package.
- After the smoke workflow, the docs list a first workflow, then a minimal real workflow to iterate on.

Written from Libretto's own website ([Homepage](https://libretto.sh/), [Docs](https://libretto.sh/docs/get-started/quickstart)). The maker can claim this listing to edit it.

## FAQ

### How is a new Libretto package created?
From the directory where the new package should be created, run npm create libretto@latest. A package name can be passed directly, for example npm create libretto@latest my-automations. That scaffolds a package, installs dependencies, runs setup, and downloads Chromium.

### How is Libretto added to an existing package?
From the existing package directory, run npm install libretto zod and then npx libretto setup. Create a workflow file and run it with npx libretto run and --headless.

### What does the CLI record?
npx libretto open records actions, can capture network, and can write scripts in the codebase. The quickstart then uses npx libretto run with --headless to confirm the local setup and show the basic run loop.

### What is in the smoke workflow?
The quickstart creates src/workflows/scrape-page.ts. It imports workflow from libretto and z from zod, names the workflow scrape-page, sets a startUrl, reads the page title, and returns it.

---
Source: https://lots.directory/products/libretto · Machine-readable context by LotsDirectory.