# Standalone Activity

> Learn about Standalone Activities in Temporal, their benefits, execution model, and when to use them.

> **Public Preview** — Go, Python, Java, .NET, TypeScript, Ruby
> Available in [Temporal Cloud](#temporal-cloud-support) and in Temporal Server v1.31.0 or higher (included in [Temporal CLI](#temporal-cli-support) v1.7.0 or higher).

See [limitations](#public-preview-limitations) below.

## What is a Standalone Activity? 

If you need to orchestrate multiple Activities, use a [Workflow](/workflows). But if you just need to
execute a single Activity, use a Standalone Activity.

Standalone Activities are Temporal’s [job queue](/evaluate/development-production-features/job-queue) -
the simplest way to run durable, retryable tasks on Temporal.

<div style={{textAlign: 'center', margin: '2rem 0'}}>
![Standalone Activity vs. Workflow - Standalone Activities execute a single function reliably as a top-level primitive, while Workflows orchestrate multiple Activity steps](/diagrams/standalone-activities-vs-workflowlight.svg)

</div>

A Standalone Activity is a top-level [Activity Execution](/activity-execution) started directly by a
[Client](/encyclopedia/temporal-sdks#temporal-client), without using a Workflow. This results in
fewer [Billable Actions](/cloud/actions-usage#actions-in-workflows) in Temporal Cloud than using a Workflow
to run a single Activity. If your Activity Execution is short-lived, you will also notice lower
latency, since there are fewer Worker round-trips.

You write your Activity Functions the same way for both. In fact, the same Activity Function can be
executed as a Standalone Activity and as a Workflow Activity with no code changes.

> **💡 Tip:**
> GET STARTED
>
> Pick your SDK and follow the quickstart:
>
> - [Go SDK - Standalone Activities quickstart and code sample](/develop/go/activities/standalone-activities)
> - [Python SDK - Standalone Activities quickstart and code sample](/develop/python/activities/standalone-activities)
> - [.NET SDK - Standalone Activities quickstart and code sample](/develop/dotnet/activities/standalone-activities)
> - [Java SDK - Standalone Activities quickstart and code sample](/develop/java/activities/standalone-activities)
> - [Ruby SDK - Standalone Activities quickstart and code sample](/develop/ruby/activities/standalone-activities)
> - [TypeScript SDK - Standalone Activities quickstart and code sample](/develop/typescript/activities/standalone-activities)
>

## Use cases

Standalone Activities can be used for [durable job processing use
cases](/evaluate/development-production-features/job-queue) such as sending an email, processing a
webhook, syncing data, or executing a single function reliably with built-in retries and timeouts.

## Key features
- Execute any Temporal Activity as a top-level primitive without the overhead of a Workflow
- Native async job processing model: schedule -> dispatch -> process -> result
- No head-of-line blocking - a slow job doesn’t block the dispatch of other Tasks
- Arbitrary length jobs with heartbeats for liveness and checkpointing progress
- At-least-once execution by default with native retry policy and timeouts
- At-most-once execution if retry max attempts is 1
- Addressable - get an Activity ID / Run ID and get the result, cancel, and terminate
- Deduplication - with conflict policy: (USE_EXISTING, ...), reuse policy: (REJECT_DUPLICATES, ...)
- Separate ID space from Workflows - Standalone Activities are a different kind of top-level execution
- Priority and fairness - multi-tenant fairness, weighted priority tiers, and safeguards against starvation of lower-weighted tasks
- Visibility - list Activity Executions and view status, retry count, and last error
- Manual completion by ID (or token): ignore activity return and wait for external completion
- Activity metrics - including counts for success, failure, timeout, and cancel
- Dual use - execute Activities within a Workflow or standalone with no Worker code changes

## Observability 

All existing [Activity metrics](/cloud/metrics/openmetrics/metrics-reference#activity-metrics) apply
to Standalone Activities. This includes counts for scheduled, started, completed, failed, timed out,
and canceled activities.

You can use [List Filters](/list-filter) to query Standalone Activity Executions by type, status,
task queue, and other attributes using the SDK or the `temporal activity list` CLI command.

`CountActivities` returns the total number of Standalone Activity Executions matching a filter,
analogous to counting Workflow Executions. This is the total count of executions (running, completed,
failed, etc.) - not the number of queued tasks.

## Public Preview limitations

The Public Preview of Standalone Activities has some known limitations:

- Pause, reset, and update options are not supported in Public Preview but scheduled for GA.
- `TerminateExisting` conflict policy / `TerminateIfRunning` reuse policy is not supported yet.

## Temporal CLI support

Standalone Activities require [Temporal CLI](https://github.com/temporalio/cli/releases/tag/v1.7.0) v1.7.0 or higher and [Temporal Server](https://github.com/temporalio/temporal/releases/tag/v1.31.0) v1.31.0 or higher.

Install with Homebrew:

```bash
brew install temporal
```

Or see the [Temporal CLI install guide](/cli/setup-cli) for other platforms.

Verify the installation:

```bash
temporal --version
```

Which should output v1.7.0 or higher, for example:
```
temporal version 1.7.0 (Server 1.31.0, UI 2.49.1)
```

The `temporal activity` subcommand supports Standalone Activities with commands including: `start`,
`execute`, `result`, `list`, `count`, `describe`, `cancel`, and `terminate`.

The Temporal Dev Server has Standalone Activities enabled by default for local testing.

## Temporal Cloud support

Standalone Activities in Temporal Cloud is available as a Public Preview feature.
