Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Author a minimal workflow, run it, and inspect the result.
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.
Create a workflow file
src/workflows/scrape-page.ts
import { workflow } from "libretto"; import { z } from "zod"; export default workflow( "scrape-page", { input: z.object({}), output: z.object({ title: z.string(), }), }, 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
npx libretto open https://example.com --session debug-example
npx libretto snapshot --session debug-example npx libretto exec --session debug-example "await page.url()"