The Runtime for "AI Workflows"
Durable execution primitives for AI agents and data pipelines. Survive crashes, retries, and timeouts — without managing infrastructure.
import { workflow, step } from "lumi0";
export const processPipeline = workflow({
id: "data-pipeline",
steps: [
step("validate", async ({ input }) => {
const schema = z.object({ url: z.string().url() });
return schema.parse(input);
}),
step("fetch", async ({ prev }) => {
const res = await fetch(prev.validate.url);
return res.json();
}),
step("transform", async ({ prev }) => {
return prev.fetch.items.map(normalize);
}),
step("store", async ({ prev, retry }) => {
await db.batch(prev.transform, { retry });
}),
],
});Trusted by
Reliability.
Not plumbing.
Production AI workflows fail. Steps time out, APIs return errors, servers restart mid-execution. Building retry logic, state persistence, and observability from scratch wastes weeks. Lumi0 ships it.
// Without Lumi0: manual retry loops, lost state, no observability
async function processOrder(orderId: string) {
let attempts = 0;
while (attempts < 3) {
try {
const order = await db.getOrder(orderId); // crashes here?
const payment = await stripe.charge(order); // retried twice?
await email.send(order.email, payment); // sent 3 times?
await inventory.decrement(order.items); // state unknown
break;
} catch (err) {
attempts++;
await sleep(attempts * 1000); // hope it works
if (attempts === 3) throw err;
}
}
// Where did it fail? No idea.
// Was the customer charged? No idea.
// Did the email send? No idea.
}Every step persisted.
Every retry safe.
Lumi0 checkpoints state after each step. On failure, execution resumes from the last successful checkpoint — not from scratch. No duplicate charges. No lost data.
Everything your
workflow needs.
Define workflows
in code.
import { workflow, step } from "lumi0";
import { openai } from "@lumi0/openai";
export const customerSupport = workflow({
id: "customer-support",
steps: [
step("search", async ({ input }) => {
return memory.search({
query: input.message,
userId: input.userId,
limit: 5,
});
}),
step("respond", async ({ prev, input }) => {
return openai.chat({
model: "gpt-4o",
messages: [
{
role: "system",
content: "You are a support agent. Context: " +
JSON.stringify(prev.search.results),
},
{ role: "user", content: input.message },
],
});
}),
step("save", async ({ prev, input }) => {
return memory.write({
userId: input.userId,
content: prev.respond.content,
metadata: { type: "support-response" },
});
}),
],
});
// Trigger from anywhere
const run = await lumi0.run(customerSupport, {
input: { userId: "u_123", message: "How do I upgrade?" },
});See exactly
what happened.
Every run produces a full structured trace. Inspect step outputs, replay from any checkpoint, or export events to Datadog, Grafana, or any OTEL-compatible backend.
Agents that
don't time out.
LLM-based agents often run for minutes or hours. Lumi0 lets them run as long as they need — every tool call is a durable step, every loop iteration is a checkpoint.
- →Each agent step is a durable checkpoint — LLM calls, tool calls, everything.
- →Agents can spawn sub-workflows and wait for their completion.
- →Loop until a condition is met — without holding a server thread.
- →Full execution trace for every agent run, including intermediate tool calls.
- →Cancel or pause any agent run in flight.
┌──────────────────────────────────┐
│ Agent Orchestrator │
│ workflow("autonomous-agent") │
└────────────┬─────────────────────┘
│
┌──────────▼──────────┐
│ step("plan") │
│ model: gpt-4o │
│ ✓ persisted │
└──────────┬──────────┘
│
┌──────────▼──────────┐
│ step("tool_call") │◀── loop until done
│ tool: web.search │
│ ✓ idempotent │
└──────────┬──────────┘
│
┌──────────▼──────────┐
│ step("reflect") │
│ model: gpt-4o │
└──────────┬──────────┘
│
┌──────────▼──────────┐
│ step("output") │
│ → stored result │
└─────────────────────┘Built for the
real world.
Stop maintaining.
Start shipping.
Every tool below is something teams spend weeks setting up and months maintaining. Lumi0 replaces all of it.