Interface MemoryHealth

Snapshot of the memory store's health and usage statistics. Returned by Memory.health().

interface MemoryHealth {
    totalTraces: number;
    activeTraces: number;
    avgStrength: number;
    weakestTraceStrength: number;
    graphNodes: number;
    graphEdges: number;
    lastConsolidation: null | string;
    tracesPerType: Record<string, number>;
    tracesPerScope: Record<string, number>;
    documentsIngested: number;
}

Properties

totalTraces: number

Total number of traces in the store (active + inactive).

activeTraces: number

Number of traces that are currently active (strength > pruneThreshold).

avgStrength: number

Mean Ebbinghaus strength across all active traces (0–1).

weakestTraceStrength: number

Strength of the weakest active trace.

graphNodes: number

Number of nodes in the knowledge graph (0 when graph is disabled).

graphEdges: number

Number of edges in the knowledge graph (0 when graph is disabled).

lastConsolidation: null | string

ISO 8601 timestamp of the last successful consolidation run. null if consolidation has never been run.

tracesPerType: Record<string, number>

Trace count broken down by Tulving memory type.

tracesPerScope: Record<string, number>

Trace count broken down by visibility scope.

documentsIngested: number

Total number of document chunks ingested via Memory.ingest().