Interface MemoryStoreConfig

interface MemoryStoreConfig {
    vectorStore: IVectorStore;
    embeddingManager: IEmbeddingManager;
    knowledgeGraph: IKnowledgeGraph;
    collectionPrefix: string;
    embeddingDimension?: number;
    decayConfig?: DecayConfig;
    mechanismsEngine?: CognitiveMechanismsEngine;
    moodProvider?: (() => PADState);
    enableGraphActivation?: boolean;
    persistAccessState?: boolean;
}

Properties

vectorStore: IVectorStore
embeddingManager: IEmbeddingManager
knowledgeGraph: IKnowledgeGraph
collectionPrefix: string

Collection name prefix.

Default

'cogmem'
embeddingDimension?: number

The size of the vectors in this store's collections. Unset, a collection is created with the size of the first embedding filed into it, and a read that matches no text (getByScope() with no trace of the scope cached) queries with the embedding model's size: the embedding manager's getEmbeddingDimension(), else the length of one probe embedding.

decayConfig?: DecayConfig
mechanismsEngine?: CognitiveMechanismsEngine

Optional cognitive mechanisms engine for retrieval-time hooks.

moodProvider?: (() => PADState)

Optional mood provider for reconsolidation drift during recordAccess.

Type declaration

enableGraphActivation?: boolean

Step 13: enable graph activation. When true, store upserts entity nodes and co_occurs edges at ingest (from trace.entities), and query seeds Anderson spreading activation from query-extracted entities to compute the per-candidate graphActivation score (weight 0.10 in RetrievalPriorityScorer). Default: false, which preserves the legacy graphActivation: 0 behavior for all candidates.

persistAccessState?: boolean

Keeps a trace's stability, access count, reinforcement interval and next reinforcement time across a restart. With a Brain attached, store() and every access write them into the row's metadata JSON under decay (the object the Memory facade, its consolidation and the memory tools read and write; the row's other keys are kept), and a load reads them back. An access that finds the row's decay changed since the store took the trace or last wrote it (the facade's recall or feedback, another store on the same Brain) counts on top of the row's state. The vector metadata carries the interval and the next reinforcement time as well, so a store with no Brain restores them with a trace; a document that holds no interval restores with one hour. Default true. false writes and loads as before, for one release of before-and-after measurement: an access writes the row's last_accessed, retrieval_count and strength alone, and a load gives the access count 0, the interval one hour and the stability as stored; with no Brain, a trace restored from the vector store has no next reinforcement time and the interval 0 through getByScope() or one hour through query().