AI systems · Architecture
Durable execution is the real reliability layer for AI agents.
A long-running agent should not forget its work just because one model call times out. Reliability means knowing exactly what to repeat and, just as importantly, what not to.
I have been building research agents lately, and the definition of “reliable” has become much stricter. A workflow that restarts after nine successful minutes because its final LLM request failed is not merely inconvenient. It spends tokens twice, repeats external calls, and makes cost and latency harder to reason about.
Retries alone do not solve that problem. The workflow needs a durable record of each completed unit of work, plus a way to suspend safely when progress depends on a person. That is the execution model I want around an agent, not an endlessly occupied worker hoping everything stays healthy.
Resume after failure
Completed work is checkpointed, so a retry begins at the unresolved step.
Pause without compute
Waiting for a reviewer is represented as state, not an idle process.
Protect side effects
Publishing and writes are designed to be idempotent and safe to retry.
The failure path
A timeout should fast-forward, not restart.
Consider a research flow: retrieve documents, extract evidence, generate a draft, then wait for editorial approval. If drafting fails, retrieval and extraction are already known-good. On retry, the orchestrator returns their stored results and runs only drafting again.

Retrieve sources
Result stored after completion.
Extract evidence
LLM output stored after completion.
Generate draft
LLM call fails before a checkpoint.
Wait for editor approval
No worker remains allocated.
Publish once approved
Idempotent side effect, then checkpoint.
The diagram shows the important distinction: a retry replays control flow, while durable state decides which work must actually execute.
The execution boundary matters.
Inngest gives this model a clean boundary. Your application defines a sequence of named steps; its runner and executor handle orchestration and persist execution state. A call wrapped in step.run becomes a replay-safe unit: when it has a result, that result is reused; when it does not, it runs.
const draft = await step.run('generate-draft', async () => {
return generateDraft(evidence);
});
await step.waitForEvent('editor.approved', {
match: 'data.draftId',
});
await step.run('publish', async () => publishOnce(draft));The wait is just as important as the retry. A human review can take minutes or days; neither case should reserve a process. The execution sleeps as durable state, then resumes when the approval event arrives.
The bar is not “it retries.”
The bar is a system that can tell, with confidence, which work is complete, which work is pending, and which side effects are safe to attempt again. For durable AI agents, that precision is where reliability and sane unit economics actually start.