Platform

Durable Execution

Learn how durable execution survives failures and makes building long-running code simple.

SDK support
TypeScript
Python
Go

What is durable execution?

A durable function is application code that Inngest coordinates as a run which survives failures and can wait indefinitely. A run has its own input, steps, and trace. Inngest stores each completed step's result. When work resumes after a retry or wait, functions resume from the last completed step instead of from the start.

For example, an AI workflow can retrieve context, call an LLM, and validate the response in separate steps. If the LLM call fails or returns an invalid response, the next attempt reuses the retrieved context and continues from the failed step. You can see the failed step and its retry in the run trace. This occurs over your entire agent run.

Benefits:

  • Recover from failure. Retry failed work without starting the whole run again.
  • Wait without holding compute. Resume after a delay or external event without keeping a worker busy.
  • Control load for workflows. Set concurrency and other flow controls to protect services your workflow calls.
  • See what happened. Inspect steps, waits, retries, and failures in Traces.
  • Run anywhere. Inngest orchestrates code on any compute and works on your current infrastructure.

All functions can run code in Sandboxes, measure outcomes with Agent Evals, and publish progress through Realtime. For framework setup and method signatures, use SDKs & APIs.


Types of durable functions

You can deploy multiple types of durable functions using Inngest:

Durable workflows

Durable workflows are typically background functions invoked from an event, schedule, webhook, or another function. Your app triggers a workflow that runs asynchronously, then moves on to other processing. Use this path for jobs that take time, wait for another action, or coordinate several services.

Durable endpoints

Durable endpoints are API endpoints that survive intermittent errors. They are regular HTTP endpoints, and they return results as HTTP responses, even after temporary errors and retries. This brings the power of durable execution to every API endpoint you write, without updating any client code.

Durable agents

Durable agents are workflows whose next step is chosen by a model. Each model call and tool call runs as a step, so an agent keeps its progress through failures, waits for people without holding a worker, and delegates work to sub-agents.


Next up

Read below to learn more and get started: