Skip to content

ExtractionConfig

Defined in: src/memory/extraction/types.ts:123

Per-store automatic-extraction configuration.

Lives on a store (via MemoryStoreConfig) so different stores can extract on different schedules and in different styles. trigger decides when; extractor decides how (omit it to pass raw messages straight to the store); filter prunes content blocks first.

trigger:
| ExtractionTrigger
| ExtractionTrigger[];

Defined in: src/memory/extraction/types.ts:128

When to run extraction. A single trigger or an array; an empty array is rejected at construction. Multiple triggers compose (extraction runs whenever any of them fires).


optional extractor?: Extractor;

Defined in: src/memory/extraction/types.ts:135

How to turn messages into entries. When set, the store must implement add (entries are written to it). When omitted, the manager hands the filtered messages straight to the store’s addMessages (which the store must then implement) — so backends that extract server-side need no client-side extractor.


optional filter?: MemoryMessageFilter;

Defined in: src/memory/extraction/types.ts:143

Content blocks to strip before extraction. Defaults to DEFAULT_MEMORY_MESSAGE_FILTER (excludes toolUse / toolResult).

For use cases or extractors with value in distilling over the full turn you instead want everything: pass { exclude: [] } so tool blocks reach addMessages.