Scheduled & recurring work
Cron expressions and intervals, timezones, overlap policies — allow, skip, or cancel-previous — and independent per-tenant schedule instances.
A workflow is a plain async function that survives crashes, restarts, and deploys. It can pause for months without holding a process, then resume exactly where it left off.
Run it on demand or on a schedule.
Aiki lives inside your app — no separate service to run, unless you want one.
Cron expressions and intervals, timezones, overlap policies — allow, skip, or cancel-previous — and independent per-tenant schedule instances.
Per-task and per-workflow retry policies: fixed, exponential, or jittered backoff, with attempt limits.
Start a workflow and it runs on whichever worker is free. Add workers and load spreads across them automatically.
Reference IDs deduplicate workflow starts and event deliveries — the same request twice runs once.
Route workflows to dedicated groups of workers.
When multiple runs are due at once, priority decides who goes first.
The same primitive scales from a five-second job to a six-month, human-in-the-loop workflow.
Workflows run for minutes, days, or months. Crashes and restarts resume from the last completed step.
A workflow can pause for minutes or months without holding a process — and wake exactly on time, even if everything restarted in between.
If a worker dies mid-run, another picks up the run automatically and the workflow continues from its last completed step.
Ship new workflow versions without breaking in-flight runs; old versions keep running on old code.
The Aiki server — the orchestrator — is a library. Run it inside your app or as a separate service; workflow code is identical either way. Where things run is configuration, not architecture. In every shape, execution happens in your infrastructure.
Everything in one process — your app, the server, and as many workers as you like. One deploy, nothing else to operate.
Your app hosts the server; execution runs on serverless functions.
The server runs as its own service; long-lived workers pull work in your infrastructure.
The server runs as its own service; execution runs entirely on serverless endpoints.
What you run depends on what you need — nothing more.
One process, a SQLite file. Durable workflows with no external services.
Postgres, when you want multiple server instances or a shared database.
Plug in Redis — or any transport — to speed up work distribution across your workers.
These combine in any way you like — a standalone server on a SQLite file driving dozens of workers is a perfectly ordinary production setup.
External systems signal running workflows with typed, schema-validated events. Events sent early are held and delivered the moment the workflow asks for them. No race between the event arriving and your code being ready for it.
// send an event to the running workflow await trialV1.events.paymentReceived.send(client, "runId_8f2d");
Status, task history, timings, and failures.
Same developer experience.