Skip to main content
Install Libretto and run your first workflow end to end.

Agent prompt

Manual

Install Libretto into the Node.js package that contains your browser automations. Run Libretto commands with npx libretto from that package.
1

Choose a setup path

Decide whether you want to create a new Libretto package or add Libretto to an existing Node.js package.If you create a new package, choose where it should live and what it should be named. If you use an existing package, switch into that package directory before installing Libretto.
2

Option A: create a new Libretto package

From the directory where the new package should be created:
You can pass a package name directly:
This scaffolds a package, installs dependencies, runs setup, and downloads Chromium.
3

Option B: add Libretto to an existing package

From the existing package directory, add Libretto as a dependency and run setup:
Then create a workflow file and run it with npx libretto run <path> --headless.
4

Create and run a smoke workflow

Create src/workflows/scrape-page.ts in the package you set up:
src/workflows/scrape-page.ts
Run it headless:
This confirms your local setup works and shows the basic run loop.

Next: First workflow

Expand the smoke workflow into a minimal real workflow you can iterate on.

Compare browser automation tools

If you are choosing between Libretto and another browser automation tool, these comparisons explain the production trade-offs:

Libretto vs Browser Use

Compare deterministic scripts with a runtime browser agent.

Libretto vs Stagehand

Compare generated workflows with act(), observe(), and runtime inference.

Libretto vs Playwright codegen

Compare browser recording with agent-built workflows and validation loops.