Step 1: Create the Workflow
Createworkflow.tsx:
ctx.outputMaybe(...)is how the second render discovers thatresearchhas finished.- the
reporttask only mounts once theresearchoutput exists.
Step 2: Run It
Createmain.ts:
What Happened
- Smithers rendered the JSX tree. Only
researchwas mounted. - The
researchtask ran, validated its output against the Zod schema, and persisted it. - Smithers rendered again with that stored output available through
ctx.outputMaybe(...). - The
reporttask mounted on the second render and used theresearchoutput in its prompt.
Next Steps
- Workflow — Learn the root workflow component.
- Task — See agent, compute, and static task modes.
- Tutorial: Build a Workflow — Build a larger production-style JSX workflow.