Skip to content

Search Documentation

Search across all documentation pages

cleanup_memories

Find and archive stale, low-importance, superseded, or failed-indexing memories. Supports dry-run mode to preview candidates before archiving. Use this periodically to keep memory clean and reduce noise in search results.

Parameters#

ParameterTypeRequiredDescription
vaultIdstring (UUID)optionalVault to clean up. Defaults to defaultVaultId.
maxEpisodicAgeDaysinteger (1-365)optionalArchive episodic memories older than N days (default 30)
maxImportanceinteger (1-5)optionalArchive memories with importance <= this (default 1)
staleAfterDaysinteger (1-365)optionalArchive stale memories not updated in N days (default 14)
dryRunbooleanoptionalPreview candidates without archiving (default false)

Returns#

A summary of cleanup results, including the count of memories archived (or candidates found in dry-run mode), broken down by reason (stale, low-importance, superseded, failed-indexing).

Example#

json
{
  "tool": "cleanup_memories",
  "arguments": {
    "dryRun": true,
    "maxEpisodicAgeDays": 60,
    "staleAfterDays": 30
  }
}