createVirtualizedMemory
Auto-generated API reference for createVirtualizedMemory.
Function: createVirtualizedMemory()
createVirtualizedMemory(
backing,options?):ChatMemory&object
Defined in: packages/core/src/virtualized-memory.ts:33
Wrap any ChatMemory implementation with a fixed active window.
Older messages (cold) are preserved on disk / in the backing store
but omitted from load() unless a retriever surfaces them.
Key guarantees:
- Backing store always holds the full conversation. No data loss.
load()returns at mostmaxActive + maxRetrievedmessages.save()merges the caller's messages with any cold tail the caller did not see, so callers that load -> mutate -> save do not accidentally truncate history.
#Parameters
#backing
#options?
VirtualizedMemoryOptions = \{\}