1. Install and scaffold
init creates .smithers/ with seeded workflows, prompts, and components. The bun deps add the AI SDK, Anthropic provider, and Zod (schemas).
A minimal tsconfig.json:
jsxImportSource is the only line specific to Smithers — it routes JSX through the workflow runtime instead of React DOM.
2. One-task workflow
createSmithers registers Zod schemas; each becomes a SQLite table. outputs.greeting is the typed reference for the greeting schema — using it as the output prop gives compile-time checks (typo outputs.greting is a type error).
This Task has no agent, just a literal value. Run it.
3. Add an agent task
Replace the literal Task with an agent Task whose output is structured.outputs.analysis into the prompt, parses the agent’s response, validates against Zod, and persists. Validation failure triggers a retry.
4. A second task that depends on the first
Tasks see each other’s outputs throughctx.outputMaybe(...). An incomplete upstream returns undefined; on the next render frame the upstream output appears and the downstream Task mounts.
analyze is mounted. Render 2 (after analyze finishes): analysis is populated, fix mounts and runs. The entire reactivity story — no hooks, no subscriptions, JSX conditionals over persisted state.
Same shape works for branching, parallel groups, and loops:
5. An approval gate
Pause for a human. The runtime persists the pending decision and exits cleanly; an operator approves or denies through the CLI; resume picks up from the gate.onDeny controls behavior on rejection: "fail" aborts the run, "continue" proceeds without the approved branch, "skip" skips the gated tasks.
6. Crash, then resume
Every completed task’s output sits in SQLite. A crash, kill, or restart loses no work — the next run with--resume true skips finished tasks.
What you skipped (and where to find it)
- Time travel (replay a frame, fork a run, diff two runs):
bunx smithers-orchestrator replay|fork|diff|timeline— see How It Works → Time travel. - Scorers (attach evaluators to Tasks): see Recipes → Scoring tasks.
- Memory (cross-run facts, semantic recall): see llms-memory.txt.
- RAG, voice, OpenAPI tools: opt-in fragments — see the index in llms.txt.
- Tool sandbox (read/grep/bash with path containment): see Recipes → Tools.
Read next
- How It Works — the render → execute → persist loop.
- Components — JSX surface reference.
- CLI — every command in one TOON table.
- Recipes — patterns from production workflows.