bodhi-realtime-agent / MemoryDistiller
Class: MemoryDistiller
Defined in: memory/memory-distiller.ts:46
Extracts durable user facts from conversation and persists them to a MemoryStore.
Extraction triggers:
onTurnEnd(): EveryturnFrequencyturns (default 5th turn).onCheckpoint(): Immediately (e.g. on agent transfer, tool result, session close).forceExtract(): Awaitable on-demand extraction.
Coalescing: Only one extraction runs at a time (extractionInFlight flag). Additional triggers while an extraction is running are silently skipped.
Merge-on-write: Each extraction produces the COMPLETE updated fact list (existing + new, deduplicated, contradictions resolved) and replaces all facts.
Constructors
Constructor
new MemoryDistiller(
conversationContext,memoryStore,hooks,model,config):MemoryDistiller
Defined in: memory/memory-distiller.ts:54
Parameters
conversationContext
memoryStore
hooks
model
LanguageModelV1
config
Returns
MemoryDistiller
Methods
forceExtract()
forceExtract():
Promise<void>
Defined in: memory/memory-distiller.ts:78
Returns
Promise<void>
onCheckpoint()
onCheckpoint():
void
Defined in: memory/memory-distiller.ts:74
Returns
void
onTurnEnd()
onTurnEnd():
void
Defined in: memory/memory-distiller.ts:67
Returns
void