OpenMemory Cognitive Memory Engine
A self-hosted cognitive memory engine for LLMs and agents, offering real long-term memory with a local-first design, Python and Node support.
- Source repo
- CaviraOSS/LongMemory
- Stars
- ★ 4.6k
- Last updated
- 2d ago v2.0.1
- FARS reviewed
- Nov 08, 2026 +1 new
- License
- Apache-2.0
- Primary language
- TypeScript
- FA score
- 65/100 · Some gaps
At a glance
- How it runs
- Works with
- Universal · cross-platformClaude Code · OpenAI API
- Cost
- Free software; you pay for model usage
- OS / editors
- VS Code per README
- Setup effort
- Medium · a few setup steps
- You'll need
- Typical use
- A developer building a chatbot wants to remember user preferences persistently, such as 'user prefers dark mode'.
- Not a fit if
- Users wanting a zero-setup tool with no server or database to run
- Teams relying on a hosted platform's native memory instead of self-hosting
- Website
- cavira.app/projects/longmemory ↗ set on GitHub
- Maintenance
- Commits in the last 30 dayslast commit 2026-12-01latest release v2.0.1 (2026-11-28)+2.7 ★/day over 7 days
- Source review
- 65/100 · Some gaps
What does this agent do, and when should you use it?
OpenMemory is a self-hosted cognitive memory engine that provides real long-term memory for LLMs and AI agents, going beyond simple RAG or vector databases. It features multi-sector memory (episodic, semantic, procedural, emotional, reflective), a temporal knowledge graph, composite scoring, decay mechanisms, and explainable recall traces. The project offers Python and Node SDKs, a backend server with dashboard and MCP, a CLI tool, and a VS Code extension, along with connectors to ingest data from GitHub, Notion, Google Drive, and more. The project is currently being rewritten, so expect breaking changes.
OpenMemory provides persistent memory for LLM applications. It offers Memory class with async methods add, search, delete, and supports user-scoped memory via user_id. It classifies memories into sectors (episodic, semantic, procedural, emotional, reflective), maintains a temporal knowledge graph with valid_from/valid_to windows, and uses composite scoring (salience, recency, coactivation) for recall. It includes a CLI (opm), an MCP server exposed at /mcp over HTTP, and integrations with LangChain, CrewAI, AutoGen, and Streamlit. Connectors allow ingesting data from external sources like GitHub.
- A developer building a chatbot wants to remember user preferences persistently, such as 'user prefers dark mode'.
- A data scientist using LangChain wants to add persistent memory to their conversation chains without deploying extra services.
- An organization needs multi-user memory isolation with a central dashboard and HTTP API for their internal tools.
- A developer using Claude Code or Cursor wants to let their IDE assistant query and store code-related memories via MCP.
- A personal knowledge management user imports data from Notion and Google Drive, and uses temporal queries to track fact changes over time.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
pip install openmemory-pynpm install openmemory-jsdocker compose up --build -d
- Ports
8080- Config files
.env.example.env- Install notes cover
- Docker
How do you install or deploy this agent?
Python SDK: pip install openmemory-py. Node SDK: npm install openmemory-js. Backend server: clone the repo, copy .env.example to .env, then inside packages/openmemory-js run npm install and npm run dev (default port 8080). Docker: docker compose up --build -d, optionally with UI: docker compose --profile ui up --build -d.
How do you use this agent?
Python: from openmemory.client import Memory; mem = Memory(); await mem.add("user prefers dark mode", user_id="u1"); results = await mem.search("preferences", user_id="u1"). Node: const { Memory } = require("openmemory-js"); const mem = new Memory(); await mem.add("user likes spicy food", { user_id: "u1" }); const results = await mem.search("food?", { user_id: "u1" }). CLI: start server with opm serve, then add: opm add "user prefers dark mode" --user u1 --tags prefs, query: opm query "preferences" --user u1.
Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
What are this agent's strengths and limitations?
- Multi-sector memory classification goes beyond simple vector search, distinguishing facts, events, preferences, etc.
- Temporal knowledge graph enables point-in-time queries and auto-closes outdated facts.
- Self-hosted and local-first with SQLite/Postgres, avoiding vendor lock-in.
- Explainable recall traces show which nodes were used and why.
- Supports multiple embedding providers (OpenAI, Gemini, Ollama) and a synthetic fallback.
- Project is in active rewrite, with breaking changes and potential bugs.
- Deployment requires setting up multiple components (Python/Node, Docker, backend server), which can be complex.
- No native integration with ChatGPT as a platform; only via OpenAI API adapter.
- Migration tool only supports specific sources (Mem0, Zep, Supermemory), not all existing memory systems.
- While self-hosted ensures data ownership, encryption at rest is not yet implemented (on roadmap).
How does this agent compare with similar options?
Compared to memory systems like Mem0, Zep, or Supermemory, OpenMemory emphasizes multi-sector memory and explainability rather than just vector retrieval. The code examples show its difference from LangChain with Pinecone, offering a more lightweight, local-first approach.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| OpenMemory Cognitive Memory Engine This agent | 65 · Some gaps | Library / SDKFree + model costs | ★ 4.6k | 2d ago | TypeScript | Claude Code · OpenAI API |
| ClickHouse Loom | 68 · Some gaps | — | ★ 264 | today | Python | Codex · Claude Code |
| Synap — Memory Layer for Production AI Agents | 50 · Major gaps | — | ★ 83 | 1d ago | Python | Codex · Claude Code · OpenAI API · Claude API |
| Remnic Agent Memory | 73 · Some gaps | CLIFree + model costs | ★ 243 | 1d ago | TypeScript | ChatGPT · Codex · Claude Code · OpenAI API |
How does FollowAgents rate this agent?
Why each dimension lost points
README and SECURITY.md describe local-first storage, API keys/TLS/origin controls for network deployment, server-bound identity, and least-privilege credentials. The skills treat recalled content as untrusted evidence and prohibit storing credentials. Claude/Codex guidance encourages memory use around meaningful work, but the sample shows no per-write user confirmation mechanism, so confirmation is deducted. Data flow and sensitive-data rules are documented, but concrete flows and retention details for connectors, models, and remote deployments are incomplete in this sample. Dependency security is supported by a frozen install and audit script, but no evidence of dependency-risk remediation is shown. Destructive external writes are said to be disabled and import plans reviewed, but no rollback procedure is shown. Contributor names and maintenance channels are present; publisher identity remains unknown.
The README, package metadata, CI, and skills are broadly consistent about the TypeScript engine, MCP, CLI/API, and integrations. CI defines release checks, type checks, builds, and a container health check, supporting ordinary reliability, but does not establish that these checks ran. Multiple external model, framework, and service dependencies have no availability or fallback guarantees in the supplied material. The sample also shows limited detail about user-facing failure handling, so those criteria receive partial scores.
The README addresses application developers and operators across library, CLI, service, MCP, desktop, and automation scenarios. Skills specify when to read, query, and save memory and constrain recalled content to evidence; however, permission boundaries and capability limitations are mostly documented claims, with implementation detail absent from the sample. Installation covers npm, Python, Docker, Compose, and source builds, with environment-variable examples, though Node requirements and integration-specific differences require adaptation.
The README has clear sections, an architecture diagram, and documentation links; it includes source, package, Docker, service, migration, and command examples. Examples and FAQ score partially: quick starts and framework samples exist, but there is no FAQ and some configuration detail is delegated to other documents. Network deployment, credentials, and storage cautions are stated, while not all limits are quantified in this sample. Apache-2.0 matches package metadata. The README links a changelog and the package has a version, but changelog contents are not included, limiting assessment of change-history quality. Contribution/governance files, issue channels, and a security-reporting path describe maintenance, though named responsibility and response commitments are limited.
Recall returns results, and the README describes evidence selection, explanations, and token bounds; the skills recommend storing only durable, validated information. These support usable output, but the sample does not establish stable result formats across integrations. Persistent, temporal, governed project memory has a clear stated value beyond ordinary retrieval. The library and local SQLite can work without an external service; richer model features, hosted service operation, and integrations add setup and operational costs that are not quantified here.
README guidance on installation, interfaces, deployment, and security receives partial corroboration from package.json, CI, SECURITY.md, skill files, and framework examples. Many product features and benchmark capabilities remain primarily README claims; CI listing check commands does not show they ran or passed. Documentation generally distinguishes local use, optional model calls, and service deployment, but the boundary between claimed features and verified results is not fully clear, so none of these criteria receives full marks.
- Network deployments require operators to configure API keys, TLS, origin restrictions, encrypted persistent storage, and backup protection; the README and security policy do not mean this static review verified a deployment.
- Persistent memory may contain sensitive project or user information. The sample prohibits storing credentials but does not fully show connector data flows, retention periods, or deletion and recovery operations.
- CI files list checks and health-check steps, but this review did not run them or verify their results.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
Release notes excerpt
What's new Integrations: - Directly connect to your favourite AI workflows What's Changed * fix(mcp): resolve STDIO protocol violations and PostgreSQL parameter bugs by @kishan0725 in https://github.com/CaviraOSS/LongMemory/pull/106 * feat(mcp): add temporal graph support to MCP tools by @kishan0725 in https://github.com/CaviraOSS/LongMemory/pull/108 * Bump npm version by @nullure in https://github.com/CaviraOSS/LongMemory/pull/113 * Fix issue 129 by @recabasic in https://github.com/CaviraOSS/LongMemory/pull/130 …View on GitHub ↗ -
v1.3.0 Beta v1.3.0
Release notes excerpt
Changelog api simplification - python sdk: simplified to zero-config Memory() api matching javascript - from openmemory.client import Memory → mem = Memory() - works out of the box with sensible defaults (in-memory sqlite, fast tier, synthetic embeddings) - optional configuration via environment variables or constructor - breaking change: moved from OpenMemory class to Memory class benchmark suite rewrite - implemented comprehensive benchmark suite in temp/benchmarks/ - typescript-based using tsx for execution …View on GitHub ↗ -
Release notes excerpt
1.2.3 - 2025-12-14 Added - Temporal Filtering: Enables precise time-based memory retrieval - Added startTime and endTime filters to query method across Backend, JS SDK, and Python SDK. - Allows filtering memories by creation time range. - Fully integrated into hsg_query logic. Fixed - JavaScript SDK Types: Fixed IngestURLResult import error and v.v property access bug in VectorStore integration. - Python SDK Filtering: Fixed missing implementation of user_id and temporal filters in hsg_query loop. What's Changed …View on GitHub ↗
FAQ
How is OpenMemory different from vector databases or RAG?
What runtimes are required?
How can I integrate OpenMemory with my existing LLM app?
Where is data stored and is it secure?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.