> For the complete documentation index, see [llms.txt](https://docs.zerve.ai/zerve-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zerve.ai/zerve-docs/compute/fleet.md).

# Fleet: parallel runs

Run the same block many times in parallel with Fleet.

**Fleet** runs the same blocks many times in parallel, once for each item in a list. Use it to process each ticker, each date or each parameter set at the same time, instead of one after another. You don't set up clusters or write any special parallel code.

## How it works

1. In a block, call `spread()` with a list. The blocks that follow it fan out into one copy for each item in the list.
2. Each copy runs in parallel, on its own compute, with its own item.
3. An **Aggregator** block uses `gather()` to collect the results from every copy into a single list, which the rest of the notebook can use.

## Example

This runs a backtest for each ticker in parallel, then combines the results.

```python
# Block 1: start the fleet, one run per ticker
tickers = ["AAPL", "MSFT", "NVDA", "AMZN", "GOOGL"]
ticker = spread(tickers)
```

```python
# Block 2: runs once for each ticker, in parallel
result = run_backtest(ticker)
```

```python
# Aggregator block: collect every run's result into one list
results = gather(result)
```

## Common uses

| Use                        | Example                                                   |
| -------------------------- | --------------------------------------------------------- |
| **Processing by entity**   | Running the same analysis for each stock, fund or region  |
| **Hyperparameter tuning**  | Training a model with many parameter combinations at once |
| **Processing by category** | Processing each category in a large dataset separately    |
| **Model evaluation**       | Testing a model or prompt against many inputs at once     |

## Limits

| Limit                    | Value                                                                                                                                                                        |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Runs in one Fleet**    | Up to 250                                                                                                                                                                    |
| **How many run at once** | You can set a limit for a Fleet, within your organization's overall [concurrency limit](/zerve-docs/compute/limits-and-concurrency.md). Runs over the limit wait in a queue. |

## Following and managing a Fleet

You can see the status and results of every run in a Fleet.

| To                    | Do this                                                                                                                |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **Stop a Fleet**      | Stop it as a whole, which stops all its runs                                                                           |
| **Retry failed runs** | Retry just the runs that failed, including ones that finished with an error, without rerunning the ones that succeeded |

## Fleet and superagents

Superagents have their own way of running work in parallel, called [batches](/zerve-docs/superagents/batches.md), which run whole agents rather than blocks of code.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zerve.ai/zerve-docs/compute/fleet.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
