@runbit/workflow
v0.1.1
Published
Composition primitives. Each returns a `Runnable`, so they nest.
Downloads
57
Readme
@runbit/workflow
Composition primitives. Each returns a Runnable, so they nest.
npm install @runbit/workflowimport { sequence, parallel, retry, timeout } from "@runbit/workflow";
const pipeline = sequence(
planner,
parallel(search, weather, database),
retry(timeout(writer, 10_000), { attempts: 3 }),
);
await app.run(pipeline, { message: "Write a Tokyo itinerary" });sequence(...steps)— run in order, piping each output to the next.parallel(...steps)— run concurrently, return an array.branch(choose)— pick a step from the input.retry(step, { attempts, delayMs })— retry until it succeeds.timeout(step, ms)— fail if it runs too long.
Part of Runbit — the AI Runtime. Everything executes through one small, event-driven runtime; agents, workflows, RAG, and observability are packages on top.
- Umbrella:
@runbit/runtime - License: MIT
