Skip to main content
Every delete, share, import, and sweep writes an audit entry. memory_audit (GET /agentmemory/audit) queries the trail.

Explicit deletion

Automatic sweeps

All sweeps run inside the daemon; each is a plain function you can also trigger manually with dryRun.

Eviction and retention scoring

POST /agentmemory/evict runs the eviction pass: stale sessions without summaries, low-importance observations, per-session caps, expired and superseded memories. dryRun counts without deleting. The worker functions mem::retention-score and mem::retention-evict score every memory from type weight, confidence, and access count, bucket the scores into tiers, and evict the lowest-scoring records below a threshold, capped at maxEvict (default 50, max 1000), with dryRun support.

TTL on save

A memory saved with forgetAfter expires at that timestamp; the auto-forget sweep enforces it. Deletions triggered this way are audited like manual ones.
Last modified on August 15, 2026