States
| State | Meaning |
|---|---|
| Active | Searchable, appears in retrieval |
| Hot | Frequently accessed, cached in Redis for fast retrieval |
| Archived | Kept in PostgreSQL, removed from normal search |
| System archived | Auto-archived by the lifecycle manager |
| Versioned | Change history recorded in memory_versions |
Lifecycle manager
The lifecycle manager runs during off-peak hours and performs four jobs:- Decay — reduce
importance_scorefor memories not accessed recently. The original extraction score stays inoriginal_importance_score. - Auto-archive — soft-remove stale low-value memories from search without deleting them from PostgreSQL.
- Hot promotion — move high-value, frequently used memories into Redis for faster retrieval.
- Score recompute — recalculate baseline importance when needed.
is_archived = true and system_archived = true. They stay in the database and appear in GDPR exports. Hard delete is a separate explicit action.
Version history
Every meaningful change creates an append-only row inmemory_versions:
| Change type | Trigger |
|---|---|
created | First extraction |
conflict_update | Superseded or changed by conflict resolution |
manual_edit | User or operator edited the memory |
importance_decay | Importance dropped meaningfully |
importance_boost | Importance increased through access |
archived | Archived or deleted from active search |