How kayleexx/kairo works
Kairo is a local-first workflow runner built around reusable WebAssembly Components. Users initialize a project, register Components, compose or select a recipe, validate the workflow, and run it with a literal value or stream input; they can then inspect, explain, replay, or manage the run. Internally, the CLI submits work to the control service, workers execute assignments through the runtime, and durable state and artifacts support recovery. The README documents major capabilities; sampled source confirms selected control, worker, journal, and UI responsibilities, but not every connection shown here.
Main entry points: src/lib.rs Wasm runtime · main.rs Kairo CLI · new.rs Workflow builder · src/lib.rs Terminal dashboard
Components 25
Project authoring
- Kairo CLI
crates/cli/src/main.rs - Project setup
crates/cli/src/setup.rs - Component registry
crates/cli/src/component.rs - Workflow builder
crates/cli/src/new.rs - Recipe catalog
crates/core/src/recipe.rs - Workflow validation
crates/cli/src/validation.rs
Workflow execution
- Workflow model
crates/core/src/workflow_model.rs - Run submission
crates/control/src/submission.rs - CLI run service
crates/cli/src/service.rs - Control server
crates/control/src/server.rs - Worker execution
crates/worker/src/lib.rs - Wasm runtime
crates/runtime/src/lib.rs - Stream processing
crates/runtime/src/stream.rs
Run operations
- Durability planning
crates/runtime/src/durability_plan.rs - Run journal
crates/runtime/src/journal.rs - Artifact storage
crates/storage/src/byte_artifact.rs - Inspect and replay
crates/cli/src/inspection.rs
User interfaces
- Terminal dashboard
crates/tui/src/lib.rs - TUI composition
crates/tui/src/compose_view.rs - Run explanation
crates/tui/src/explain.rs
External services
- Effect service
crates/cli/src/effect_service.rs - OCI registry
- Artifact backend
Other components
- Workflow author
- Component author
Connections 27
- Workflow author → Kairo CLI: invokes commands
README.md - Kairo CLI → Project setup: initializes project
README.md - Workflow author → Component registry: registers components
README.md - Component registry → OCI registry: resolves OCI reference
README.md - Component author → Component registry: adds component
README.md - Workflow author → Workflow builder: composes workflow
README.md - Workflow builder → Recipe catalog: selects recipe
README.md - Workflow builder → Workflow validation: writes workflow
README.md - Kairo CLI → Workflow validation: checks workflow
README.md - Workflow validation → Workflow model: validates model
- Workflow author → Kairo CLI: runs workflow
README.md - Kairo CLI → CLI run service: submits run
crates/cli/src/main.rs - CLI run service → Run submission: submits request
crates/cli/src/service.rs - Run submission → Control server: dispatches run
- Control server → Worker execution: assigns work
- Worker execution → Wasm runtime: executes workflow
crates/worker/src/lib.rs - Wasm runtime → Stream processing: processes streams
crates/runtime/src/lib.rs - Wasm runtime → Durability planning: plans durability
crates/runtime/src/lib.rs - Wasm runtime → Run journal: records run state
crates/runtime/src/lib.rs - Wasm runtime → Artifact storage: stores artifacts
- Workflow author → Inspect and replay: inspects or replays
README.md - Inspect and replay → Run journal: reads run history
- Workflow author → Effect service: runs effect workflow
- Workflow author → Terminal dashboard: opens dashboard
README.md - Terminal dashboard → TUI composition: composes workflows
crates/tui/src/compose_view.rs - Terminal dashboard → Run explanation: shows explanation
crates/tui/src/lib.rs - Project setup → Artifact backend: configures storage