Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.linksee.app/llms.txt

Use this file to discover all available pages before exploring further.

Sleep-mode compression. Clusters cold, low-importance memories by (entity, layer), summarizes each cluster into a single protected learning-layer entry, deletes originals, and runs a forget-sweep. Run at session end or on demand. Set dry_run: true to preview without writing.

Parameters

scope
string
default:"session"
all — consolidate across all entities. session — only the current session’s entities.
min_age_days
number
default:"7"
Minimum age for memories to be eligible for clustering. Set to 0 to consolidate immediately (useful after bulk import).
dry_run
boolean
default:"false"
Preview what would be compressed without modifying the database.
use_llm
boolean
default:"false"
If true, uses MCP Sampling to request the client LLM to write better consolidated summaries. Falls back to heuristic if the client refuses.

What gets consolidated

LayerEligible?Notes
contextYesSituational context fades over time
emotionYesEmotional state is session-specific
implementationYesHow-details get compressed to learnings
goalNoGoals are never consolidated
caveatNoCaveats are permanently protected
learningNoAlready the target layer

Eligibility criteria

  • Heat score < 30 (cold)
  • At least 2 memories in the cluster
  • Age >= min_age_days

Output

Each consolidated cluster produces a learning-layer memory containing:
  • Exemplar fragments from the original memories
  • Time period covered
  • Count of originals replaced
  • replaced_ids for audit trail

Post-consolidation

After clustering, consolidate also:
  1. Forget-sweep: Runs auto-forgetting on remaining unprotected memories
  2. Stalled detection: Marks in_progress memories untouched for 30+ days as stalled

Example

{
  "scope": "all",
  "min_age_days": 14,
  "dry_run": true
}
Run consolidate weekly or use the weekly-consolidation prompt for a guided workflow.