> 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/notebooks/variables-outputs-and-caching.md).

# Variables, outputs and caching

How blocks share variables, how results are saved, and how to inspect them.

## Results are saved

When a block runs, Zerve saves its outputs and variables. Blocks connected after it read those saved results, rather than rerunning the blocks before them.

| This means                                                         | Because                                                                 |
| ------------------------------------------------------------------ | ----------------------------------------------------------------------- |
| **You can rerun one block** without rerunning everything before it | Earlier results are already saved                                       |
| **Running a block that hasn't changed is quick**                   | Zerve uses its saved results. Use **Force run** to run it again anyway. |
| **You can inspect any step afterwards**                            | Every block's results are kept                                          |

Variables are saved in common formats, such as Parquet for dataframes, so they pass cleanly between Python, R and SQL. See [Language interoperability](/zerve-docs/notebooks/language-interoperability.md).

## Seeing a block's results

After a block runs, its output appears under it, and its variables are listed with it.

## Code & Variables mode

For a fuller view, open a block in **Code & Variables mode**, from the block toolbar, or with **Shift+Alt+F** (Windows) or **⇧+⌥+F** (Mac). It shows:

* The **input variables** coming into the block
* The **outputs** coming out of it: variables, dataframes and charts
* Built-in viewers for dataframes and charts

From Code & Variables mode, you can move to the previous or next block.

## Using variables from other blocks

A block can use variables from any block connected before it. To use a variable from a block that isn't connected, **attach** the variable to the block, from Code & Variables mode.

Functions can be passed between blocks, as well as data.


---

# 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/notebooks/variables-outputs-and-caching.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.
