# Run retention and exports

## Run history retention

### What this page covers

This page explains:

* How run history retention works
* How to export a list of past runs as CSV
* How to export an individual historic run as JSON

### Run data retention

Relay.app automatically removes old run history based on your workspace's retention setting.

#### Retention periods per plan type

| Plan type                | Run history saved for                     |
| ------------------------ | ----------------------------------------- |
| **Free**                 | 30 days                                   |
| **Professional or Team** | Customizable: 30 days, 90 days, or 1 year |
| **Enterprise**           | Custom                                    |

#### Which runs gets deleted after the retention periood

Relay.app automatically deletes completed runs and runs with errors that have been stale for longer than the retention period.

Runs that are waiting (because of a Wait step or a Human-in-the-Loop action) are not automatically deleted.

#### Changing the retention period

Admins of workfspaces on a Professional or Team plan can update the retention period in their workspace's [General settings](https://run.relay.app/dashboard#/settings/workspace).

## Run history exports

Relay.app lets you generate two types of exports:

1. A list of past runs for a workflow as CSV
2. Detailed step execution history of a single run as JSON

### Export a list of past runs (CSV)

To export all runs for a workflow:

1. Open the workflow's `Runs` tab
2. Open the overflow menu for a run list section
3. Click `Export all runs`

This downloads a CSV file with run metadata. For workflows with thousands of runs, this might take a while (up to 2 minutes)

#### What's included in the CSV

The CSV includes:

* Name
* Status
* Steps Completed
* AI Credits
* Created At
* Last Updated
* Test Run

#### Export size limit

CSV export includes up to 100,000 rows per export. If your workflow has more runs than that, the file is truncated.

### Export one historic run (JSON)

To export a single run:

1. Open a specific run
2. Open the run actions menu
3. Click `Export run`

This downloads a JSON file for that run.

#### What's included in the JSON

The export includes:

* Run metadata (run/workflow IDs, title, status, timestamps, test-run flag)
* Summary metrics (steps completed, AI credits consumed)
* Trigger output (when available)
* Execution history (actions, selected inputs/outputs, errors)
* AI chat history for AI steps (when available)

### Common questions

<details>

<summary>Are retention deletion and manual deletion the same?</summary>

No. Retention deletion removes older terminal runs based on age. Manual deletion removes selected runs immediately.

</details>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.relay.app/workspace-and-account/run-retention-and-exports.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
