Problem
Memories accumulate forever. Over time, outdated facts and stale preferences pollute recall results with irrelevant context, degrading the quality of auto-injected memories.
Proposal
Add optional TTL (time-to-live) support:
- New
ttlDays field on MemoryEntry (nullable — null means permanent)
- New config option
defaultTtlDays (default: null/unlimited for backward compat)
- Optional
ttlDays param on memory_store tool
- Background cleanup: on plugin start or periodically, delete entries where
createdAt + ttlDays < now
- CLI command:
openclaw ltm prune for manual cleanup
Use cases
- Auto-captured messages should probably expire after 30-90 days
- Explicitly stored memories can be permanent by default
- Temporal facts ('meeting tomorrow at 3pm') should auto-expire
Implementation notes
- Add
expiresAt column to the LanceDB schema (nullable number/timestamp)
- Filter expired entries in
search() results
- Add cleanup in
registerService.start()
Problem
Memories accumulate forever. Over time, outdated facts and stale preferences pollute recall results with irrelevant context, degrading the quality of auto-injected memories.
Proposal
Add optional TTL (time-to-live) support:
ttlDaysfield onMemoryEntry(nullable — null means permanent)defaultTtlDays(default: null/unlimited for backward compat)ttlDaysparam onmemory_storetoolcreatedAt + ttlDays < nowopenclaw ltm prunefor manual cleanupUse cases
Implementation notes
expiresAtcolumn to the LanceDB schema (nullable number/timestamp)search()resultsregisterService.start()