> For the complete documentation index, see [llms.txt](https://docs.codewords.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codewords.ai/automations/version-history-and-restore-chat.md).

# Version history and restore (chat)

Preview and restore earlier versions of automations you build with Cody in chat.

### Overview

When you build and change automations in chat with Cody, CodeWords keeps a version history. You can see what changed, preview an older version, and restore it if you want to go back.

That makes it safer to try ideas — you can undo without starting from scratch.

### What is version history?

* **Versions** are snapshots of your automation at different points in time (for example, after you or Cody made changes).
* **Version history** is the list of those snapshots — usually with a timestamp and a short description.
* Descriptions are often generated automatically so you can tell versions apart quickly.

### Viewing version history

In the chat where you’re building or editing:

1. Open **version history** (or **Versions**) from the chat header or menu.
2. Review the list — creation time, short description, and options to preview or restore.

You can also open versions from the project on the Projects page.

### Previewing a version

Before you restore, preview first:

1. Open version history.
2. Find the version you care about.
3. Choose **Preview**.
4. Review that version’s state (workflow steps, inputs, and so on).
5. Close the preview to stay on your current version, or choose **Restore**.

Preview lets you look without changing anything.

### Restoring a version

Restore makes an older version your current one again:

1. Open version history.
2. Find the version you want (preview if you’re unsure).
3. Choose **Restore** and confirm if asked.
4. Keep editing from that restored state.

Restoring doesn’t delete newer versions — they stay in history so you can switch again later.

### When to use version history

* You tried a change and want to undo it
* You want to compare an older idea with the current one (preview first)
* You need a known-good state after experiments
* You want to see what changed over time


---

# 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 dynamically by asking a question.

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

```
GET https://docs.codewords.ai/automations/version-history-and-restore-chat.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
