Guides and APICookbook
Cookbook
Task-oriented recipes lifted from the real, runnable Little Workflow demos.
Little Workflow: published on npm as little-workflow@0.2.0-alpha.1 (2026-10-06). Sections labeled UNRELEASED describe source-only changes. Release status
The Cookbook collects short, task-oriented recipes — each one grounded in a real, runnable demo in the demos/ folder rather than an invented snippet. Every recipe states what it does, shows the essential shape, and links to the full demo you can run.
Recipes
- Plan once, run many — an orchestrator plans a workflow once and fans it out across many inputs in parallel. From
demos/orchestrator-fanout. Uses the deprecated orchestrator; for new composition, see Compose With Little Harness. - Resume after a crash — a run survives a mid-flight
SIGKILLand resumes deterministically from the durable event log, without re-running committed steps. Fromdemos/kill-resume.
More runnable demos
Every demo is keyless unless noted. Run one with pnpm --filter <name> demo (some expose demo:stub for a keyless smoke run).
| Demo | What it proves | Run |
|---|---|---|
kill-resume | Kill-and-resume durability across a mid-run SIGKILL. | pnpm --filter kill-resume demo |
orchestrator-fanout | Plan-once, run-many sub-workflows in parallel (deprecated orchestrator surface). | pnpm --filter orchestrator-fanout demo |
real-planner | The wedge — a real model designs a bounded parallel workflow from a goal (single-cycle and supervisor variants). | pnpm --filter real-planner demo:single (needs DEEPSEEK_API_KEY; demo:stub is keyless) |
sp500-investor-report | ZIP-in, Markdown-out research workflow over external data. | pnpm --filter sp500-investor-report demo:stub |
hiring-candidates / delegated-candidates | Score a batch of candidates against a rubric (deprecated orchestrator surface). | pnpm --filter hiring-candidates demo:stub |
ticket-factory | Turn unstructured input into a batch of structured work items (deprecated orchestrator surface). | pnpm --filter ticket-factory demo:stub |
remote-resume | Durability across process boundaries — sandboxed agent bash + a restartable session-log service. | pnpm --filter remote-resume demo |
kb-chatbot | A Little Harness agent that calls a workflow through asHarnessWorkflow and reads its outputSummary. | pnpm --filter kb-chatbot demo (needs DEEPSEEK_API_KEY) |
New to the SDK? Start with the Quickstart and Define a Workflow.