Skip to main content

Class: MemoryReflector

Defined in: packages/agentos/src/memory/observation/MemoryReflector.ts:85

Constructors

Constructor

new MemoryReflector(traits, config?): MemoryReflector

Defined in: packages/agentos/src/memory/observation/MemoryReflector.ts:91

Parameters

traits

HexacoTraits

config?

Partial<ReflectorConfig>

Returns

MemoryReflector

Methods

addNotes()

addNotes(notes): Promise<MemoryReflectionResult | null>

Defined in: packages/agentos/src/memory/observation/MemoryReflector.ts:108

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/memory/observation/MemoryReflector.ts:169

Clear all pending notes.

Returns

void


getPendingNoteCount()

getPendingNoteCount(): number

Defined in: packages/agentos/src/memory/observation/MemoryReflector.ts:164

Get pending note count.

Returns

number


reflect()

reflect(existingMemoryContext?): Promise<MemoryReflectionResult>

Defined in: packages/agentos/src/memory/observation/MemoryReflector.ts:129

Force reflection over all pending notes.

Parameters

existingMemoryContext?

string

Returns

Promise<MemoryReflectionResult>


shouldActivate()

shouldActivate(): boolean

Defined in: packages/agentos/src/memory/observation/MemoryReflector.ts:118

Whether accumulated notes exceed the reflection threshold.

Returns

boolean