Skip to content

Implement memory consolidation and archival strategies #48

@Aureliolo

Description

@Aureliolo

Context

Implement memory management strategies for handling memory growth over time. Without consolidation and archival, memory stores will grow unbounded, degrading retrieval performance and consuming excessive storage.

Acceptance Criteria

Consolidation

  • Summarize/compress old episodic memories (reduce detail while preserving key insights)
  • Configurable consolidation interval (daily, weekly, or custom)
  • Max memories per agent enforcement (oldest/least relevant pruned when limit reached)
  • Consolidation preserves the most important/frequently-accessed memories

Archival

  • Cold storage for old memories (separate from hot/active memory)
  • Archived memories still searchable but with higher latency
  • Configurable archival threshold (age-based or usage-based)

Retention Policy

  • retention_days enforcement per memory type
  • Automatic cleanup of expired memories
  • Retention policy configurable per agent and per memory type

Testing

  • Unit tests for consolidation logic (>80% coverage)
  • Test: memories beyond retention period are cleaned up
  • Test: max memory limit is enforced
  • Test: consolidated memories retain key information

Dependencies

Design Spec Reference

  • Section 7.3 — Memory Configuration

Metadata

Metadata

Assignees

No one assigned

    Labels

    prio:lowNice to have, can deferscope:medium1-3 days of workspec:memoryDESIGN_SPEC Section 7 - Memory & Persistencetype:featureNew feature implementation

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions