Recipes
Five reusable, parameterized workflow shapes that compile to a mote DAG — map_reduce, fan_out_gather, retry_until_critic, react_tool_loop, image_batch_describe_reduce.
Recipes are reusable, parameterized workflows. Each compiles to a DAG of motes and inherits the runtime's guarantees — exactly-once delivery, transparent recovery, and policy gating — for free.
map_reduce
N mappers fan out, then a single pure reduce folds their results.
input → [mapper × N] → reduce → outputUse it for embarrassingly-parallel work with a deterministic aggregation step.
fan_out_gather
N parallel workers, then one pure gather. Like map_reduce but the gather collects heterogeneous worker outputs rather than folding a uniform list.
input → [worker × N] → gather → outputretry_until_critic
N attempts, each gated by a critic, then a selector picks the winner. The critic decides whether an attempt passes; failing attempts are retried up to the bound.
attempt → critic ─(reject)→ attempt → … → selector → outputUse it when output quality is checkable and you want bounded retries instead of one-shot.
react_tool_loop
The classic reason → act(tool) → observe loop: the agent reasons, calls a tool through the CapabilityBroker, observes the result, and repeats until done.
reason → act (tool) → observe → reason → …image_batch_describe_reduce
Batch image description: describe a batch of images in parallel, then reduce the descriptions into a single result. A multi-modal variant of map_reduce.
Recipes compose
Because every recipe lowers to a mote DAG, recovery and delivery semantics are identical no matter which shape you pick — and you can nest them.