Highlights
Dormant memory detection: Pass stale_days=N to memory_list to surface memories not accessed in the last N days — ideal for reviewing, consolidating, or purging stale knowledge.
What's New
Added
-
[#784]
stale_daysfilter formemory_list(PR #796, @filhocf): Adds an optionalstale_daysinteger parameter to thememory_listtool and REST endpoint. Memories whoseCOALESCE(last_accessed, created_at)timestamp falls strictly beforenow - stale_days * 86400 secondsare considered stale. Memories accessed exactly at the threshold are NOT stale (strict<semantics). Memories that have never been read (last_accessed IS NULL) fall back tocreated_at, so never-accessed memories appear in stale results when their creation date is old enough. The filter composes freely with the existingtags,memory_type, and pagination parameters.Backend coverage:
- SQLite-vec: fully implemented
- Cloudflare, Hybrid, Milvus: parameter accepted, ignored (returns all memories — no silent wrong results)
Refactor:
_apply_stale_days_filterextracted as a static helper shared betweenget_all_memoriesandcount_all_memories.8 new tests in
tests/storage/test_stale_days.py:test_stale_days_returns_old_memoriestest_stale_days_excludes_recent_memoriestest_stale_days_boundary_not_stale(29 days != stale at threshold 30)test_stale_days_null_last_accessed_uses_created_attest_stale_days_with_tag_filtertest_stale_days_with_memory_type_filtertest_stale_days_paginationtest_no_stale_days_returns_all(backward compat)
Layers Touched
Tool definition → handler → MemoryService → BaseStorage interface → sqlite_vec storage → cloudflare/hybrid/milvus stubs.
Test Count
~1,772 tests (up from ~1,764 in v10.45.1).
Special Thanks
Huge thanks to @filhocf for yet another high-quality contribution — clean implementation, thorough test coverage, and a well-scoped refactor. This is the fifth consecutive release featuring @filhocf's work. Closes #784.
Full Changelog
See CHANGELOG.md for complete details.