Write business logic and let Aiki handle durability
Workflows that run for minutes, days, or months. Survive crashes and restarts automatically — pick up exactly where you left off.
If a worker crashes, another picks up the work automatically. Failed tasks retry based on your policy. Reliability without the complexity.
Add workers to scale effortlessly. Aiki handles work distribution automatically across your infrastructure.
Workers execute in your infrastructure, not ours. Keep complete control over where your code runs and data lives.
Workflows are just async functions with full TypeScript support. No complex abstractions — just code you already know how to write.
Deploy new workflow versions without breaking existing runs. Old versions continue running while new instances use the latest code.
import { event, workflow } from "@aikirun/workflow";
import { createUser, sendVerificationEmail, sendWelcomeEmail } from "./tasks";
export const onboarding = workflow({ name: "user-onboarding" });
export const onboardingV1 = onboarding.v("1.0.0", {
async handler(run, input: { email: string }) {
// Tasks retry automatically on failure
const { userId } = await createUser.start(run, { email: input.email });
await sendVerificationEmail.start(run, { email: input.email });
// Wait for user to click verification link (24 hour timeout)
const result = await run.events.emailVerified.wait({ timeout: { hours: 24 } });
if (result.timeout) {
return { status: "unverified", userId };
}
await sendWelcomeEmail.start(run, { email: input.email });
return { status: "verified", userId };
},
events: {
emailVerified: event<{ verifiedAt: number }>(),
},
});
Managed infrastructure. Zero operations.
Same great developer experience.