Dynamic Workflows: Unifying Durable Execution with Multi-Tenant Flexibility

In the evolving landscape of cloud computing, platforms are increasingly demanding both durability and dynamicism: the ability to run code that persists across failures and sleeps for hours, while also allowing each tenant or agent to define its own unique logic at runtime. Cloudflare's latest offering, Dynamic Workflows, bridges this gap by combining the resilience of durable execution with the flexibility of dynamic deployment. This Q&A explores how it solves real-world platform challenges.

What is the core problem that Dynamic Workflows addresses?

Traditional durable execution engines, like Cloudflare Workflows, assume that workflow code is static—bundled as part of a deployment with a single class bound to the engine. This works well for applications where you own all code. However, it breaks down in multi-tenant scenarios: for example, an AI-powered platform that writes custom TypeScript for each tenant, a CI/CD product where every repo defines its own pipeline, or an agent SDK where agents craft their own long-running plans. In these cases, each tenant, agent, or request needs a different workflow class, which a static binding cannot support. Dynamic Workflows solves this by allowing workflow code to be handed to the engine at runtime, just like Dynamic Workers does for compute.

Dynamic Workflows: Unifying Durable Execution with Multi-Tenant Flexibility
Source: blog.cloudflare.com

What are Dynamic Workers and how do they relate to Dynamic Workflows?

Dynamic Workers, introduced as an open beta last month, give platforms a clean primitive for dynamic compute. Instead of pre-deploying a Worker, you can hand the Workers runtime some TypeScript code at runtime and get back an isolated, sandboxed Worker on the same machine—in single-digit milliseconds. This enables multi-tenant SaaS where every customer's business logic is code the platform has never seen before. Dynamic Workflows extends this same idea to durable execution: you can now dynamically deploy workflow definitions for each tenant or agent, ensuring that the runtime engine can call the right class per session, without any static binding. Together, they form a cohesive stack for building platforms that need both compute and orchestration that adapts per tenant.

What role do Durable Object Facets and Artifacts play in this ecosystem?

Before Dynamic Workflows, Cloudflare already introduced two companion pieces: Durable Object Facets and Artifacts. Durable Object Facets extend dynamic deployment to storage—each dynamically-loaded app gets its own SQLite database, spun up on demand, with the platform acting as a supervisor. Artifacts do the same for source control: a Git-native, versioned filesystem that can be created by the tens of millions, one per agent, session, or tenant. Dynamic Workflows now completes the triad by adding durable execution. With all three, a platform can deploy compute (Dynamic Workers), storage (Facets), source control (Artifacts), and orchestration (Workflows)—all dynamically, per tenant, without any pre-defined bindings.

How does Cloudflare Workflows work typically?

Cloudflare Workflows is a durable execution engine that transforms a run(event, step) function into a resilient program. Every step can survive failures, sleep for hours or days, wait for external events, and resume exactly where it left off even if the underlying isolate is recycled. It's designed for any task that must persist beyond a single request: onboarding flows, video transcoding pipelines, multi-stage billing, or long-running agent loops. With Workflows V2, the engine now supports up to 50,000 concurrent instances and 300 new instances per second per account, making it suitable for agentic workloads. However, the traditional model assumed one fixed workflow class per deployment—a limitation that Dynamic Workflows removes.

What exactly is Dynamic Workflows?

Dynamic Workflows is the bridge between durable execution and dynamic deployment. It allows platforms to provide workflow code at runtime, enabling each tenant, agent, or request to have its own unique workflow class—without any pre-defined binding in wrangler.jsonc. Instead of declaring a single class like MyWorkflow, the engine can accept a dynamic workflow definition that is different every time. This is the same paradigm shift that Dynamic Workers brought to compute. Together, they let platforms run code that the platform itself has never seen before, with all the durability guarantees of Workflows: step-level persistence, sleep, external event waiting, and automatic retries.

Dynamic Workflows: Unifying Durable Execution with Multi-Tenant Flexibility
Source: blog.cloudflare.com

What kind of platforms benefit from Dynamic Workflows?

Any platform that needs to run user-defined, tenant-specific, or agent-generated orchestration logic benefits directly. Examples include: AI platforms where the AI writes TypeScript for each tenant and then executes that as a durable workflow; CI/CD systems where each repo defines its own pipeline steps; agent SDKs where each agent crafts its own multi-step plan that must survive failures; SaaS applications that let customers upload custom business logic; and low-code platforms that compile visual flows into workflow code. In all these cases, the platform cannot know in advance what the workflow will look like—it needs to accept it at runtime. Dynamic Workflows provides exactly that, with the scalability of up to 50,000 concurrent instances per account.

How does this compare with static workflows?

Static workflows, where the code is part of the deployment, are simpler and sufficient when you own the entire application. You define one class in wrangler.jsonc and the engine runs it. But that model locks you into a single version for all executions. Dynamic Workflows, on the other hand, allows the workflow code to be different for every invocation. The trade-off is that the platform must manage dynamic code delivery, isolation, and lifecycle—but Cloudflare handles the sandboxing and machine locality. For multi-tenant and agentic use cases, the flexibility far outweighs the added complexity. In essence, static workflows are like a fixed recipe; dynamic workflows let each tenant bring their own recipe to the kitchen.

What are the future implications of Dynamic Workflows?

Dynamic Workflows unlocks a new class of platform applications where code is not just deployed but generated at runtime. This aligns with the rise of AI agents that write and run their own tools, and with platforms that want to offer programmable environments without requiring pre-deployment. By combining Dynamic Workers (compute), Durable Object Facets (storage), Artifacts (source control), and Dynamic Workflows (orchestration), Cloudflare now provides a full stack for building dynamic, multi-tenant platforms. We can expect to see more sophisticated agent loops, personalized SaaS workflows, and event-driven systems that adapt per user. The key innovation is that the runtime no longer assumes a monolithic deployment—it embraces diversity per execution.

Tags:

Recommended

Discover More

A Step-by-Step Guide to Neoadjuvant Immunotherapy for Colorectal Cancer: The Pembrolizumab Breakthrough8 Things You Should Know About the ASUS ROG RAIKIRI II's Linux SupportAI Agent Isolation Crisis: Sandboxing Strategies Emerge as Critical Defense Against Autonomous Threats10 Essential Insights for Shared Design LeadershipEsoteric Ebb: A Tabletop-Style CRPG Where Your Inner Voices Roll the Dice