A self-hosted Temporal alternative for durable AI agents
On this page
Cernanto is a self-hosted alternative to Temporal, Inngest and Restate for durable AI agents and workflows. If a process dies while a workflow waits for a reply, the run resumes the wait, and a step whose result is already in the journal is not run again. You get durable execution for a workflow you maintain in plain English, which a compiler turns into tested TypeScript.
Is it an alternative to Temporal, Inngest or Restate?
Yes, when you would rather keep plain English than the workflow code. The guarantee is the same kind, durable execution: what is often called a checkpoint at every step is the journal here, and a crashed process resumes from it. With a workflow engine you write and maintain the workflow code; here the compiler writes it from the source, checks its determinism and tests it live. The next stop has the whole comparison.
Cernanto vs Temporal, Inngest, Restate and AWS Step Functions
A common next stop is the code-first road: a durable workflow engine, with a coding assistant writing the TypeScript. The guarantee here is the same kind, durable execution: every call, timer and judgment is journaled, a crash or a restart resumes where it stopped, and a replay answers the calls already made from the journal, so a retry repeats one operation, never the sequence before it. The difference is what you keep. There you write and maintain the workflow yourself, as code held deterministic by the engine's rules or as a state machine definition; here the English stays the source, the compiler writes the code, a gate checks its determinism, and a second session tests it live before it ships. Keep an engine when you want that code in your own hands and in your own language. DBOS, Hatchet and Trigger.dev stand on the same road: with each, the workflow or the task is code you write and keep.
Changing a workflow that has runs in progress is where the daily work differs. With Temporal, for one, a change to workflow code has to stay safe for the runs that replay it, so you add branches to the code for the old path and the new one, or you tag your workers and roll them out as versioned deployments, keeping the older version until its workflows have drained. Here a deploy is the whole of it: a task's new version starts beside the old one and takes the new calls, and the old one takes no new call and stays up to finish the ones it holds. Two limits apply: when the old version's process is lost before it finishes, the newest version takes its calls over, a task's replayed from its journal and a job's answered to its caller as an error, and a service's new version starts with fresh memory. Deploying over running work has each kind.
Long runs differ too. An engine that recovers by replay alone has to bound what it replays: Temporal warns once a workflow's history passes 10,240 events, ends the execution past 51,200, and has you carry the state into a fresh run with Continue-As-New. Here the runtime does that work, on Linux servers: once a copy's journal has grown it takes a snapshot of the process's memory and cuts the journal at the snapshot, so a recovery loads the snapshot and replays the short journal after it, and you write nothing for it. A laptop takes no snapshot: a task's journal is still cut there, at a moment no call is running, and a service's grows for the life of its version.
Crash recovery, recorded
The support example tells a team about a ticket and waits a minute for an answer. In this run
kill -9 ends its process twenty seconds into the call, during that wait and after the post to
the team is recorded:
cernanto call examples/workflows/support-follow-up followUp ticketId=T-7005 responseWindowMinutes:=1 & sleep 20; kill -9 $(lsof -c node 2>/dev/null | awk '$4 == "cwd" && /workflows-support-follow/ {print $2}') {"category":"technical","team":"Engineering","channel":"#engineering","outcome":"reminder"} It answered after 71 seconds, as an uninterrupted run does: the plane
brought the process back, the call resumed from its journal, and the
trace shows the classification asked once (one AI call), the post to
#engineering made before the kill and not repeated, and the reminder
on schedule.
What happens to a waiting workflow when I deploy a new version?
A task’s waiting call stays with the version that took it, and a service’s waiting calls start again on the new version. Versioning is the runtime’s work: you write no code for either.
- A task is finished by the version that took it. The new version starts beside the old one and takes the new calls. The old version takes none and stays up for the calls it holds, however long they wait for an approval, a webhook or a timer. If its process is lost first, as when its server dies, the newest version takes those calls over and replays each from its journal: the steps it had recorded are answered and not run again, and the step that was cut short runs again.
- A service is replaced. Its new version starts with fresh memory, and the calls that waited on the old one start again from their first line.
Under Temporal’s Worker Versioning, a Pinned workflow completes on the version it started on. A task here does the same for as long as that version’s process lives, with no worker deployments to roll out and no patching of workflow code. In Restate, a request that started on one version ends on it. Inngest resumes a run on the current code, with the saved results of the steps whose IDs still match.
What if the provider accepted the write and the worker crashed?
Then the provider can receive the write again. Any step already recorded before the crash does
not run again, which is why the post in the run above is not repeated. But if the process dies
after the provider accepted a write and before its result reached the journal, recovery repeats
that write. A Temporal Activity, an Inngest step.run and a Restate ctx.run share this
at-least-once boundary, and each of their guides asks for idempotency there.
Say in your source what must never happen twice, and the code sends an idempotency key from the call’s own business identity, an order id or a payment id. The repeat carries the same key, so a provider that honors it applies the write once. Where the provider cannot deduplicate, no runtime can promise a single write: have the agent look for the earlier write first, or send the case to a person.
Their terms, and what stands for them here
| If you know | Here | What differs |
|---|---|---|
A Temporal Activity, Inngest’s step.run, Restate’s ctx.run |
A recorded step: a call to another agent, an OpenAPI or MCP operation, a timer, a model’s judgment | There is no wrapper for arbitrary code. What is not one of these runs again on a replay, so the outside world is reached through an agent whose job is that reach. |
A Temporal Signal, Inngest’s step.waitForEvent, a Restate awakeable |
A wait, written as a sentence: “waits until the approval arrives, or the time given passes” | It costs nothing while it waits, and resumes after a restart. |
| Temporal’s Continue-As-New and its Event History limits | On Linux servers the runtime takes a snapshot of the agent and cuts its journal at the snapshot | You write nothing for it. A laptop takes no snapshot. |
| Temporal’s Worker Versioning and patching, Restate’s versioned deployments | A deploy: a task’s versions run side by side | A service is replaced, and its waiting calls start again. |
| Restate’s Virtual Objects | No equivalent | A service serves its calls side by side. Where one call at a time for each key is the requirement, keep Restate. |
Temporal limits a workflow’s Event History to 51,200 events and warns after 10,240. Continue-As-New starts a fresh workflow and hands it the state. On Linux servers, Cernanto cuts the journal at a snapshot, with no workflow code for you to write.
Long runs, waits and several servers
- A long-running agent. On Linux servers, a recovery loads a snapshot and replays only the journal after it: the runtime takes a snapshot of a running agent with CRIU once its journal has grown, and cuts the journal there. A laptop keeps the journal alone.
- Waiting for a person. A call can wait for an approval, the human-in-the-loop step, for as long as it takes. It costs nothing while it waits, and resumes after a restart.
- Several servers. If a server dies, its agents come back on the others from their journals and snapshots. A controller places every agent, and each server runs the same program over one store they share, DynamoDB and S3 in your own cloud account.
New work, coexistence and migration
Start with new work. An agent is called over HTTP, through Cernanto’s gateway or by the OpenAPI document it implements, so a workflow that stays on your engine calls it like any service. Runs already in flight on another engine are not migrated: they finish where they are.
Guarantees and limits · Run it on your own servers · Is it open source?
Compare with the others
- Agent frameworks: LangGraph, CrewAI, Mastra and the agent SDKs
Cernanto vs LangGraph, CrewAI and the agent SDKs: enforce an approval rule before a tool call, as policy as code you test before deploy and can trace after.
- Workflow automation: n8n, Zapier, Make and Power Automate
Cernanto vs n8n, Zapier and Make: connect a private API with no inbound port, retry without duplicate notifications, and review each workflow change in Git.
- Spec-driven development: Spec Kit, Kiro and a spec file
Cernanto vs GitHub Spec Kit and Kiro: a natural-language specification stays the source, and gates and live tests decide which AI-generated code ships.