agentskit.js
Data layerMemory

sqliteChatMemory

SQLite-backed chat memory. Indexed by session + timestamp.

import { sqliteChatMemory } from '@agentskit/memory'

const memory = sqliteChatMemory({ path: '.agentskit/chat.db' })

Options

OptionTypeDefault
pathstringrequired
tablestringmessages
pragmaRecord<string, string>WAL

Schema

messages(id TEXT PRIMARY KEY, session_id TEXT, role TEXT, parts JSON, created_at INTEGER)

Trade-offs

  • Good for: embedded apps, CLI, single-host servers, Electron.
  • Uses WAL by default — safe for concurrent readers.
✎ Edit this page on GitHub·Found a problem? Open an issue →·How to contribute →

On this page