agentskit.js
Data layerMemory

createVirtualizedMemory

Hot-window + cold retriever. Keep recent messages; retrieve old ones on demand.

import { createVirtualizedMemory } from '@agentskit/memory'

const memory = createVirtualizedMemory({
  window: 20,
  cold: vectorStore,
  embed: openaiEmbedder({ apiKey }),
})

When to use

Long-running sessions where most context is stale but some old turns matter. Cheaper than always-on full history.

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

On this page