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#
| Parameter | Type | Required | Description |
|---|---|---|---|
| vaultId | string (UUID) | optional | Vault to clean up. Defaults to defaultVaultId. |
| maxEpisodicAgeDays | integer (1-365) | optional | Archive episodic memories older than N days (default 30) |
| maxImportance | integer (1-5) | optional | Archive memories with importance <= this (default 1) |
| staleAfterDays | integer (1-365) | optional | Archive stale memories not updated in N days (default 14) |
| dryRun | boolean | optional | Preview 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
}
}