Local-first memory engine with SQLite persistence, governed recall modes, MCP and HTTP APIs, plus IDE and automation integrations.
Overview
LongMemory is a cognitive memory layer for LLM applications and autonomous agents. It keeps durable records with provenance and temporal rules instead of only embedding chunks and returning nearest neighbors.
Memories are stored immutably in a hydrograph-style substrate backed by SQLite, so graphs, worlds, entities, and history survive restarts without a separate database tier for the default deployment. Recall modes include strict, historical, associative, and world-grounded retrieval with gates for contradictions, permissions, and token budgets.
The same engine is exposed as an npm library, CLI, HTTP service, Model Context Protocol server, dashboard, and VS Code extension. Documentation lists connectors for repositories, files, Markdown, web pages, and several coding-agent session formats. Embeddings can route through multiple hosted or local model providers.
Teams can run a shared server with Docker or Compose, optionally alongside the dashboard, or use in-process memory for development. Integrations cover Claude Code, Codex, Copilot, Cursor, n8n, Dify, Flowise, and Python frameworks via MCP clients.
Key features
- SQLite persistent memory graph
- Strict historical associative recall
- Immutable nodes with provenance
- MCP HTTP CLI and npm library
- VS Code extension and dashboard
- Session import from coding agents
- Decay and reinforcement lifecycle
- Project memory and governed assets
Use cases
- Shared team agent memory
- Coding assistant project context
- Temporal decision tracking
- MCP toolchains for recall
- Self-hosted RAG-style memory