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 withnpx libretto from that package.
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.
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.
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.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.