agentskit.js
Memory

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.

Explore nearby

✎ Edit this page on GitHubΒ·Found a problem? Open an issue β†’Β·How to contribute β†’

On this page