1. Project Setup
2. Define Schemas
Each Zod schema passed tocreateSmithers becomes a named, auto-created SQLite output table.
outputs provides typed references (outputs.analysis instead of the string "analysis"). Typos become compile errors. runId, nodeId, and iteration columns are auto-added.
3. Configure Agents
4. Build the Workflow
ctx.outputMaybe()returnsundefineduntil the task completes. Safe for conditional rendering.{analysis ? <Task .../> : null}gates downstream tasks on upstream completion.ctx.inputis the runtime input object (here:{ repo: string, focusArea?: string }).
5. Create the Runner
6. Run It
main.ts needed):
7. Inspect Results
Execution Model
The engine renders the JSX tree repeatedly:- Render 1 — Only
analyzeis mounted. Engine executes it. - Render 2 —
ctx.outputMaybe(outputs.analysis)returns data.fixmounts and executes. - Render 3 — Both outputs available.
reportmounts and executes. - Render 4 — All tasks finished. Run completes.
Adding Tools
Next Steps
- Structured Output — Schema validation in depth.
- Error Handling — Retries, timeouts, fallback paths.
- Resumability — Crash recovery and deterministic replay.
- Patterns — Project structure for larger workflows.
- Components — JSX component reference.