NOW LET US – AI RAG SaaS Studio TP.HCM
NOW LET US
Digital Product Studio
Back to news
DEV-TOOLS...3 min read

Show HN: Libretto – Making AI browser automations deterministic

Share
NOW LET US Article – Show HN: Libretto – Making AI browser automations deterministic

Libretto is a toolkit for building robust web integrations, providing AI agents with a live browser and token-efficient CLI to inspect pages, capture traffic, and record actions.

  • Website: libretto.sh
  • Repository: github.com/saffron-health/libretto
  • Docs: libretto.sh/docs
  • Discord: discord.gg/NYrG56hVDt

Libretto is a toolkit for building robust web integrations. It gives your coding agent a live browser and a token-efficient CLI to:

  • Inspect live pages with minimal context overhead
  • Capture network traffic to reverse-engineer site APIs
  • Record user actions and replay them as automation scripts
  • Debug broken workflows interactively against the real site

We at Saffron Health built Libretto to help us maintain our browser integrations to common healthcare software. We're open-sourcing it so other teams have an easier time doing the same thing.

libretto-demo.mov

npm install libretto
# First-time onboarding: install skill, download Chromium, and pin the default snapshot model
npx libretto setup
# Check workspace readiness at any time
npx libretto status
# Manually change the snapshot analysis model (advanced override)
npx libretto ai configure <openai | anthropic | gemini | vertex>

setup detects available provider credentials (e.g. OPENAI_API_KEY) and automatically pins the default model to .libretto/config.json. Re-running setup on a healthy workspace shows the current configuration instead of re-prompting. If credentials are missing for a previously configured provider, setup offers an interactive repair flow.

Use ai configure when you want to explicitly switch providers or set a custom model string.

Libretto is designed to be used as a skill through your coding agent. Here are some example prompts:

Use the Libretto skill. Go on LinkedIn and scrape the first 10 posts for content, who posted it, the number of reactions, the first 25 comments, and the first 25 reposts.

Your coding agent will open a window for you to log into LinkedIn, and then automatically start exploring.

I'm gonna show you a workflow in the eclinicalworks EHR to get a patient's primary insurance ID. Use libretto skill to turn it into a playwright script that takes patient name and dob as input to get back the insurance ID. URL is ...

Libretto can read your actions you perform in the browser, so you can perform a workflow, then ask it to use your actions to rebuild the workflow.

We have a browser script at ./integration.ts that automates going to Hacker News and getting the first 10 posts. Convert it to direct network scripts instead. Use the Libretto skill.

Libretto can read network requests from the browser, which it can use to reverse engineer the API and create a script that directly calls those requests. Directly making API calls is faster, and more reliable, than UI automation. You can also ask Libretto to conduct a security analysis which analyzes the requests for common security cookies, so you can understand whether a network request approach will be safe.

We have a browser script at ./integration.ts that is supposed to go to Availity and perform an eligibility check for a patient. But I'm getting a broken selector error when I run it. Fix it. Use the Libretto skill.

Agents can use Libretto to reproduce the failure, pause the workflow at any point, inspect the live page, and fix issues, all autonomously.

You can also use Libretto directly from the command line. All commands accept --session <name> to target a specific session.

npx libretto setup # interactive first-run onboarding
npx libretto status # check AI config health and open sessions
npx libretto open <url> # launch browser and open a URL
npx libretto snapshot --objective "..." --context "..." # capture PNG + HTML and analyze with an LLM
npx libretto exec "<code>" # execute Playwright TypeScript against the open page
npx libretto run <file> # run the file's default-exported workflow
npx libretto resume # resume a paused workflow
npx libretto pages # list open pages in the session
npx libretto save <domain> # save browser session for reuse
npx libretto close # close the browser
npx libretto ai configure <provider> # manually change snapshot analysis model

All Libretto state lives in a .libretto/ directory at your project root. Configuration is stored in .libretto/config.json.

© 2026 Now Let Us. All rights reserved.

Source: Hacker News

Advertisement
Ad slot ready: 5887729102

More in this category

EXPLORE TOPICS

Discover All Categories

Deep dive into the specific technology sectors that matter most to you.