LongMemory is a cognitive memory engine for LLM applications and autonomous agents that provides durable, local-first persistent storage beyond traditional vector database retrieval.
The tool addresses the limitation of conventional memory systems that treat storage as simple retrieval pipelines splitting text into chunks and returning nearest vectors. LongMemory models temporal truth, immutability, governance, and evidence directly. It maintains separate recorded time and valid time, preserves content and provenance without rewriting during recall, enforces project and user-level access controls, and bounds recall results by relevance, contradictions, grounding, and token cost. The engine tracks lifecycle events including deterministic decay, explicit reinforcement, consolidation, and reconsolidation. Recall operates through multiple modes including strict, historical, associative, grounded, and multilingual options, with explainable evidence selection that validates cited excerpts.
The tool suits teams building LLM applications and autonomous agents that need stateless models with stateful application memory. It works as an in-memory library without external dependencies, persists to SQLite for durability across sessions, and runs as a self-hosted service via Docker or from source. The project provides a single TypeScript engine accessible through npm, CLI, HTTP, MCP, a dashboard, and VS Code integration. A zero-dependency Python HTTP client allows calling the self-hosted service from Python frameworks. Native integrations target agent hosts, automation tools, and LLM platforms including Claude Desktop, GitHub Copilot, and others.
The project shows consistent development with regular commits across multiple areas including core engine improvements, documentation updates, and integration work. Active maintenance spans the TypeScript codebase, Python SDK, CLI tooling, and dashboard components. The team addresses both foundational architecture questions and practical integration concerns, evidenced by detailed documentation covering answering policies, Python SDK usage, and design rationale. Development activity indicates sustained focus on the memory engine itself rather than external service dependencies.