# Temporal use cases and design patterns

> For the complete documentation index, see [llms.txt](https://docs.temporal.io/llms.txt).
> Any documentation page is available as raw Markdown by appending `.md` to its URL.

> Temporal in production at Stripe, Coinbase, Netflix, and others, with the design patterns and Guides that implement each application shape.

Across industries, Temporal applications fall into a handful of shapes: a transaction that must not
half-complete, a process that waits days for a person, an entity that accumulates state for years, a
pipeline that fans out across GPUs. This page groups those shapes, names companies running each one
in production, and points to the pattern or Guide that implements it.

[Why Temporal](/evaluate/why-temporal) covers what the platform replaces, and
[Understanding Temporal](/evaluate/understanding-temporal) covers the vocabulary.
[Design Patterns](/design-patterns) is the code-level catalog, and [Guides](/guides) are full
implementation walkthroughs built on top of those patterns.

## Temporal in production

These are the use cases where Temporal runs at scale today. For more companies and a deeper look at
each, see [Temporal in use](https://temporal.io/in-use).

### Transactions

Operations across two or more parties where a partial completion leaves money or data in the wrong
state.

- [Payment processing at Stripe](https://temporal.io/resources/on-demand/stripe)
- [Money movement at Coinbase](https://temporal.io/in-use/coinbase)
- [Content management at Box](https://temporal.io/resources/case-studies/box)

Start with the [Saga pattern](/design-patterns/saga-pattern) to compensate for steps that already
succeeded, and [Non-Retryable Errors](/design-patterns/non-retryable-errors) to fail fast on a
rejection that no retry will fix. See
[distributed transaction patterns](/design-patterns/distributed-transaction-patterns) to choose
between them.

### Business processes

A sequence of steps that ends in a service or product delivered to a customer, often with a person
in the middle.

- [Bookings at Turo](https://temporal.io/replay/videos/temporal-adoption-and-integration-at-turo)
- [Orders and logistics at Maersk](https://temporal.io/replay/videos/building-a-time-machine-for-the-logistics-industry)
- [Marketing campaigns at Airbnb](https://medium.com/airbnb-engineering/journey-platform-a-low-code-tool-for-creating-interactive-user-workflows-9954f51fa3f8)
- [Human-in-the-loop at Checkr](https://temporal.io/in-use/checkr)

Use the [Approval](/design-patterns/approval) pattern for the steps that block on a decision, and
[Updatable Timer](/design-patterns/updatable-timer) for deadlines that move. The
[reliable document approvals](/guides/reliable-document-approvals) Guide walks through a full
implementation.

### Entity lifecycle

A long-lived business entity — an account, a device, a loan application — that accumulates state
over months or years.

- [Mortgage underwriting at ANZ](https://temporal.io/in-use/anz-story)
- [Menu versioning at Yum! Brands](https://temporal.io/replay-2023/videos/synchronizing-concurrent-workflows)

Give each instance one [Entity Workflow](/design-patterns/entity-workflow) and drive every state
transition with a Signal or an Update, then use
[Continue-As-New](/design-patterns/continue-as-new) to keep Event History bounded. The
[loyalty points](/guides/entity-pattern-loyalty-points) and
[gaming sessions](/guides/durable-gaming-sessions) Guides show the pattern end to end.

### Operations and infrastructure

Repeatable internal automation: provisioning, deployments, and scheduled maintenance.

- [Infrastructure services at Datadog](https://www.youtube.com/watch?v=Hz7ZZzafBoE)
- [Custom CI/CD at Netflix](https://temporal.io/replay-2023/videos/actor-workflows-reliably-orchestrating-thousands-of-flink-clusters-at)

Run recurring work on a [Schedule](/schedule), wait on external state with the
[Polling](/design-patterns/polling) pattern, and route work to the right hardware with
[Worker-Specific Task Queues](/design-patterns/worker-specific-taskqueue). The
[route specialized workloads](/guides/route-specialized-workloads) and
[temporary rate limit increases](/guides/temporary-rate-limit-increases) Guides cover the routing
and capacity cases.

### Data and AI pipelines

Multi-step extraction, embedding, transcoding, or batch inference work that fans out and must resume
without reprocessing what already finished.

- [Orchestrating video processing at Descript](https://temporal.io/blog/ai-ml-and-data-engineering-workflows-with-temporal#descript)
- [Automating data pipelines at Neosync](https://temporal.io/blog/ai-ml-and-data-engineering-workflows-with-temporal#neosync)

Fan out with [Child Workflows](/design-patterns/fanout-child-workflows) or a
[MapReduce Tree](/design-patterns/mapreduce-tree), page through unbounded input with the
[Batch Iterator](/design-patterns/batch-iterator), and cap concurrency with a
[Sliding Window](/design-patterns/sliding-window). When pipelines share Workers across models or
tenants, [Task Queue Priority and Fairness](/develop/task-queue-priority-fairness) dispatches urgent
work ahead of bulk work and keeps one tenant from starving the others.

### AI agents

Agent loops are long-running and stateful, and the calls inside them fail: model requests time out,
tools rate-limit, approvals take a day. The loop is a Workflow, each model call and tool call is an
Activity, and a crash resumes the conversation instead of restarting it.

- [Reliable, observable agents at Lindy](https://temporal.io/resources/case-studies/lindy-reliability-observability-ai-agents-temporal-cloud)
- [Long-running, durable agents at Dust](https://temporal.io/blog/how-dust-builds-agentic-ai-temporal)
- [Account summaries with agents at ZoomInfo](https://temporal.io/resources/on-demand/account-summaries-gen-ai)

[Durable AI](/ai) is the entry point for this work: runnable [AI Cookbook](/ai/cookbook) recipes for
tool calling, MCP, structured output, and human-in-the-loop, plus the agent framework integrations
for each SDK.

## Common application patterns

Several shapes recur regardless of industry. Each one below has a reusable implementation in the
[Design Patterns](/design-patterns) catalog.

### Human in the loop

Some steps can't proceed until a person acts: an onboarding form, an invoice approval, a manual
fraud review. The wait is the hard part, because it can last days and the connection between the
person and the rest of the system is unreliable.

A Workflow handles this without a callback table or a polling job. It blocks on a
[Signal or Update](/evaluate/features/workflow-message-passing), sets a durable
[Timer](/workflow-execution/timers-delays#timer) for the reminder or the deadline, and keeps its
place across Worker restarts in between. See the [Approval](/design-patterns/approval) pattern for
the reusable version and the [background checks example](https://learn.temporal.io/examples/go/background-checks/)
for a complete application in Go.

### Background jobs and long-running work

To run a single unit of work durably, use a [Standalone Activity](/standalone-activity): a top-level
Activity Execution started directly by a Client, with no Workflow around it. It gives you retries
with backoff, an Activity ID and Run ID you can cancel or query, and deduplication at submit time,
without running a broker. This is Temporal's [job queue](/evaluate/features/job-queue), and
Standalone Activities are Generally Available. Teams moving off Celery, Sidekiq, or a homegrown
queue can start with the [Celery migration Guide](/guides/celery-to-standalone-activity).

Jobs that take longer than a broker's poll timeout are where this matters most. A message queue
with a five-minute visibility timeout hands the same message to a second consumer while the first
is still working; Temporal tracks the Activity Execution itself, so a long job doesn't get
duplicated. Report progress with an
[Activity Heartbeat](/encyclopedia/detecting-activity-failures#activity-heartbeat) so a job that
dies mid-run is detected before its Start-To-Close Timeout expires, and resumes from its last
reported checkpoint. See the [Long-Running Activity](/design-patterns/long-running-activity)
pattern.

### Polyglot systems

Temporal has eight SDKs — [.NET](/develop/dotnet), [Go](/develop/go), [Java](/develop/java),
[PHP](/develop/php), [Python](/develop/python), [Ruby](/develop/ruby), [Rust](/develop/rust), and
[TypeScript](/develop/typescript) — and Workflows written in different languages can call each
other, so teams keep the language they already use.

The [polyglot sample](https://github.com/temporalio/temporal-polyglot) shows Workflow Executions in
Go, Java, PHP, and TypeScript sending messages to each other, including how errors propagate across
the language boundary. For calls between teams that don't share a Namespace, deploy schedule, or
database, [Temporal Nexus](/evaluate/features/nexus) puts a service contract between them.

### State machines

A state machine changes a system's behavior in response to changes in its state. Applying one to a
real business process usually means a transition table, a persistence layer for the current state,
and a job to detect rows that got stuck — none of which is the process you set out to model.

In Temporal, the current state is the position of a running Workflow. Express transitions as
ordinary control flow and hold state in local variables, and Temporal persists it for you. The
[Entity Workflow](/design-patterns/entity-workflow) pattern is the general form, and
[entity lifecycle patterns](/design-patterns/entity-lifecycle-patterns) covers the variants. For the
longer argument, see the
[State Machines Simplified whitepaper](https://pages.temporal.io/download-state-machines-simplified.html).

## Find an implementation

- [Design patterns](/design-patterns): Reusable Workflow and Activity techniques with runnable code across SDKs, grouped by problem domain.
- [Guides](/guides): Step-by-step walkthroughs for specific use cases, written and verified by Temporal staff.
- [Durable AI](/ai): Agents, processing pipelines, and model training on Temporal, with cookbook recipes and framework integrations.
- [Code Exchange](https://temporal.io/code-exchange): Community and Temporal-built sample applications you can run and adapt.

> **💡 Tip:**
>
> To write your first Workflow, follow a [getting started tutorial](https://learn.temporal.io/getting_started/),
> then work through the [project-based tutorials](https://learn.temporal.io/tutorials/) and
> [example applications](https://learn.temporal.io/examples/).
>
