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
| Data | Store | Why |
|---|---|---|
| session metadata | SQLite | query by project, time, model, status |
| raw transcript | JSONL | append-only recovery and debugging |
| curated memory | Markdown | human-editable durable knowledge |
| search index | SQLite FTS5/vector index | rebuildable derived data |
| artifacts | files | preserve raw tool outputs |
Export Flow
- Close or snapshot SQLite session metadata.
- Copy JSONL transcripts and artifacts.
- Include manifest with schema versions and checksums.
- 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.