Agent-readable docs index: /docs/llms.txt. Full docs in one file: /docs/llms-full.txt. Download /docs/docs.zip to grep all markdown files locally.

First workflow

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

  1. Create a workflow file
    Create src/workflows/scrape-page.ts:
    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(), }), startUrl: "https://example.com", }, async ({ page }) => { const title = await page.title(); console.log(`Page title: ${title}`); return { title }; }, );
  2. Run it locally
    npx libretto run src/workflows/scrape-page.ts
    The object you return is the workflow output. On a hosted run, that output is result on the job. See Get the workflow output.
  3. 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.