Workflows
Build durable workflows & multi-step applications
Workflows is an execution engine built on Cloudflare Workers — to build applications that can automatically retry, persist state and run for minutes, hours, days, or weeks. No need to worry about scaling, managing infrastructure, or handling durability: Workflows takes care of it for you.
Step-based
State included
Human-in-the-loop
How do Workflows work?

State included
Every Workflow instance has its own built-in local database. State is automatically persisted and replayed: no need to run (or scale) complex database infrastructure.

Pay only for actual compute time
You are only billed while code executes. Waiting for third-party APIs or approvals costs $0, so bills are dramatically lower than duration-based platforms or self-hosted alternatives.

Just write code
Write code, test it, and use your favorite packages and API libraries — no custom DSL needed.

Human-in-the-loop
Build Workflows that can wait for events — approvals from a human, webhooks from a payment processor, or messages from a queue — with just a single line of code.
Building AI agents
Asynchronous tasks
Post-processing user-generated content
A durable execution engine to build multi-step applications
Workflows introduces a programming model that makes it easier to build reliable, long-running tasks, observe as they progress, and programmatically trigger instances based on events across your services. Workflows automatically retry, persist state, and run for minutes, hours, days, or weeks.

export class CheckoutWorkflow extends WorkflowEntrypoint { async run(event, step) { const processorResponse = await step.do('submit payment', async () => { let resp = await submitToPaymentProcessor(event.params.payment); return await resp.json<any>(); }); const textResponse = await step.do('send confirmation text', sendConfirmation); await step.sleep('wait for feedback', '2 days'); await step.do('send feedback email', sendFeedbackEmail); await step.sleep('delay before marketing', '30 days'); await step.do('send marketing follow up', sendFollowUp); } }
Workflows Pricing
Orchestrate complex multi-step processes. View Compute pricing details
Requests
100k / day
$0.30 / million requests
CPU Time
10 ms / invocation
$0.02 / million CPU ms
Storage
1 GB
$0.20 / GB-month