Openmemory
Local persistent memory store for LLM applications including claude desktop, github copilot, codex, antigravity, etc.
Last verified:
What is Openmemory?
OpenMemory is a production-ready, self-hosted long-term memory system designed specifically for AI agents and conversational systems. It implements the HMD v2 (Holistic Memory Descriptor v2) specification with advanced features like multi-sector embeddings, time-based decay, and graph-based waypoints. Unlike traditional AI chatbots that are stateless and forget everything after a conversation ends, OpenMemory provides persistent memory storage that retains information across sessions and scales to thousands of interactions.
Key features include multi-sector embeddings that capture factual, emotional, temporal, relational, and behavioral aspects of memories; an intelligent decay algorithm where old memories naturally fade while important ones can be reinforced; graph waypoints that link related memories creating a knowledge graph; and multimodal support for ingesting PDFs, DOCX files, HTML pages, and URLs. The system uses SQLite with vector embeddings for semantic retrieval and offers a composite similarity retrieval scoring 0.6× similarity + 0.2× salience + 0.1× recency + 0.1× link weight.
OpenMemory is ideal for developers building AI agents, assistants, copilots, journaling applications, and enterprise AI solutions who need open, private, and interpretable long-term memory for LLMs. It supports multiple embedding backends (OpenAI, Gemini, Voyage AI, Ollama, E5, BGE), includes a Python SDK for programmatic access, offers LangGraph integration mode for automatic mapping of node outputs to memory sectors, and Ships with a built-in MCP-compatible HTTP endpoint for agents like Claude Desktop, Cursor, Cline, and Windsurf.
Openmemory pricing
Pricing model: Freemium
OpenMemory is completely free and open-source under MIT license. The software itself has no licensing costs since it is self-hosted. Costs only come from embedding provider API usage if using hosted embeddings: OpenAI Gemini or Voyage AI at approximately $0.30-0.40 per 1M tokens. Using local embeddings with Ollama E5 or BGE costs $0. Expected monthly cost for 100k memories self-hosted is ~$5-8 for VPS hosting and storage (~15 GB). This is 10-15× cheaper than Zep Cloud at ~$80-150 per month for the same scale. No free tier or paid plans since the software is open-source and you host it yourself.
Openmemory pros
- Open-source MIT license with full data ownership
- Self-hosted so 100% data stays under your control
- 2-3× faster contextual recall than competitors (110-130ms at 100k nodes)
- 6-10× lower cost than SaaS memory solutions (~$0.30-0.40 per 1M tokens)
- Implements HMD v2 with multi-sector cognitive architecture
- Explainable recall paths showing why memories were retrieved
- Intelligent time-based decay mimicking human memory
- Reinforce important memories to prevent decay
- Graph waypoints create bidirectional memory connections
- Root-child strategy automatically handles large documents over 8000 tokens
- Multimodal ingestion supports PDF, DOCX, TXT, audio, and websites
- Framework-agnostic works with any AI/LLM project
- Python SDK and REST API for programmatic access
- Built-in MCP server compatible with Claude Desktop Cursor Cline
- LangGraph integration mode with automatic sector mapping
- Supports multiple embedding providers OpenAI Gemini Voyage Ollama
- SQLite default storage with optional PostgreSQL and Weaviate backends
- Local embedding support with Ollama E5 BGE for zero embedding cost
- Active development with 705 stars and 73 forks on GitHub
- Production-ready with authentication and optional AES-GCM encryption
Openmemory cons
- Requires self-hosting and manual setup unlike cloud SaaS options
- Needs Node.js 18+ and Python 3.9+ prerequisites
- Requires API key for embedding provider unless using local models
- Configuration involves multiple environment variables which can be complex
- SQLite default may not scale for extremely large enterprise deployments
- No built-in dashboard yet still in progress per roadmap
- Smaller community compared to established vector databases like Pinecone
- Learning curve for understanding HMD v2 sector concepts
- Active development means API may change in future versions
- Documentation is primarily technical quick-start focused less on use cases
- Graph waypoint traversal adds complexity to query logic
- Decay factor tuning requires experimentation for optimal results
- No official managed cloud hosting available unlike Zep Cloud
- Memory sector classification still manual in current version
- Limited to single-hop waypoint expansion no multi-hop traversal
Frequently asked questions about Openmemory
What is OpenMemory and what problem does it solve?
OpenMemory is a production-ready long-term memory system designed specifically for AI agents and conversational systems. It solves the problem that traditional AI chatbots are stateless and forget everything after a conversation ends. While context windows have grown larger, they still cannot retain information across sessions or scale to thousands of interactions. OpenMemory provides persistent memory storage using SQLite with vector embeddings for semantic retrieval, intelligent decay where old memories fade while important ones are reinforced, multi-dimensional understanding with 5-sector embeddings, graph connections via waypoints, and multimodal support for PDFs DOCX HTML and URLs.
How do the multi-sector embeddings work?
Each memory is embedded across 5 specialized dimensions following HMD v2: Factual captures what happened and core information; Emotional captures how it felt with sentiment and emotional context; Temporal captures when it occurred with time-based ordering and recency; Relational captures who was involved and entity relationships; Behavioral captures what actions were taken including intent and behavior patterns. This allows context-aware retrieval where a query about frustrations matches the emotional sector while yesterday's meeting targets the temporal sector.
What is the decay algorithm and how does it work?
Memories decay over time using the formula: score = similarity (1 + log(1 + reinforcements)) exp(-decay_factor * age_days). Similarity is the vector cosine similarity to the query, reinforcements is the number of times the memory has been accessed or reinforced, age is time since memory was created in days, and decay factor is configurable with default 0.1. This mimics human memory where recent and frequently accessed memories rank higher. You can boost important memories using the reinforce endpoint to prevent decay.
How do I set up and start OpenMemory?
Clone the repository with git clone https://github.com/nullure/openmemory.git, cd into it, then cd backend and run npm install. Create a .env file in the backend directory with your embedding provider (OpenAI Gemini or Voyage AI) API key, set EMBED_MODE to simple or advanced, configure PORT (default 3000), DECAY_FACTOR (default 0.1), and DB_PATH. Run npm run build then npm start. The server starts on http://localhost:3000. Prerequisites are Node.js 18+ and npm/yarn, plus Python 3.9+ for the SDK.
What embedding providers does OpenMemory support?
OpenMemory supports OpenAI Gemini and Voyage AI as hosted embedding providers requiring API keys. It also supports local embeddings through Ollama E5 and BGE models at zero cost. You configure the provider in the .env file with EMBED_PROVIDER set to openai gemini voyage ollama e5 or bge. Local embeddings eliminate the ~$0.30-0.40 per 1M tokens cost of hosted embeddings.
How do I add and query memories?
To add a memory, POST to /memory/add with content and optional metadata. Example: curl -X POST http://localhost:3000/memory/add with JSON content like 'User prefers dark mode' and metadata like source and category. You get back a memoryId. To query, POST to /memory/query with your query string and topK parameter. Example: curl -X POST http://localhost:3000/memory/query with query 'What are the UI preferences?' and topK 5. Results return memories ranked by composite score including similarity salience recency and link weight.
What is the root-child memory strategy?
For large documents over 8000 tokens, OpenMemory automatically creates a root-child structure. It creates a root memory containing a reflective summary, splits the document into child sections of approximately 3000 characters each, links children to the root via waypoints, and allows querying the summary while drilling down to specific sections. This enables efficient handling of large documents without losing detail while maintaining a high-level overview.
How does LangGraph integration work?
Set OM_MODE=langgraph OM_LG_NAMESPACE=default OM_LG_MAX_CONTEXT=50 and OM_LG_REFLECTIVE=true in your .env to enable LangGraph integration mode. This mounts additional REST endpoints: /lgm/store to persist node output, /lgm/retrieve to retrieve memories scoped to a node/namespace/graph, /lgm/context to fetch summarized multi-sector context for a session, /lgm/reflection to generate and store higher-level reflections, and /lgm/config to inspect configuration. Node outputs map automatically to sectors: observe to episodic, plan to semantic, reflect to reflective, act to procedural, and emotion to emotional.
What is the MCP server and which tools support it?
OpenMemory ships with a built-in Model Context Protocol HTTP endpoint at /mcp for MCP-aware agents including Claude Desktop Cursor Cline RooCline Windsurf Witsy Enconvo and Augment. No SDK install is required. Available tools are openmemory.query openmemory.store openmemory.reinforce openmemory.list and openmemory.get. The server advertises protocolVersion 2025-06-18 and serverInfo.version 2.1.0 for broad compatibility. For stdio clients like Claude Desktop, point them at node backend/dist/mcp/index.js.
How does OpenMemory compare to competitors like Zep Mem0 and vector databases?
OpenMemory delivers 2-3× faster contextual recall (110-130ms vs 280-350ms for Zep Cloud at 100k nodes) and 6-10× lower cost (~$0.30-0.40 per 1M tokens vs ~$2.0-2.5 for Zep). It is open-source MIT licensed and self-hosted with 100% data ownership, while Zep is closed SaaS-only. OpenMemory has explainable recall paths which competitors lack, multi-sector fusion retrieval vs single embedding, supports local embeddings while Zep does not, and achieves 94-97% accuracy on LongMemEval vs 58-85% for Zep and 74% for Mem0. Vector databases like Chroma Weaviate Pinecrate lack cognitive behaviors like decay episodic recall and reflection.