For the complete documentation index, see llms.txt. This page is also available as Markdown.

Version History

Version history tracks changes to AI entities and enables rollback to previous states.

Umbraco.AI automatically tracks version history for key entities. Every time you save a connection, profile, context, prompt, or agent, a new version is created with a complete snapshot of the entity state.

Supported Entity Types

Entity Type
Package
Description

connection

Umbraco.AI

API credentials and provider settings

profile

Umbraco.AI

Model configuration and settings

context

Umbraco.AI

Brand voice and content resources

prompt

Umbraco.AI.Prompt

Prompt templates

agent

Umbraco.AI.Agent

AI agent definitions

How Versioning Works

When you save an entity:

  1. The entity's Version property is incremented.

  2. A complete JSON snapshot of the entity is created.

  3. The snapshot is stored with metadata (timestamp, user, description).

  4. The current entity is updated in the main table.

Version Record Properties

Each version record stores:

Property
Description

Id

Unique identifier for the version record

EntityId

The ID of the versioned entity

EntityType

Discriminator (e.g., "profile", "context")

Version

Sequential version number

Snapshot

JSON serialization of the entity state

DateCreated

When this version was created

CreatedByUserId

Who created this version

ChangeDescription

Optional description of changes

Using Version History in Code

Getting Version History

Getting a Specific Version

Comparing Versions

Version comparison showing changes between two versions

Rolling Back

To roll back to a previous version:

  1. Retrieve the snapshot from the desired version.

  2. Save the restored entity (which creates a new version).

Rolling back creates a new version rather than deleting versions. This preserves the complete audit trail.

Version Cleanup

Over time, version history can accumulate. You can configure automatic cleanup:

Property
Default
Description

Enabled

true

Whether automatic version cleanup is enabled

MaxVersionsPerEntity

50

Maximum versions to retain per entity (set to 0 to disable)

RetentionDays

90

Days to retain version history (set to 0 to disable)

When both MaxVersionsPerEntity and RetentionDays are set, versions must satisfy both conditions to be retained.

Manual Cleanup

Viewing Version History

Via Backoffice

You can view, compare, and restore previous versions through the backoffice. See Version History for step-by-step instructions.

The Version History tab showing version list for a profile

Via Management API

The Management API provides a unified endpoint for version operations:

See Versions API for details.

Last updated

Was this helpful?