# Versions, Staging, and Rollback

### What a Version Is

| Field   | Notes                                                     |
| ------- | --------------------------------------------------------- |
| Label   | Auto-incremented per prompt: `v1`, `v2`, `v3`, and so on. |
| Status  | `live` or `draft`.                                        |
| Source  | The full prompt text at this point in history.            |
| Message | A short note explaining the change.                       |
| Author  | The workspace member who saved this version.              |
| Created | Save time.                                                |

Only drafts can be rewritten. Once a version goes live, its source is frozen.

### Live, Staging, and Draft

| State       | Served by       | Notes                                                    |
| ----------- | --------------- | -------------------------------------------------------- |
| **Live**    | `pv_live_` keys | Production version.                                      |
| **Staging** | `pv_test_` keys | Optional preview version. Falls back to live when unset. |
| **Draft**   | Dashboard only  | Editable work in progress.                               |

### Diff View

Click any version to expand a side-by-side diff between that version and another selected version. Use it to review exactly what changed before promoting or rolling back.

### Promoting a Draft

Promoting a draft makes it live. The version becomes immutable, live SDK reads start serving it after cache refresh, and integrations receive the publish event.

### Rolling Back

Rollback points live reads at an older version and copies that source into the editor so you can continue from it.

Rollback does not delete newer versions. They remain in history and can be promoted again later.

### Setting Staging

When staging is enabled, you can point staging at an existing version without publishing it to live. This is useful for preview environments, CI checks, and teammate review.

### Deleting a Draft

Only draft versions can be deleted. If the deleted draft was used for staging, staging is cleared for that prompt.

### Search and Pagination

The Versions tab supports keyword search across messages and authors and loads long histories incrementally.

### Staging On/Off

Staging is controlled from **Settings -> Enable staging**. Disabling it hides staging controls, but it does not delete version history.


---

# 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://aiso.gitbook.io/promptvault/documentation/dashboard/versions-staging-and-rollback.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.
