> 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/compute.md). Agents can also search and read this documentation through its [MCP server](https://docs.zerve.ai/zerve-docs/~gitbook/mcp).

# How code runs

How Zerve runs your code, block by block, on the compute you choose.

In Zerve, each block in a notebook runs on its own, on compute that Zerve provides for it. You don't manage servers or clusters: you choose what kind of compute a block needs, and Zerve takes care of the rest.

## Block runs

Every time a block runs, Zerve starts a **block run**: it packages the block's code, sends it to the compute you've chosen, runs it, and saves the results. This happens whether you run the block yourself or an agent runs it for you.

Because each block runs separately, one notebook can mix different kinds of compute. For example, a notebook might pull data on fast serverless compute, clean it on a larger machine, and train a model on a GPU.

| Compute type              | Typical use                                       |
| ------------------------- | ------------------------------------------------- |
| **Lambda** (AWS Lambda)   | Most blocks: quick, lightweight work              |
| **Fargate** (AWS Fargate) | Longer runs, or more memory and CPU, up to 120 GB |
| **GPU** (AWS SageMaker)   | Model training and other GPU work                 |

See [Compute types](https://docs.zerve.ai/zerve-docs/compute/compute-types.md) for the full list and their limits.

## Results are saved as you go

When a block finishes, its outputs and variables are saved to storage. That's how blocks share data: a later block reads the saved results of the blocks before it, rather than recomputing them.

It also means:

* **You can rerun one block** without rerunning everything before it.
* **Agents can inspect intermediate results** as they work, so they can check each step.
* **You can check any step afterwards**, since every block's results are kept.

## Running many copies at once

To run the same block many times in parallel, for example once for each of 200 tickers, use [Fleet](https://docs.zerve.ai/zerve-docs/compute/fleet.md).

## Limits

Each compute type has its own limits on memory and run time, and every block run is limited to 12 hours. Runs over your organization's concurrency limit wait in a queue rather than failing. See [Limits and concurrency](https://docs.zerve.ai/zerve-docs/compute/limits-and-concurrency.md).

## Stopping a run

You can stop a block run that's running or waiting in the queue. Lambda runs stop immediately; other compute types stop shortly after. If a run hasn't actually started yet on some compute types, it can't be stopped until it does, and Zerve tells you so.

## Your data stays separate

When a block runs, it gets access only to its own notebook's stored data, not to any other notebook's. See [Security overview](https://docs.zerve.ai/zerve-docs/security/security.md).

## What compute costs

Compute uses credits, charged by the second based on the compute type. See [How credits are used](https://docs.zerve.ai/zerve-docs/administration/how-credits-are-used.md).

## Where compute runs

On Zerve's cloud, compute runs in Zerve's AWS account. If your organization runs Zerve in its own cloud, compute runs there instead, and can also include Kubernetes and Google Cloud. See [Deployment options](https://docs.zerve.ai/zerve-docs/self-hosting/self-hosting.md).


---

# 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/compute.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.
