> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openv2.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Version history

> Browse, compare, and restore earlier snapshots of your project after every AI turn.

Every time the AI finishes a turn and changes your files, Openv2 creates a **version snapshot** automatically. This gives you a built-in safety net — you can experiment freely and rewind to any earlier state if something goes wrong.

## How versions are created

Openv2 saves a version at the end of each assistant turn when files have changed:

1. A **snapshot** of your project files is captured (heavy folders like `node_modules` are excluded).
2. The snapshot is compared with the previous one to identify what changed.
3. A **version** is created and linked to the chat message that triggered it.
4. The version and your chat history are stored in the cloud (when you're logged in).

Each version includes:

* A **label** derived from the change — typically a short description of what the AI did.
* The **chat message** that triggered the version.
* The **file snapshot** needed to restore your project tree to that exact state.

## Browsing version history

The version history is accessible from the **version badge** or the **history control** in the chat interface, depending on your layout. Scrolling through history lets you see what changed at each step and trace the evolution of your project.

<Info>
  Versions are tied to assistant turns, so the history reads like a log of what was built and when — making it easy to find the point just before a breaking change.
</Info>

## Reverting to a previous version

If an experiment goes wrong or you want to return to an earlier state, you can restore any version from the history.

<Steps>
  <Step title="Open version history">
    Click the **version badge** or **history control** in the chat panel to see the list of saved versions.
  </Step>

  <Step title="Find the version you want">
    Browse the version list and identify the point you want to return to. The label and associated chat message help you locate the right snapshot.
  </Step>

  <Step title="Restore the version">
    Select the version and choose **Restore**. Openv2 replaces your current working files with the snapshot and truncates the chat history to that point — so your code and conversation stay in sync.
  </Step>
</Steps>

<Note>
  Restoring a version replaces the entire working tree for your project. If you want to preserve your current state before reverting, duplicate the project or export your files first.
</Note>

## Why version history is useful for experimentation

Because every AI turn is checkpointed, you can try risky changes without fear:

* **Test a different approach** — ask the AI to refactor a screen one way, see if you like it, then revert and try another approach.
* **Recover from a bad prompt** — if the AI misunderstands a request and breaks something, revert to the version before that turn.
* **Review the build timeline** — use history as a record of how features were added, which is useful when onboarding collaborators.

## Local fallback

If cloud persistence is unavailable (for example, if you're signed out), some version data may fall back to **browser storage**. Browser storage is limited and not shared across devices. Stay logged in to ensure your version history is saved reliably and accessible from any device.

<CardGroup cols={2}>
  <Card title="Chat & AI assistant" icon="message-circle" href="/chat-ai-assistant">
    Understand how each turn creates a new version automatically.
  </Card>

  <Card title="Collaboration" icon="users" href="/collaboration">
    Invite teammates to view or edit your project.
  </Card>
</CardGroup>
