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
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:
The entity's
Versionproperty is incremented.A complete JSON snapshot of the entity is created.
The snapshot is stored with metadata (timestamp, user, description).
The current entity is updated in the main table.
Version Record Properties
Each version record stores:
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

Rolling Back
To roll back to a previous version:
Retrieve the snapshot from the desired version.
Save the restored entity (which creates a new version).
Version Cleanup
Over time, version history can accumulate. You can configure automatic cleanup:
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)
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.

Via Management API
The Management API provides a unified endpoint for version operations:
See Versions API for details.
Related
Connections - Versioned credential storage
Profiles - Versioned model configurations
Contexts - Versioned content collections
Audit Logs - Operational audit trail
Last updated
Was this helpful?