Libretto
An open-source AI toolkit for building and maintaining robust browser automations, giving coding agents a live browser and token-efficient CLI to inspect pages, capture network traffic, and replay workflows.
At a Glance
About Libretto
Libretto is an open-source toolkit for building and maintaining robust web integrations and browser automations. It gives your coding agent a live browser and a token-efficient CLI to inspect live pages, capture network traffic, record user actions, and debug broken workflows interactively against real sites. Originally built by Saffron Health to maintain browser integrations with healthcare software, it is now open-sourced under the MIT License for any team to use.
- Live Browser Access — Install via
npm install librettoand runnpx libretto setupto give your coding agent a headed Chromium browser for real-site interaction. - Token-Efficient Snapshots — Use
npx libretto snapshotto capture PNG and HTML snapshots analyzed by an LLM, keeping heavy visual context out of your agent's context window. - Network Traffic Capture — Libretto records all network requests during browser sessions, enabling reverse-engineering of site APIs and conversion of UI automations to direct API calls.
- Action Recording & Replay — Record user actions in the browser with
npx libretto saveand replay them as Playwright TypeScript automation scripts. - Interactive Debugging — Reproduce broken workflows, pause at any step, inspect the live page, and fix selector errors autonomously using
npx libretto exec. - Multi-Provider AI Support — Configure snapshot analysis with OpenAI, Anthropic, Gemini, or Vertex via
npx libretto ai configure <provider>, reading credentials from environment variables or.env. - Session & Profile Management — Persist authenticated browser state (cookies, localStorage) across runs using profiles stored in
.libretto/profiles/. - CLI-First Workflow — All functionality is accessible via
npx librettocommands, making it easy to integrate into agent pipelines or run manually from the terminal.
Community Discussions
Be the first to start a conversation about Libretto
Share your experience with Libretto, ask questions, or help others learn from your insights.
Pricing
Open Source (MIT)
Fully free and open-source under the MIT License. Free to use, modify, and distribute.
- Live browser for coding agents
- Token-efficient CLI
- Network traffic capture
- Action recording and replay
- Multi-provider AI snapshot analysis
Capabilities
Key Features
- Live browser for coding agents
- Token-efficient CLI
- Page inspection with minimal context overhead
- Network traffic capture
- Action recording and replay
- Playwright TypeScript script generation
- Interactive workflow debugging
- Multi-provider AI snapshot analysis (OpenAI, Anthropic, Gemini, Vertex)
- Session and profile management
- Chromium browser integration
- API reverse-engineering from network requests
- Security analysis of network requests
