Skip to main content
Cost: 3 operations per call

POST /brain/consolidate

Runs the full memory lifecycle pipeline for your account:
  1. Temporal decay — applies the Ebbinghaus forgetting curve to all relationship confidences. Memories that haven’t been accessed recently lose confidence exponentially.
  2. Pruning — removes relationships whose confidence has fallen below the survival threshold (PRUNE_THRESHOLD, default 0.05). Orphaned nodes are also cleaned up.
  3. Cluster compression (requires OpenAI) — identifies densely connected entity clusters and uses an LLM to compress related facts into higher-level abstractions.
Consolidation runs automatically every hour in the background. Call this endpoint manually only when you want to force an immediate cleanup — for example, after a large batch ingestion.

Request body


Response


Code examples


Prune only — POST /brain/prune

If you only want to remove low-confidence memories without running decay or compression:
Cost: 1 operation per call
Always run dry_run: true first:

Memory decay explained

Atlas uses the Ebbinghaus forgetting curve: R = e^(-t/S), where:
  • R = retention (applied to relationship confidence)
  • t = time since last access (days)
  • S = memory stability = DECAY_HALF_LIFE_DAYS / ln(2)
With the default DECAY_HALF_LIFE_DAYS=7, a memory not accessed for: Memories that are frequently retrieved resist decay — each access resets the clock and reinforces the access_count frequency score.

When to consolidate

After loading a large document set, run consolidation to let the LLM compress related clusters into cleaner, higher-level abstractions before your agents start querying.
Run a weekly force: true consolidation to prune knowledge that hasn’t been accessed and keep your Qdrant and Neo4j stores lean.
When a project moves to a new phase and old facts are no longer relevant, lower PRUNE_THRESHOLD temporarily and run a forced consolidation to clean out stale context.