How Data Retention Works
ABV’s retention system automatically deletes old data based on configurable policies:Configure retention policy
Set retention period at the project level in Project Settings. Specify the number of days to retain event data (traces, observations, scores, media assets).Minimum retention: 3 days (prevents accidental immediate deletion)
Default: Indefinite (no automatic deletion until you configure retention)Only project Owners and Admins can configure retention policies (requires appropriate RBAC permissions).
Nightly deletion process
ABV runs automated deletion nightly (scheduled background process). The system identifies data older than the retention period and deletes it permanently.Deletion is irreversible: Once deleted during retention enforcement, data cannot be recovered. Export important data before configuring aggressive retention policies.
Age determination by entity type
ABV uses specific timestamp fields to determine age for each entity type:
- Traces:
timestampfield (when the trace was created) - Observations:
start_timefield (when the observation began) - Scores:
timestampfield (when the score was created) - Media Assets:
created_atfield (when the asset was uploaded)
Permanent deletion
Deleted data is permanently removed from all ABV storage (online databases, analytical data warehouses, backups). Data cannot be recovered after retention deletion.Audit trail: Retention deletions are logged in audit logs (immutable records showing automated deletion occurred, even though the deleted data itself is gone).
Configuring Data Retention
Via UI
Navigate to project settings
Open the project where you want to configure retention and go to Project Settings > General.
Find data retention section
Scroll to the Data Retention section in the General settings page.
Set retention period
Enter the number of days to retain data (minimum 3 days).Examples:
- Development projects: 7-30 days
- Production analytics: 90-365 days
- Compliance-driven (HIPAA): 2190 days (6 years)
- Financial compliance: 2555 days (7 years)
Save changes
Click Save to apply the retention policy. Retention enforcement begins with the next nightly deletion process.
Verify configuration
Return to the Data Retention section to confirm the policy is saved and displayed correctly.
By default, ABV stores event data (traces, observations, scores, and media assets) indefinitely—no automatic deletion occurs until you configure a retention policy.
Via API
Configure retention policies programmatically using the Public API:project:update permission (Owner or Admin roles).
Parameters:
dataRetentionDays: Number of days to retain data (integer, minimum 3)- Set to
nullor omit to disable retention (indefinite storage)
What Gets Deleted
Retention policies affect these entity types:Traces and Observations
Traces and Observations
Traces: Complete LLM interaction records with inputs, outputs, costs, latency, and metadata.Observations: Steps within traces—individual LLM calls, tool uses, retrieval operations, and other observations.Age determination: Traces use the
timestamp field (trace creation time). When a trace exceeds the retention period, it and all related observations are deleted, regardless of observation start_time.Why this matters: If you set 90-day retention, a 91-day-old trace with a recent observation (added as a correction) still gets deleted because the parent trace is old.Scores and Evaluations
Scores and Evaluations
Scores: Quality evaluations, user feedback, and annotations attached to traces.Age determination: Scores use the
timestamp field (when the score was created).Cascade deletion: If the parent trace is deleted due to retention, all associated scores are deleted regardless of score age. Scores can also be deleted independently if they’re older than retention and orphaned (parent trace already deleted).Use case: User provides feedback on a trace (creating a score). If the trace gets retention-deleted 90 days later, the score disappears too.Media Assets
Media Assets
Media assets: Images, audio files, or other media attached to traces (screenshots, generated images, audio recordings).Age determination: Media uses the
created_at field (when the asset was uploaded to ABV).Storage impact: Media files can be large (images, audio). Aggressive retention for projects with heavy media usage significantly reduces storage costs.- Prompts and prompt versions: Managed separately, not affected by trace retention
- Datasets and dataset items: Curated collections for evaluation, retained independently
- Audit logs: Immutable compliance records, never deleted by retention policies
- Project configurations: Settings, integrations, API keys persist regardless of data retention
- User accounts and memberships: Access control data unaffected by retention
Retention and Audit Logs
Audit logs are NOT affected by data retention policies. Audit logs are immutable and persist regardless of retention settings.
- Compliance and regulatory requirements demand long-term audit trails
- Investigations may need historical activity records
- Retention deletions themselves are logged (audit trail of what was deleted and when)
Next Steps
Data Deletion
Manually delete specific data outside of retention policies
Export Data
Export data before retention deletes it for long-term archival
Blob Storage Export
Set up continuous export to external storage for compliance and disaster recovery
Audit Logs
Verify retention deletions are occurring through audit log monitoring