Whether consolidation is currently running. Useful for callers to check before scheduling a new run.
The agent's SQLite brain database connection.
The memory association graph for co-activation and clustering.
Optional options: { Optional LLM invoker, embedding function, and personality mutation store for derive, merge, and decay steps respectively.
Optional llmLLM function for deriving insights from memory clusters.
Optional embedEmbedding function for computing trace similarity.
Optional personalityOptional personality mutation store for Ebbinghaus-style decay.
When provided, each consolidation cycle decays all active personality mutations and prunes those whose strength falls below the threshold.
Optional personalityDecay rate subtracted from each personality mutation's strength per cycle. Mutations at or below 0.1 after decay are pruned.
0.05
Run one full consolidation cycle.
The mutex prevents concurrent runs — if _running is already true,
returns immediately with a zero-count result.
Optional config: Partial<ExtendedConsolidationConfig>Optional overrides for consolidation thresholds.
Consolidation statistics (pruned, merged, derived, compacted, durationMs).
Self-improving background consolidation loop with 6 ordered steps: prune, merge, strengthen, derive, compact, re-index.
All database operations use the async
StorageAdapterAPI through the shared SqliteBrain connection. Therun()method is async to accommodate both the database calls and the LLM-backed derive step.