Skip to main content
This guide builds a two-step workflow that researches a topic and writes a report.

Step 1: Create the Workflow

Create research.toon:
name: research-report
agents:
  researcher:
    type: claude-code
    model: claude-opus-4-6
    subscription: true
    instructions: You are an expert research assistant.
  writer:
    type: claude-code
    model: claude-opus-4-6
    subscription: true
    instructions: You are a technical writer who produces clear, concise reports.

input:
  topic: string

steps[2]:
  - id: research
    agent: researcher
    prompt: "Research the following topic and provide a summary with key points.\nTopic: {input.topic}"
    output:
      summary: string
      keyPoints: "string[]"

  - id: report
    agent: writer
    prompt: "Write a concise report based on this research.\n\nSummary: {research.summary}\nKey points: {research.keyPoints}"
    output:
      title: string
      body: string
      wordCount: number
That is the whole workflow. No schema classes, builder helpers, or service wiring.

Step 2: Run It

smithers run research.toon --input '{"topic": "The history of the Zig programming language"}'
You should see the generated report in stdout, and Smithers will create smithers.db in the project directory.

What Happened

  1. Smithers validated the input: block.
  2. The research step interpolated {input.topic} and sent the prompt to the researcher agent.
  3. The response was validated against the inline output: schema and persisted.
  4. The report step resolved {research.summary} and {research.keyPoints} from the stored output.
  5. The final report was persisted and returned.
If the process exits after step 3, Smithers resumes from the persisted state instead of re-running completed work.

Next Steps

  • Schemas — Define inline and imported types.
  • Nodes — Learn parallel, loop, approval, branch, and worktree nodes.
  • Prompts — Write multi-line prompts with interpolation.