Versions let you save the state of your agent application by creating
immutable snapshots in time. You can use versions to preserve completed
work, save progress before making major changes, or roll back to a
previous state if needed. The **Versions** pane also provides a detailed
change history that lists modifications made to the agent application.

## The Versions pane

To open the Versions pane, click **Versions** on the right side of
the builder page.

The pane displays a record of all changes that occurred on the agent
application, including the following details:

- A timestamp of the change.

- The type of action (create, update, or delete).

- The name of the resource that was modified.

- The email address of the user who made the modifications.

To inspect the details of an individual change, select the change item in the
list. The pane displays a diff that compares the configuration state before and
after the modification.

After you create a version, any changes recorded between that version and the
previously created version appear grouped underneath it in the **Versions** pane.

### Track changes to the draft version

As you build and edit your agent application, changes apply immediately to the
working draft version. You can track these ongoing modifications before you save
them into an immutable version:

1. Open the agent builder.

2. Click **Versions** on the right side of the builder page.

3. In the **Versions** pane, inspect the uncommitted changes.

4. To view what changed in a specific draft update, select the modification. The
   pane displays the updated fields and a diff of the resource configuration.

Reviewing draft changes helps you verify updates and troubleshoot configuration
differences before creating a new version or deploying the agent application.

## Create a version

To create a new version:

1. Open the agent builder.

2. Click **Versions** on the right side of the builder page.

3. Click **+ Create version** in the **Versions** pane.

4. Enter a name and an optional description for the version.

5. Click **Create**.

A new version is only created if there are changes to the agent application
configuration.

## View a version

To see the resources that were saved in a specific version:

1. Open the agent builder.

2. Click **Versions** on the right side of the builder page.

3. Find the version that you want to view.

4. Click the overflow menu on the right side of the row.

5. Click **View**.

## Delete a version

To delete a version:

1. Open the agent builder.

2. Click **Versions** on the right side of the builder page.

3. Find the version that you want to delete.

4. Click the overflow menu on the right side of the row.

5. Click **Delete**.

6. Confirm that you want to delete the version.

## Restore a version

To restore or revert to a previous version:

1. Open the agent builder.

2. Click **Versions** on the right side of the builder page.

3. Find the version that you want to restore.

4. Click the overflow menu on the right side of the row.

5. Click **Restore**.

6. Confirm the restore action.

If there are changes to the current application configuration since the last
version was saved, restoring to a previous version first creates an
automatic system version (authored by `system@google.com`) to save any
unsaved work. This behavior lets you "revert a revert" if a mistake is made.
If there are no changes to the current application configuration, the restore is
a no-op.

## Versions and deployments

You can associate saved versions with deployments to serve traffic to specific,
immutable snapshots of your agent application.

When you deploy a version, CX Agent Studio creates a deployment from the immutable
snapshot captured when that version was created. The version snapshot stores
configuration details of the application, including the following items:

- Basic application settings and metadata, including the application name.

- All configured agents and instructions.

- All associated tools, examples, guardrails, and toolsets.

Version snapshots capture application design and configuration resources, but
don't include deployments or evaluation runs.

Because deployed version snapshots are immutable, changes that you make to the
draft version of your agent application don't alter the deployed version. For
example, if you rename the application or modify agent instructions in your
draft, the deployed version continues serving with its original configuration and
application name. This immutability ensures consistent behavior in production
and helps you isolate changes when troubleshooting between the draft version and
live traffic.

When a version is attached to a deployment, it displays a **Live** badge in the
**Versions** pane.