Class MemoryObserver

Constructors

Methods

  • Run compression if accumulated notes exceed the compression threshold.

    When the number of accumulated raw notes exceeds the configured threshold (default: 50), the ObservationCompressor is invoked to produce denser compressed observations. The raw notes are then cleared.

    Returns Promise<null | CompressedObservation[]>

    Compressed observations if threshold was met, null otherwise.

  • Run reflection if accumulated compressed observations exceed the token threshold.

    When the total estimated tokens of accumulated compressed observations exceeds the configured threshold (default: 40,000 tokens), the ObservationReflector is invoked to extract higher-level patterns.

    Returns Promise<null | Reflection[]>

    Reflections if threshold was met, null otherwise.