agentskit.js

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 most maxActive + maxRetrieved messages.
  • 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

ChatMemory

#options?

VirtualizedMemoryOptions = \{\}

#Returns

Explore nearby

✎ Edit this page on GitHub·Found a problem? Open an issue →·How to contribute →

On this page