Documentation Index Fetch the complete documentation index at: https://libretto.sh/docs/llms.txt
Use this file to discover all available pages before exploring further.
Author a minimal workflow, run it, and inspect the result.
Agent prompt
Ask me what website and workflow I want to demonstrate. If I’m not sure, give me a few examples of simple workflows I could do. Then open a Libretto browser session for the site I choose. After I finish, create a Libretto workflow.
Manual
Create a workflow file
Create src/workflows/scrape-page.ts: src/workflows/scrape-page.ts
import { workflow } from "libretto" ;
export default workflow ( "scrape-page" , async ({ page }) => {
await page. goto ( "https://example.com" );
const title = await page. title ();
console. log ( `Page title: ${ title }` );
return { title };
});
Run it locally
npx libretto run src/workflows/scrape-page.ts
Inspect page state when needed
When a step fails or behaves unexpectedly, open a named debug session first: npx libretto open https://example.com --session debug-example
Then inspect and prototype with the same session: npx libretto snapshot --session debug-example
npx libretto exec --session debug-example "await page.url()"
When the prototype works, move the logic back into the workflow file and run again.
Next: Deploying Choose where to run workflows in production: Libretto Cloud Hosting or an alternative provider.