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

# Save drafts, publish changes, and restore versions of your AI agent

> Stage changes to your AI agent in a draft, publish them when they're ready, and go back to any saved version.

Drafts and versions let you change a Chatbase AI agent without affecting customers until the change is ready. Changes you save to instructions, Actions, Procedures, and channel settings go into a **draft**, and your customers keep talking to the **live** AI agent on every channel until you **publish**. Every publish is saved as a **version**, so you can see what changed, compare versions, and restore an earlier setup.

## Save and publish

Changes you make on a page such as Instructions, Actions, Procedures, or a channel's settings go into your draft. Nothing changes for your customers yet.

The **Playground** always uses your draft, so you can try a change before anyone else sees it. Your chat widget, Help Page, the Playground's preview link, and every other channel keep using the live agent.

When the draft is ready, click **Publish** in the top-right corner. A dot on **Publish** means your draft has changes that aren't live yet.

**Publish** appears on pages whose changes go into the draft. Pages whose changes go live right away, or that don't change your AI agent, don't show it. These include Backstage, Data Sources, Guardrails, Missions, Tests, Outbound, Integrations, and Settings.

![The Publish button with its menu open: View pending changes, Commit version, Version history, and Discard changes](https://mintcdn.com/chatbase/7blSm5VgmZTd4l5Q/user-guides/chatbot/images/versions/publish-menu.png?fit=max\&auto=format\&n=7blSm5VgmZTd4l5Q\&q=85\&s=d621a79e1b638c27b8ef91b69e3eb8b7)

The Publish window shows everything your draft changes compared with what's live now, grouped by area: Agent, Channels, Actions, Widgets, and Procedures. In text such as instructions, only the words that changed are highlighted. Add an optional description, then click **Publish**. The change goes live immediately and is saved as a new version.

![The Publish this version window, showing an instructions change between Live now and Draft with the changed words highlighted](https://mintcdn.com/chatbase/7blSm5VgmZTd4l5Q/user-guides/chatbot/images/versions/publish-dialog.png?fit=max\&auto=format\&n=7blSm5VgmZTd4l5Q\&q=85\&s=31f6846d9e3a4ddf40a76bc6e304ab3d)

The arrow next to **Publish** opens more options:

| Option | What it does |
| - | - |
| **View pending changes** | Shows what your draft changes compared with live, without publishing. |
| **Commit version** | Saves your current setup as a version without making it live. Use it to keep a setup you might publish later. |
| **Version history** | Lists your recent versions. See [Version history](#version-history). |
| **Discard changes** | Throws away your unpublished changes, so your draft matches where it started. |

> [!NOTE]
>
> You need permission to edit the AI agent to publish, commit, or restore a version. Restoring a version that changes Actions also needs permission to edit Actions.

## Settings that go live right away

Some settings aren't part of the draft. They take effect as soon as you save them, and restoring a version never changes them:

* Data Sources and training
* Connections to other apps and channels, such as WhatsApp, Messenger, Instagram, Slack, and Zendesk
* Turning a channel on or off
* Security settings, such as allowed domains, rate limits, and blocked senders
* Uploaded images, such as logos, avatars, and Widget images
* The voice pronunciation dictionary

When a page has both kinds of setting, Chatbase lists the ones that will go live right away before it saves.

## When to publish and when to keep drafting

The draft lets you group related changes and publish them together. As a rule of thumb:

* **Keep drafting** while a change is only partly done. For example, a new returns Procedure that also needs an Action and an instructions update should go live as one version, not three.
* **Publish** once you've tried the change in the [Playground](https://chatbase.co/docs/user-guides/chatbot/playground.md) and it behaves the way you want. Tests run on the published AI agent, so for changes that affect important conversations, run your [Tests](https://chatbase.co/docs/user-guides/chatbot/tests.md) right after publishing and compare the pass rate with the last run.
* **Commit version** to keep a setup you might publish later, such as a seasonal one, and **Discard changes** to drop an experiment that didn't work.

### Example: rolling out a new return policy

A team is extending its return window from 30 to 45 days.

**1. Update the draft**

A teammate edits the instructions and the returns Procedure, and clicks **Save** on each. Customers still get the 30-day policy.

**2. Try it**

In the Playground, they ask "Can I return something I bought 40 days ago?" and check that the AI agent says yes.

**3. Publish**

They check the list in the Publish window, add the description "Return window 30 to 45 days", and click **Publish**. Only then do they replace the old returns PDF in **Data Sources**: Data Sources go live as soon as they're saved, so updating the PDF earlier would have shown customers the new policy before the instructions matched it. Finally, they run the returns test on the **Tests** page, which checks the live AI agent.

**4. Roll back if needed**

If something goes wrong, they open **Version history**, select the previous version, compare it to **Live**, and click **Restore**. Restoring doesn't change Data Sources, so they also put the old returns PDF back.

## Version history

Open the arrow next to **Publish** and click **Version history**. Each version shows:

* Its number and description
* When it was saved and who saved it
* The areas it changed
* **Live** on the version your customers are using now, and **Committed** on versions that were committed but never published

![The Version history panel listing versions 14 to 10, with version 14 marked Live and version 13 marked Committed](https://mintcdn.com/chatbase/7blSm5VgmZTd4l5Q/user-guides/chatbot/images/versions/version-history.png?fit=max\&auto=format\&n=7blSm5VgmZTd4l5Q\&q=85\&s=10e91005ed8b15a4c7c4bfa400aae73a)

### See what a version changed

Click a version to open its changes. Use **Compare to** to switch between:

* **Previous**: what this version changed compared with the version before it.
* **Live**: what would change if you restored this version now.

The icon at the top right of each change opens the page where that setting lives. For an Action that still exists, it opens that Action.

![The changes in version 12, compared to the previous version, with Restore at the top right](https://mintcdn.com/chatbase/7blSm5VgmZTd4l5Q/user-guides/chatbot/images/versions/version-changes.png?fit=max\&auto=format\&n=7blSm5VgmZTd4l5Q\&q=85\&s=3e65686956a3ce62e7a7382924bb08b6)

### Restore a version

Open the version and click **Restore**, then confirm. Restoring:

* Makes that setup live immediately.
* Saves it as a new version at the top of the history. Older versions stay where they are.
* Discards any unpublished changes in your draft.
* Keeps the restored version's description, or names it "Restored from" followed by the version number.

Your current plan and compliance settings still apply. If part of the old version isn't allowed anymore, for example a model your plan doesn't include or more enabled Actions than your plan allows, Chatbase adjusts it and lists what didn't apply as saved. Widget images aren't restored.

If the newest version is a committed one that was never published, the button reads **Publish** instead of **Restore**.

## Changes made outside the dashboard

* **API**: updates through the Chatbase API go live immediately, without a draft, and appear in version history a minute or two later. They don't change your draft.
* **Backstage**: changes Backstage makes go into your draft, like your own. Backstage can also list your versions, show what restoring one would change, and restore it after you approve.

## Frequently asked questions

> [accordion] Can I undo a publish?
>
> Yes. Open **Version history**, select the version you want to go back to, and click **Restore**. That setup goes live immediately and is saved as a new version, so the version you undid stays in the history. Restoring also discards any unpublished changes in your draft, and it never changes settings that go live right away, such as Data Sources.

> [accordion] Which changes go live without publishing?
>
> Data Sources and training, connections to other apps and channels, turning a channel on or off, security settings, uploaded images, and the voice pronunciation dictionary. Changes made through the Chatbase API also go live immediately. See [Settings that go live right away](#settings-that-go-live-right-away).

> [accordion] I saved a change but my website still shows the old behavior. Why?
>
> Saving puts the change in your draft. Only the Playground uses the draft. Your chat widget, Help Page, the Playground's preview link, and every other channel use the live AI agent until you click **Publish**.

> [accordion] Who can publish or restore a version?
>
> Anyone with permission to edit the AI agent can publish, commit, or restore a version. Restoring a version that changes Actions also needs permission to edit Actions. See [Roles and permissions](https://chatbase.co/docs/user-guides/workspace/manage.md#roles-and-permissions).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.