Overview
KaireonAI stores interaction history, summaries, suppressions, and decision traces that grow continuously. The Retention & Archival system lets you control how long data is kept, automatically purge expired records, and export historical interactions to durable file storage before deletion. All retention settings are configured per tenant in Settings > Retention.Tenant Settings
Two retention periods are configurable per organization:| Setting | Default | Description |
|---|---|---|
interactionHistoryRetentionDays | 730 (2 years) | How long raw interaction records are kept in the database |
summaryRetentionDays | 2555 (7 years) | How long daily summary rollups are retained |
Automated Cleanup
The cleanup cron purges expired data on a schedule. Trigger it via:- Expired suppressions — Deletes suppression records where
expiresAt < now(). This keeps the suppression table lean for fast decision-time reads. - Old daily summaries — Deletes daily summary rows older than
summaryRetentionDays. - Old interaction history — Deletes interaction records older than
interactionHistoryRetentionDays(run the export cron first if you need to preserve them).
Interaction History Export
The export cron writes interaction history to Hive-partitioned files for long-term storage and analytics:Hive Directory Structure
Exported files follow a date-partitioned layout compatible with Spark, Athena, Trino, and other query engines:GDPR & Right to Erasure
KaireonAI supports configurable retention to help meet data protection requirements:- Right to erasure: Use the GDPR erasure API at
POST /api/v1/gdpr/erasurewith body{ "customerId": "..." }(admin role required) to atomically delete all interaction history, summaries, suppressions, decision traces, and attribution records for a customer. Returns per-table delete counts for audit. - Configurable per org: Each tenant can set retention periods appropriate to their regulatory environment. Financial services may require 7-year retention; consumer apps may set 1 year.
- Audit trail: Cleanup and export operations are logged in the audit log with the number of records affected, timestamps, and the initiating user or cron trigger.
The erasure endpoint performs a hard delete across all tables in a single transaction. Exported Hive files must be purged separately from your file storage if a customer exercises their right to erasure.
Related
Summary Definitions
Configure how interaction data is aggregated into summaries.
Contact Policies
Suppression records managed by retention cleanup.
Infrastructure Backends
Choose the right storage backend for your interaction volume.