Local AI Agent Session Store

Local AI apps often need durable sessions, searchable memory, raw transcripts, and export/import without requiring a cloud account.

Storage Shape

agent-data/
  sessions.sqlite
  transcripts/
    session-2026-07-19.jsonl
  memory/
    MEMORY.md
    notes/
  indexes/
    search.sqlite

Pattern

DataStoreWhy
session metadataSQLitequery by project, time, model, status
raw transcriptJSONLappend-only recovery and debugging
curated memoryMarkdownhuman-editable durable knowledge
search indexSQLite FTS5/vector indexrebuildable derived data
artifactsfilespreserve raw tool outputs

Export Flow

  1. Close or snapshot SQLite session metadata.
  2. Copy JSONL transcripts and artifacts.
  3. Include manifest with schema versions and checksums.
  4. Rebuild search indexes after import.

LocalGPT’s docs show a useful pattern: Markdown files are source data, while SQLite FTS5/vector storage is a search index that can be rebuilt.