Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.bastani.ai/llms.txt

Use this file to discover all available pages before exploring further.

The Atomic repo ships small complete user apps under examples/. Each example has claude-worker.ts, copilot-worker.ts, and opencode-worker.ts — small Commander entrypoints that call runWorkflow({ workflow, inputs }).
ExampleWhat it demonstrates
hello-worldMinimal single-session workflow with structured inputs.
sequential-describe-summarizeTwo stages passing data via s.save()s.transcript(handle).
parallel-hello-worldPromise.all() fan-out and transcript merge.
headless-testVisible seed → 3 parallel headless stages → visible merge.
hil-favorite-colorHuman-in-the-loop prompt mid-workflow.
structured-output-demoPer-SDK structured output (JSON-schema validation, Zod).
review-fix-loopDraft → loop (review → fix) with bounded iterations and early exit.
multi-workflowTwo Claude workflows under one cli.ts via listWorkflows(registry).
commander-embedMount an Atomic workflow under a parent Commander CLI.
pane-navigationDriver CLI for the SDK pane-navigation primitives.
Each directory has its own README.md with the run command and explanation.

Run an example

git clone https://github.com/flora131/atomic
cd atomic/examples/<example-name>
bun install
bun run <agent>-worker.ts --<input>=<value>
Replace <agent> with claude, copilot, or opencode, and pass any inputs the workflow declares.
The examples are the fastest way to learn the SDK by reading code. Pair them with defineWorkflow, stages, and inputs for the API reference.