agentskit.js
Data layerMemory

fileChatMemory

JSON-file-backed chat memory. Zero infra. Survives restarts.

import { fileChatMemory } from '@agentskit/memory'

const memory = fileChatMemory({ path: '.agentskit/chat.json' })

Options

OptionTypeDefault
pathstringrequired
maxMessagesnumberunlimited
encoding'utf-8''utf-8'

Trade-offs

  • Good for: CLIs, local dev, desktop apps.
  • Bad for: multi-process writes (no locking), high-throughput web.
✎ Edit this page on GitHub·Found a problem? Open an issue →·How to contribute →

On this page