Skip to main content

Class: MemoryReflector

Defined in: packages/agentos/src/cognition/memory/pipeline/observation/MemoryReflector.ts:184

Constructors​

Constructor​

new MemoryReflector(traits, config?): MemoryReflector

Defined in: packages/agentos/src/cognition/memory/pipeline/observation/MemoryReflector.ts:192

Parameters​

traits​

HexacoTraits

config?​

Partial<ReflectorConfig>

Returns​

MemoryReflector

Methods​

addNotes()​

addNotes(notes): Promise<MemoryReflectionResult | null>

Defined in: packages/agentos/src/cognition/memory/pipeline/observation/MemoryReflector.ts:210

Add observation notes for future reflection. Returns a MemoryReflectionResult if the note threshold is reached.

Parameters​

notes​

ObservationNote[]

Returns​

Promise<MemoryReflectionResult | null>


clear()​

clear(): void

Defined in: packages/agentos/src/cognition/memory/pipeline/observation/MemoryReflector.ts:276

Clear all pending notes.

Returns​

void


getPendingNoteCount()​

getPendingNoteCount(): number

Defined in: packages/agentos/src/cognition/memory/pipeline/observation/MemoryReflector.ts:271

Get pending note count.

Returns​

number


reflect()​

reflect(existingMemoryContext?): Promise<MemoryReflectionResult>

Defined in: packages/agentos/src/cognition/memory/pipeline/observation/MemoryReflector.ts:236

Force reflection over all pending notes.

Parameters​

existingMemoryContext?​

string

Returns​

Promise<MemoryReflectionResult>


shouldActivate()​

shouldActivate(): boolean

Defined in: packages/agentos/src/cognition/memory/pipeline/observation/MemoryReflector.ts:224

Whether accumulated notes exceed the reflection threshold by token count OR by note count. The note-count path is what makes consolidation run in chat, where note tokens never reach the token threshold.

Returns​

boolean