FactMemoryServiceOptions
Fact-extracting cross-session memory, backed by a PersistentMemoryStore
block per user (scope user, owner = session.userId, one fact per line).
Unlike the raw-message ingestion path (extractMemories), this service
runs an LLM merge at ingest: existing facts + the new transcript produce
the COMPLETE updated fact list (still-true facts kept, changed ones
updated, obsolete ones dropped) — so the block stays small, current, and
deduplicated instead of growing append-only.
Works on every block backend: file (node), Postgres/Redis adapters, and
Cloudflare DO SQLite via SqlPersistentMemoryStore.
Properties
Section titled “Properties”blockKey?
Section titled “blockKey?”optional blockKey?: string;Block key per user. Default: 'FACTS'.
charLimit?
Section titled “charLimit?”optional charLimit?: number;Char limit for the fact block. Default: DEFAULT_BLOCK_CHAR_LIMIT.
maxFacts?
Section titled “maxFacts?”optional maxFacts?: number;Max facts kept per user. Default: 25.
model: LanguageModel;Extractor/merger model, run at temperature 0.
store: PersistentMemoryStore;