Durable Execution
Learn how durable execution survives failures and makes building long-running code simple.
- step.run(supported)
- Sleep and sleep until(supported)
- Wait for event(supported)
- Wait for signal(supported)
- Invoke another function(supported)
- Send events from a step(supported)
- Parallel steps(supported)
- AI inference step(supported)
- step.fetch(supported)
- defer(supported)
- Experiments(supported)
- Flow control(supported)
- Cron triggers(supported)
- Per-function failure handler(supported)
- CheckpointingDefault(supported)
- Durable endpointsBeta(supported)
- Connect workers(supported)
- Middleware(supported)
- step.run(supported)
- Sleep and sleep until(supported)
- Wait for event(supported)
- Wait for signal(not supported)
- Invoke another function(supported)
- Send events from a step(supported)
- Parallel steps(supported)
- AI inference step(supported)
- step.fetch(not supported)
- defer(not supported)
- Experiments(not supported)
- Flow control(supported)
- Cron triggers(supported)
- Per-function failure handler(supported)
- Checkpointing(not supported)
- Durable endpoints(not supported)
- Connect workers(supported)
- Middleware(supported)
- step.run(supported)
- Sleep and sleep until(supported)
- Wait for event(supported)
- Wait for signal(supported)
- Invoke another function(supported)
- Send events from a step(supported)
- Parallel steps(supported)
- AI inference step(supported)
- step.fetch(supported)
- defer(not supported)
- Experiments(not supported)
- Flow control(supported)
- Cron triggers(supported)
- Per-function failure handler(not supported)
- Checkpointing(supported)
- Durable endpointsBeta(supported)
- Connect workers(supported)
- Middleware(supported)
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.
- Read Durable Workflows to see how triggers, runs, and checkpoints fit together.
- Read our Quick start to build a workflow.
- Learn how Events and triggers start work.
- Read Flow control to orchestrate and manage your functions.
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.
- Read Durable Endpoints for the request and response flow
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.
- Read Durable Agents to see how agent loops, waits, and sub-agents work.
- Build an agent tool loop.
Next up
Read below to learn more and get started:
- Concepts defines runs, triggers, steps, waits, and retries for both entry points.
- Primitives introduces the operations you can put inside a run, and which ones work in durable endpoints.
- Flow control, Events and triggers, Error handling, and Cancellation cover how runs start, recover, and stop.
- Advanced covers idempotency, versioning, testing, patterns, middleware, logging, and checkpointing.
- Deploying functions explains HTTP Serve and Connect for functions on your infrastructure. Inngest compute is planned as an app-level hosting option.
- Limits, Best practices, and Troubleshooting help you ship and operate durable workflows. Check the Durable Endpoints page for its beta limits.