Interface ScoredMemoryTrace

interface ScoredMemoryTrace {
    id: string;
    type: MemoryType;
    scope: MemoryScope;
    scopeId: string;
    content: string;
    structuredData?: Record<string, unknown>;
    entities: string[];
    tags: string[];
    provenance: MemoryProvenance;
    emotionalContext: EmotionalContext;
    encodingStrength: number;
    importance?: number;
    stability: number;
    retrievalCount: number;
    lastAccessedAt: number;
    accessCount: number;
    reinforcementInterval: number;
    nextReinforcementAt?: number;
    associatedTraceIds: string[];
    createdAt: number;
    updatedAt: number;
    consolidatedAt?: number;
    isActive: boolean;
    retrievalScore: number;
    scoreBreakdown: {
        strengthScore: number;
        similarityScore: number;
        recencyScore: number;
        emotionalCongruenceScore: number;
        graphActivationScore: number;
        importanceScore: number;
    };
}

Hierarchy (view full)

Properties

id: string
scopeId: string
content: string
structuredData?: Record<string, unknown>
entities: string[]
tags: string[]
provenance: MemoryProvenance
emotionalContext: EmotionalContext
encodingStrength: number

S_0: initial encoding strength, set at creation.

importance?: number

Optional normalized salience score used by some consolidation/retrieval paths.

stability: number

Time constant (ms); grows with each successful retrieval.

retrievalCount: number

Number of times this trace has been successfully retrieved.

lastAccessedAt: number

Unix ms of last retrieval.

accessCount: number

Total access count (includes non-retrieval touches).

reinforcementInterval: number

Current interval (ms); doubles on each successful recall.

nextReinforcementAt?: number

When this memory is next due for reinforcement review.

associatedTraceIds: string[]
createdAt: number
updatedAt: number
consolidatedAt?: number
isActive: boolean
retrievalScore: number

Composite retrieval score (0-1).

scoreBreakdown: {
    strengthScore: number;
    similarityScore: number;
    recencyScore: number;
    emotionalCongruenceScore: number;
    graphActivationScore: number;
    importanceScore: number;
}

Individual score components for debugging.

Type declaration

  • strengthScore: number
  • similarityScore: number
  • recencyScore: number
  • emotionalCongruenceScore: number
  • graphActivationScore: number
  • importanceScore: number