Audit Retention
Workspace Settings
Retention is configured per workspace:
retention_policy_enabled(default:false)audit_retention_days(default:365)raw_retention_days(default:90)retention_mode(archive|hard_delete, default:archive)
Data Handling
raw_events
- old rows are deleted when older than
raw_retention_days
audit_logs
Two modes:
archive(recommended):- copy old rows into
audit_logs_archive - remove copied rows from
audit_logs
- copy old rows into
hard_delete:- remove old rows directly from
audit_logs
- remove old rows directly from
Job Execution
- memory-core runs a scheduled retention sweep (daily cadence)
- only workspaces with
retention_policy_enabled=trueare processed - each run emits
audit.retention.run
audit.retention.run params include:
retention_modeaudit_retention_daysraw_retention_daysarchived_countdeleted_countraw_deleted_count
Operational Guidance
- Start with
archivemode. - Keep at least 180-365 days for audit in enterprise environments.
- Use
hard_deleteonly where legal/compliance constraints require strict data minimization.