2026 Comparative Analysis: Durable Execution Infrastructure for Long-Running AI Agents — Applied Technology Index

Executive Summary

Durable execution is the infrastructure pattern that lets an AI agent survive process crashes, worker restarts, deployment changes, network failures, delayed approvals, and long waits without restarting the entire task. It matters when an agent performs multiple model calls or tool actions, incurs paid side effects, pauses for a person, or continues beyond the lifetime of one request.

The products reviewed here occupy different layers. Temporal and Azure Durable Task use event histories and deterministic replay to reconstruct workflow state. AWS Step Functions uses managed state machines with explicit execution semantics and deep AWS service integration. Cloudflare Workflows provides durable JavaScript or TypeScript steps inside the Workers platform. LangGraph checkpoints an agent graph at super-step boundaries, while LangSmith Agent Server adds managed persistence and a task queue around graph runs.

These systems are not interchangeable. Temporal is the broadest general-purpose durable application platform in this comparison and now publishes a pre-release OpenAI Agents SDK integration. LangGraph is the most agent-native state-machine abstraction reviewed, with checkpoints, interrupts, thread state, and trajectory forking close to the model loop. Azure Durable Task is a strong code-first fit for Azure and Microsoft language estates. AWS Step Functions is strongest for explicit cloud orchestration and AWS control-plane integration. Cloudflare Workflows offers a low-operations path for Workers-native applications, with published limits and pricing dimensions that buyers can inspect.

Durability does not make an agent action exactly once. A runtime can preserve orchestration progress while an external API, browser, payment rail, email server, or database still observes duplicate attempts. Production safety therefore depends on idempotency keys, deduplication, reconciliation, compensating actions, bounded retries, approval records, and version-aware recovery in addition to workflow persistence.

Key findings

  • Durable execution and agent memory solve different problems. Memory preserves facts or conversational context; durable execution preserves control-flow progress, pending work, and recovery state.
  • Temporal and Azure Durable Task explicitly reconstruct state from event history, which requires deterministic orchestration code and pushes network, file, model, and other nondeterministic work into activities.
  • LangGraph saves graph-state snapshots at super-step boundaries and task-level pending writes. This is well aligned with iterative agent graphs, but the effective guarantee depends on the selected checkpointer, durability mode, node boundaries, and idempotency of node side effects.
  • AWS Step Functions publishes distinct execution semantics: Standard Workflows are long-running, auditable, and described as exactly-once workflow execution; Express variants have different at-least-once or at-most-once behavior. Those workflow semantics do not remove the need to make external tasks safe to retry.
  • Cloudflare Workflows exposes durable steps, waits, retries, external events, pause and resume, restart, termination, and rollback handlers. Its published limits include state-retention windows, per-step state limits, and step-count ceilings that must be modeled for long agent loops.
  • Human approval is a first-class primitive across the category, but approval integrity is an application concern. A durable pause is not sufficient unless the resumed action is bound to the reviewed arguments, identity, policy version, and expiration.
  • Versioning is a hidden procurement criterion. Long-running executions may outlive several deployments, so buyers must test whether changed workflow code can replay or resume old state safely.

Methodology

This analysis reviewed public technical documentation available on 25 July 2026. Current developer and vendor discussion was used only to identify durable execution as an active infrastructure concern. Product capabilities and limitations are grounded in official documentation from Temporal, LangChain and LangSmith, Microsoft, AWS, and Cloudflare.

Each system was assessed on seven criteria:

  1. Recovery model: event replay, state checkpoints, managed state transitions, or durable step outputs.
  2. Agent fit: support for loops, model calls, tools, graph state, multi-agent handoffs, or an agent runtime integration.
  3. Side-effect boundary: how the system separates replayable orchestration from external work and how retries affect tools.
  4. Human interaction: pauses, signals, callbacks, interrupts, or external events that can resume execution.
  5. Operations: instance inspection, history, pause, resume, termination, debugging, and deployment management.
  6. Platform constraints: languages, cloud coupling, execution limits, retention, payload size, and versioning requirements.
  7. Evidence gap: absence of a shared benchmark for recovery correctness, latency, cost, throughput, or operational burden.

This is an architecture comparison, not a reliability or performance benchmark. No common agent workload was executed across the systems. “Exactly once,” “at least once,” “fault tolerant,” and similar terms are reported only in the scope used by each product’s documentation; they should not be interpreted as a universal guarantee for an external side effect.

Comparative Analysis Table

SystemDurable state modelAgent-specific strengthMain constraintBest operator fit
TemporalOrdered event history with deterministic workflow replay; external work runs as ActivitiesPre-release OpenAI Agents SDK integration runs the agent loop in a Workflow and model calls as Activities; supports long-lived messaging and broad language SDKsDeterministic workflow rules, event-history growth, worker operations, and safe code versioning add engineering disciplineTeams needing general-purpose, long-running, code-first orchestration across services, models, and clouds
LangGraph and LangSmith Agent ServerGraph-state checkpoints at super-step boundaries, task-level pending writes, thread IDs, and persistent queue-backed runsClosest fit to cyclic agent graphs, checkpointed conversation state, trajectory inspection, interrupts, and human reviewGuarantee strength depends on checkpointer and durability mode; nodes can restart and side effects still require idempotencyAI teams that want agent-native control flow and rapid inspection or modification of trajectories
Azure Durable Task and Durable FunctionsEvent-sourced execution history with deterministic orchestrator replay and checkpointing at awaits or yieldsCode-first orchestrators, activities, entities, timers, and long-running instance management across Microsoft-supported languagesAzure hosting and storage choices, deterministic code constraints, and replay-aware deployment practicesAzure enterprises coordinating agents with Functions, Microsoft services, and existing operational controls
AWS Step FunctionsManaged state-machine transitions with Standard and Express execution typesExplicit retries, catches, callbacks, human-in-the-loop patterns, IAM, and optimized Bedrock AgentCore harness invocationAmazon States Language and AWS coupling; AgentCore harness integration is request-response only and has a documented 15-minute task limitAWS organizations that need auditable service orchestration and policy-controlled agent steps
Cloudflare WorkflowsPersisted results from named step.do boundaries plus durable sleeps, events, retries, and instance lifecycle APIsSimple TypeScript control flow near Workers, AI, R2, D1, Queues, and edge-facing applicationsWorkers runtime and plan limits, finite state retention, serializable step outputs, and bounded step countsCloudflare-native teams prioritizing low operations and globally distributed application entry points

Observed Profiles

Temporal: durable application code with an explicit replay contract

Temporal records a complete ordered Event History for each Workflow Execution. When execution resumes, workflow code is replayed from the beginning and prior recorded results guide it back to the previous logical state. Timers and completed Activities are not performed again during replay. Workflow code must therefore make the same decisions against the same history; network calls, database queries, LLM invocations, and file I/O belong in Activities.

That separation is useful for agents because model calls and tools are expensive, nondeterministic, and often side-effecting. Temporal’s TypeScript integration for the OpenAI Agents SDK places the agent loop, tool selection, and handoffs inside the Workflow while model calls execute as Activities. The documentation says model results are reused during replay and agents can survive Worker restarts. The integration is explicitly labeled pre-release, so it should be evaluated as an emerging adapter rather than the sole basis for production selection.

Temporal’s main operational trade-off is the replay contract. A workflow that lives for months can encounter many application deployments. Temporal recommends Worker Versioning or patching APIs for changes that would break determinism and recommends replay testing against representative histories before deployment. This is extra discipline, but it makes code-version compatibility visible rather than allowing old runs to fail silently after rollout.

Temporal is strongest where durability is a property of the wider business process, not only the model loop. It can coordinate an agent, databases, human decisions, fulfillment systems, and compensating actions in one execution model. Buyers should still test Event History growth, data encryption, activity idempotency, worker scaling, and the operational difference between Temporal Cloud and self-hosting.

LangGraph and LangSmith Agent Server: checkpoints close to the agent trajectory

LangGraph’s checkpointers save graph state at each super-step. They enable thread-scoped memory, human-in-the-loop interruption, time-travel debugging, fault recovery, and forking from earlier checkpoints. The documentation also describes task-level pending writes: if parallel nodes in one super-step complete before another node fails, successful writes can be retained so those nodes do not need to run again on resume.

This model is highly extractable for agent operations. A planner, tool node, critic, approval node, and response node can be represented explicitly, and the operator can inspect which state and node will execute next. Interrupts save graph state and wait indefinitely for external input. When execution resumes, the node containing the interrupt restarts from its beginning, which means code before the interrupt may run again. Side effects should therefore occur after approval or be protected by idempotency.

LangSmith Agent Server adds a deployment layer with a persistent task queue, PostgreSQL-backed run and checkpoint data by default, and stateless queue workers. Its documentation distinguishes durability modes: the default async mode writes after each step, while exit stores only final state. That configuration materially changes recovery exposure and should be part of an architecture review, not treated as an implementation detail.

LangGraph is the clearest fit when the unit of reasoning is an agent graph and operators value trajectory control. It is less direct when the workflow must coordinate many non-AI services for months under formal process guarantees. A common architecture can place a LangGraph agent inside a broader durable workflow, but that composition creates two state machines whose identifiers, retries, cancellation, and traces must be correlated.

Azure Durable Task: event-sourced orchestration in the Microsoft estate

Azure Durable Functions extends Azure Functions with orchestrator, activity, and entity functions. The newer Durable Task positioning also includes standalone SDKs backed by the managed Durable Task Scheduler. Microsoft documents that orchestrations automatically checkpoint progress at await or yield, can run for seconds, days, months, or indefinitely, and reconstruct local state by replaying an append-only execution history.

Like Temporal, the orchestrator must be deterministic. Microsoft specifically warns against direct wall-clock time, random identifiers, environment-variable reads, network I/O, and other changing inputs inside orchestration code; those operations should use replay-safe context APIs or run in activities. This is especially relevant to agents because a model call cannot be safely repeated merely to reconstruct control state.

Instance-management APIs cover start, query, terminate, suspend, resume, and purge. This gives operators a usable control plane for delayed approvals and stuck executions. The language range—C#, JavaScript, TypeScript, Python, PowerShell, and Java for Durable Functions, with a narrower set for the standalone SDKs—fits heterogeneous Microsoft estates.

The primary selection question is whether the organization wants Azure Functions semantics or the standalone Durable Task SDK model. Storage provider, task-hub design, history growth, diagnostics, and deployment compatibility remain operator responsibilities. Agent-specific abstractions must generally be assembled above Durable Task rather than assumed from the runtime.

AWS Step Functions: explicit state machines and cloud control-plane integration

AWS Step Functions defines workflows as state machines composed of states and tasks. Standard Workflows are documented as long-running and auditable, can run for up to one year, and provide exactly-once workflow execution unless retry behavior is configured. Express Workflows target high-rate, short-lived execution and have different delivery semantics. The distinction is critical: choosing a workflow type changes duration, history, billing, integrations, and retry exposure.

For agent systems, Step Functions provides deterministic policy points around otherwise probabilistic work. A state can call an agent, inspect output, branch, retry selected errors, wait for a callback, request approval, or invoke a downstream service under IAM. AWS now documents an optimized integration that invokes an Amazon Bedrock AgentCore harness for model inference, tool use, and multi-turn conversation.

The AgentCore integration has important boundaries. It supports request-response only, not .sync job waiting or task-token callbacks. The task has a documented maximum execution time of 15 minutes even if the harness is configured to continue longer, and stopping the Step Functions execution does not stop the harness. Only the final assistant text is returned through the optimized response; earlier turns, reasoning blocks, and tool-use blocks are omitted, although a CloudWatch link can expose turn-level observability.

Step Functions is a strong choice when an agent is one governed step in an AWS process. It is less natural for fine-grained, cyclic model loops if every turn becomes a visible state transition. Architects should decide whether the durable boundary belongs outside an AgentCore invocation, inside the agent harness, or at both layers.

Cloudflare Workflows: durable steps inside the Workers platform

Cloudflare Workflows lets a TypeScript or JavaScript run method use ordinary control flow around named durable steps. step.do persists serializable results and supports retry and timeout configuration. Workflows can sleep, wait for external events, pause, resume, terminate, restart, and register rollback handlers for compensating actions.

This is well matched to edge-facing agent applications that already use Workers, AI Gateway, R2, D1, Queues, or Durable Objects. A workflow can gather data, invoke an AI service, wait for approval, and publish without maintaining a separate orchestration cluster. External events can be buffered before the workflow reaches the matching wait step, and waiting instances do not count as actively running concurrency.

Cloudflare’s unusually concrete limits improve procurement clarity. As documented on 25 July 2026, Workers Paid defaults to 10,000 steps and can be configured up to 25,000; non-stream step results are limited to 1 MiB; persisted state per instance is limited to 1 GB on Paid; sleep and event waits can extend up to 365 days; and completed instance state is retained for 30 days on Paid by default. These values can change, but they expose where an unbounded agent loop, large tool result, or long audit-retention requirement will collide with the platform.

Pricing is also multidimensional. Cloudflare documents billing for requests, CPU time, storage, and steps, with step and storage billing scheduled to begin on 10 August 2026. Agent buyers should model retries, trajectory length, and retained state rather than comparing only invocation price.

Buyer and operator implications

Choose the durable boundary deliberately. A whole business process, one agent run, each tool call, and each model turn are different units of recovery. Finer checkpoints reduce repeated work but increase state, transitions, and operational complexity.

Require idempotency for every consequential tool. Assign a stable operation ID before sending email, charging a card, publishing content, changing permissions, or writing to an external system. Record the remote result so a resumed workflow can reconcile instead of repeating the action blindly.

Bind approval to an immutable action envelope. The approval record should include the user and agent identities, tool, arguments or hash, destination, policy version, expiration, and workflow or thread ID. If any material field changes after approval, require a new decision.

Test recovery, not only success. Kill workers before and after model calls, during parallel tools, while waiting for a person, and after a remote side effect succeeds but before local state is committed. Verify what repeats, what resumes, and what requires reconciliation.

Treat deployments as workflow migrations. Run old executions against new code or pin them to compatible workers. Test changed graph topology, renamed steps, altered tool schemas, and removed activities. A normal web deployment model is insufficient for runs that outlive releases.

Separate orchestration history from model context. The runtime needs durable control state; the model needs a bounded, relevant context. Do not inject an entire event history into each prompt. Store large artifacts externally and pass references with provenance and retention policy.

Correlate identifiers across layers. Logs should connect user, agent, workflow execution, graph thread, model trace, tool invocation, approval, sandbox, and external operation IDs. Composing two durable systems without a shared correlation model can make recovery harder rather than easier.

Limitations

This analysis relies on public documentation and does not include hands-on recovery tests, private architecture, service-level agreements, security reports, production incident data, enterprise pricing, or workload-specific cost simulations.

The systems differ in scope. Temporal and Azure Durable Task are code-first durable execution platforms; Step Functions is a managed state-machine service; Cloudflare Workflows is a Workers-native orchestration product; LangGraph is an agent graph runtime with optional managed deployment through LangSmith. A capability appearing in the same table does not imply equivalent semantics or maturity.

No common standard defines exactly-once agent behavior across model providers and external tools. Vendor workflow guarantees may apply to state-machine execution but not to a remote side effect. Network failure can make the caller uncertain whether an operation completed, so end-to-end correctness still requires application-level idempotency and reconciliation.

Documentation, limits, integrations, pricing, retention, and pre-release status may change after publication. Temporal’s OpenAI Agents SDK integration is explicitly pre-release. AWS’s optimized AgentCore harness integration and Cloudflare’s July 2026 workflow APIs should be verified against current documentation before production design.

References

  1. Temporal: Workflow and replay overview
  2. Temporal: OpenAI Agents SDK integration
  3. Temporal: Safely deploying changes to Workflow code
  4. LangGraph: Checkpointers
  5. LangGraph: Interrupts
  6. LangSmith: Agent Server
  7. Microsoft Learn: Durable Functions overview
  8. Microsoft Learn: Durable orchestrations
  9. Microsoft Learn: Durable orchestrator code constraints
  10. Microsoft Learn: Manage orchestration instances
  11. AWS: What is Step Functions?
  12. AWS: Choosing a Step Functions workflow type
  13. AWS: Handling errors in Step Functions
  14. AWS: Invoke Amazon Bedrock AgentCore harness with Step Functions
  15. Cloudflare: Workflows overview
  16. Cloudflare: Workflows Workers API
  17. Cloudflare: Workflows events and parameters
  18. Cloudflare: Trigger and manage Workflows
  19. Cloudflare: Workflows limits
  20. Cloudflare: Workflows pricing

Changelog

  • 2026-07-25: Initial publication.

Corrections

No corrections have been issued for this document.