Topic 5 of 5 · 5 min read
Choosing a durable execution engine
Goal: Compare durable execution options for an agent workload and pick one based on hosting, language support and how it replays work.
Choose a durable execution engine by four questions: where it runs, which languages it supports, how it replays work, and how much of it you want to operate yourself. All of them give you saved progress, retries and durable waits. They differ in how.
Check yourself · 1 of 3
Your team writes Python agents, owns a Postgres database and has no platform engineers. Which first step is the most sensible?
Why it matters
Switching later means rewriting every workflow. The choice should follow your team's stack and your agent's shape, not the loudest blog post. Check each project's current docs: features and hosting offers change.
The options at a glance
| Option | Hosting | Languages | How it keeps progress |
|---|---|---|---|
| Temporal | Self-host the server, or Temporal Cloud | Go, Java, TypeScript, Python, .NET and others | Event history; workflow code is replayed and must be deterministic |
| Restate | Self-host a single binary, or Restate Cloud | TypeScript, Java, Kotlin, Python, Go | Journal of durable steps; handlers re-run and skip finished steps |
| Inngest | Managed service or self-host; your functions run in your own app | TypeScript, Python, Go | Each step.run result is saved; the function re-invokes and skips finished steps |
| DBOS | A library in your app; state lives in your Postgres | Python, TypeScript, Go, Java | Workflow and step results stored in Postgres; resume on restart |
| AWS Step Functions | Managed on AWS only | Any, through task integrations; flows written in JSON | A state machine; the service stores each state transition |
| Framework checkpointers (LangGraph and others) | Library in your agent app | Mostly Python and TypeScript | A saved graph state after each node, per thread id |
How to decide
- Constraints first. Must it run in your own cloud or on-premise? AWS-only teams may accept Step Functions. A company with no spare ops staff may avoid self-hosting a Temporal cluster.
- Language. Pick an engine with a first-class SDK in the language your agent code already uses.
- Replay model. Event-history engines require deterministic workflow code, which is a discipline to learn but gives exact recovery. Step-based engines (Inngest, Restate, DBOS) ask you to wrap each side effect in a step.
- Workload fit. A single agent loop that only needs to pause and resume may need only a checkpointer. A multi-service business process with timers and approvals suits a workflow engine.
- Operations. Count what you must run: a server cluster, a database, nothing.
Before and after
Before: "We'll use Temporal because it is the most popular." The team writes TypeScript, has no platform engineers, and the run rate is a few hundred jobs a day.
After: they compare against constraints. A Postgres they already run plus DBOS, or a managed offer, meets the need with less to operate. They record the reason in a one-page decision note.
What goes wrong
- Picking by popularity or demo. The demo rarely shows your failure and deploy cases.
- Underestimating operations. Self-hosted clusters need upgrades, monitoring and backups.
- Mixing two engines for one job. A queue, a checkpointer and a workflow engine each retrying the same step multiply attempts.
- Skipping a spike. Build one real flow, including a crash mid-run and a deploy, before committing.
Examples
A short decision note
Need: nightly research agents, 10 to 20 minute runs, human approval step, TypeScript, team of four, Postgres already in use, no on-call platform staff. Shortlist: DBOS (library on our Postgres) and Inngest (managed). Spike: crash a worker at step 3, deploy mid-run, and check no email is sent twice. Decision: record the winner and the reason.
When a checkpointer is enough
A support agent built in LangGraph pauses for a manager's approval and resumes with the same thread id. Retries, timers and cross-service coordination are not needed, so a Postgres checkpointer covers it.
Key points
- Decide on hosting, language support, replay model and operating cost, in that order of constraint.
- Event-history engines such as Temporal replay deterministic workflow code; step-based engines save each wrapped step's result.
- A framework checkpointer can be enough when the job is one agent graph that only needs to resume or pause.
- Step Functions suits teams that are already on AWS and accept its state-machine model.
- Prove the choice with a small spike that includes a crash and a deploy mid-run.
Common mistakes
- Choosing by popularity instead of hosting and language constraints.
- Ignoring the cost of operating a self-hosted cluster.
- Stacking queue retries, checkpointer retries and engine retries on the same step.
- Committing without a spike that tests a crash and a deploy.
Check yourself · 2 of 3
Which statement about replay is correct?
Check yourself · 3 of 3
A team is fully on AWS and wants a managed service with no servers to run for a long approval flow. Which option fits best?
Practice items, not counted towards your mastery.
Start here
- Temporal documentation (opens in a new tab)DocsFree
Workflows, activities, signals and timers, with the replay model explained from the source.
- Persistence (LangGraph docs) (opens in a new tab)DocsFree
How checkpointers save graph state after each step so a run can resume or wait.
- Restate documentation (opens in a new tab)DocsFree
A durable execution engine that journals each step; useful for comparing replay designs.
More for this topic
- DBOS documentation (opens in a new tab)DocsFree
Durable workflows stored in Postgres as a library, with no separate server to run.