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

Any logic wrapped in a step can be automatically retried and memoized for durability, without extra boilerplate or checkpoints.

State included

Every instance persists to its own local state: no need to set up or manage a database or control plane.

Human-in-the-loop

Wait on external events: webhooks, approvals, queue messages — and use them to determine the next steps in your Workflow.

How do Workflows work?

Background Pattern
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.

Background Pattern
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.

Background Pattern
Just write code

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

Background Pattern
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.

Background Pattern
Workflows

Ideal for resilient, multi-step systems

You can use Workflows to:

View docs

Building AI agents

Code review tasks, compact context, or processing data

Asynchronous tasks

Lifecycle emails, billing jobs, and critical data processing tasks

Post-processing user-generated content

Run inference, clean up or validate uploaded 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.

Background Pattern
import boto3

s3 = boto3.resource('s3',
  endpoint_url = 'https://{your-account-id}.r2.cloudflarestorage.com',
  aws_access_key_id = '{access_key_id}',
  aws_secret_access_key = '{access_key_secret}'
)

Workflows Pricing

Orchestrate complex multi-step processes. View Compute pricing details

Requests

Free

Paid

$0.30 / million requests

CPU Time

Free

Paid

$0.02 / million CPU ms

Storage

Free

Paid

$0.20 / GB-month

npm

Over 10 million developers around the world rely on the npm Registry to download packages over 1 billion times a day. We invested in Cloudflare Workers to improve our global performance, and now with the Cloudflare Workers globally available key-value store (Cloudflare Workers KV), we can make performance improvements that used to be impossible. ”

Laurie Voss
Laurie Voss Co-founder and Chief Data Officer

Powerful primitives, seamlessly integrated

Built on systems powering 20% of the Internet, Workflows run on the same infrastructure Cloudflare uses to build Cloudflare. Enterprise-grade reliability, security, and performance are standard.

Build without boundaries

Join thousands of developers who've eliminated infrastructure complexity and deployed globally with Cloudflare. Start building for free — no credit card required.