[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-9816":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":46,"readmeContent":47,"aiSummary":48,"trendingCount":16,"starSnapshotCount":16,"syncStatus":49,"lastSyncTime":50,"discoverSource":51},9816,"OpenMemory","CaviraOSS\u002FOpenMemory","CaviraOSS","Local persistent memory store for LLM applications including claude desktop, github copilot, codex, antigravity, etc.","https:\u002F\u002Fopenmemory.cavira.app",null,"TypeScript",4220,480,35,9,0,5,25,129,21,30.05,"Apache License 2.0",false,"main",[26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],"ai","ai-agents","ai-infrastructure","ai-memory","artificial-intelligence","cognitive-architecture","embeddings","gemini","llm","long-term-memory","memory","memory-engine","memory-retrieval","ollama","one-line","openai","openmemory","rag","supermemory","vector-database","2026-06-12 02:02:13","# 🚧 This project is currently being fully rewritten.\n\nExpect breaking changes and potential bugs.  \nIf you find an issue, please open a GitHub issue with details so it can be tracked and resolved.\n## OpenMemory\n\n> **Real long-term memory for AI agents. Not RAG. Not a vector DB. Self-hosted, Python + Node.**\n\n[![VS Code Extension](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FVS%20Code-Extension-007ACC?logo=visualstudiocode)](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=Nullure.openmemory-vscode)\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F1300368230320697404?label=Discord)](https:\u002F\u002Fdiscord.gg\u002F93M9XSuEj6)\n[![PyPI](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fopenmemory-py.svg)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fopenmemory-py\u002F)\n[![npm](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fopenmemory-js.svg)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fopenmemory-js)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002FCaviraOSS\u002FOpenMemory)](LICENSE)\n\n![OpenMemory demo](.github\u002Fopenmemory.gif)\n\nOpenMemory is a **cognitive memory engine** for LLMs and agents.\n\n- 🧠 Real long-term memory (not just embeddings in a table)\n- 💾 Self-hosted, local-first (SQLite \u002F Postgres)\n- 🐍 Python + 🟦 Node SDKs\n- 🧩 Integrations: LangChain, CrewAI, AutoGen, Streamlit, MCP, VS Code\n- 📥 Sources: GitHub, Notion, Google Drive, OneDrive, Web Crawler\n- 🔍 Explainable traces (see *why* something was recalled)\n\nYour model stays stateless. **Your app stops being amnesiac.**\n\n---\n\n## 1. TL;DR – Use It in 10 Seconds\n\n### 🐍 Python (local-first)\n\nInstall:\n\n```bash\npip install openmemory-py\n```\n\nUse:\n\n```python\nfrom openmemory.client import Memory\n\nmem = Memory()\nmem.add(\"user prefers dark mode\", user_id=\"u1\")\nresults = mem.search(\"preferences\", user_id=\"u1\")\nawait mem.delete(\"memory_id\")\n```\n\n> Note: `add`, `search`, `get`, `delete` are async. Use `await` in async contexts.\n\n#### 🔗 OpenAI\n\n```python\nmem = Memory()\nclient = mem.openai.register(OpenAI(), user_id=\"u1\")\nresp = client.chat.completions.create(...)\n```\n\n#### 🧱 LangChain\n\n```python\nfrom openmemory.integrations.langchain import OpenMemoryChatMessageHistory\n\nhistory = OpenMemoryChatMessageHistory(memory=mem, user_id=\"u1\")\n```\n\n#### 🤝 CrewAI \u002F AutoGen \u002F Streamlit\n\nOpenMemory is designed to sit behind **agent frameworks and UIs**:\n\n- Crew-style agents: use `Memory` as a shared long-term store\n- AutoGen-style orchestrations: store dialog + tool calls as episodic memory\n- Streamlit apps: give each user a persistent memory by `user_id`\n\nSee the integrations section in the docs for concrete patterns.\n\n---\n\n### 🟦 Node \u002F JavaScript (local-first)\n\nInstall:\n\n```bash\nnpm install openmemory-js\n```\n\nUse:\n\n```ts\nimport { Memory } from \"openmemory-js\"\n\nconst mem = new Memory()\nawait mem.add(\"user likes spicy food\", { user_id: \"u1\" })\nconst results = await mem.search(\"food?\", { user_id: \"u1\" })\nawait mem.delete(\"memory_id\")\n```\n\nDrop this into:\n\n- Node backends\n- CLIs\n- local tools\n- anything that needs durable memory without running a separate service.\n\n---\n\n### 📥 Connectors\n\nIngest data from external sources directly into memory:\n\n```python\n# python\ngithub = mem.source(\"github\")\nawait github.connect(token=\"ghp_...\")\nawait github.ingest_all(repo=\"owner\u002Frepo\")\n```\n\n```ts\n\u002F\u002F javascript\nconst github = await mem.source(\"github\")\nawait github.connect({ token: \"ghp_...\" })\nawait github.ingest_all({ repo: \"owner\u002Frepo\" })\n```\n\nAvailable connectors: `github`, `notion`, `google_drive`, `google_sheets`, `google_slides`, `onedrive`, `web_crawler`\n\n---\n\n## 2. Modes: SDKs, Server, MCP\n\nOpenMemory can run **inside your app** or as a **central service**.\n\n### 2.1 Python SDK\n\n- ✅ Local SQLite by default\n- ✅ Supports external DBs (via config)\n- ✅ Great fit for LangChain \u002F LangGraph \u002F CrewAI \u002F notebooks\n\nDocs: https:\u002F\u002Fopenmemory.cavira.app\u002Fdocs\u002Fsdks\u002Fpython\n\n---\n\n### 2.2 Node SDK\n\n- Same cognitive model as Python\n- Ideal for JS\u002FTS applications\n- Can either run fully local or talk to a central backend\n\nDocs: https:\u002F\u002Fopenmemory.cavira.app\u002Fdocs\u002Fsdks\u002Fjavascript\n\n---\n\n### 2.3 Backend server (multi-user + dashboard + MCP)\n\nUse when you want:\n\n- org‑wide memory\n- HTTP API\n- dashboard\n- MCP server for Claude \u002F Cursor \u002F Windsurf\n\nRun from source:\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FCaviraOSS\u002FOpenMemory.git\ncd OpenMemory\ncp .env.example .env\n\ncd packages\u002Fopenmemory-js\nnpm install\nnpm run dev   # default :8080\n```\n\nOr with Docker (API + MCP):\n\n```bash\ndocker compose up --build -d\n```\n\nOptional: include the dashboard service profile:\n\n```bash\ndocker compose --profile ui up --build -d\n```\n\nUsing Doppler-managed config (recommended for hosted dashboard\u002FAPI URLs):\n\n```bash\ncd OpenMemory\ntools\u002Fops\u002Fcompose_with_doppler.sh up -d --build\n```\n\nCheck service status:\n\n```bash\ndocker compose ps\ncurl -f http:\u002F\u002Flocalhost:8080\u002Fhealth\n```\n\nThe backend exposes:\n\n- `\u002Fapi\u002Fmemory\u002F*` – memory operations\n- `\u002Fapi\u002Ftemporal\u002F*` – temporal knowledge graph\n- `\u002Fmcp` – MCP server\n- dashboard UI (when `ui` profile is enabled)\n\n---\n\n## 3. Why OpenMemory (vs RAG, vs “just vectors”)\n\nLLMs forget everything between messages.  \nMost “memory” solutions are really just **RAG pipelines**:\n\n- text is chunked\n- embedded into a vector store\n- retrieved by similarity\n\nThey don’t understand:\n\n- whether something is a **fact**, **event**, **preference**, or **feeling**\n- how **recent \u002F important** it is\n- how it links to other memories\n- what was true at a specific **time**\n\nCloud memory APIs add:\n\n- vendor lock‑in\n- latency\n- opaque behavior\n- privacy problems\n\n**OpenMemory gives you an actual memory system:**\n\n- 🧠 Multi‑sector memory (episodic, semantic, procedural, emotional, reflective)\n- ⏱ Temporal reasoning (what was true *when*)\n- 📉 Decay & reinforcement instead of dumb TTLs\n- 🕸 Waypoint graph (associative, traversable links)\n- 🔍 Explainable traces (see which nodes were recalled and why)\n- 🏠 Self‑hosted, local‑first, you own the DB\n- 🔌 SDKs + server + VS Code + MCP\n\nIt behaves like a memory module, not a “vector DB with marketing copy”.\n\n---\n\n## 4. The “Old Way” vs OpenMemory\n\n**Vector DB + LangChain (cloud-heavy, ceremony):**\n\n```python\nimport os\nimport time\nfrom langchain.chains import ConversationChain\nfrom langchain.memory import VectorStoreRetrieverMemory\nfrom langchain_community.vectorstores import Pinecone\nfrom langchain_openai import ChatOpenAI, OpenAIEmbeddings\n\nos.environ[\"PINECONE_API_KEY\"] = \"sk-...\"\nos.environ[\"OPENAI_API_KEY\"] = \"sk-...\"\ntime.sleep(3)  # cloud warmup\n\nembeddings = OpenAIEmbeddings()\npinecone = Pinecone.from_existing_index(embeddings, index_name=\"my-memory\")\nretriever = pinecone.as_retriever(search_kwargs={\"k\": 2})\nmemory = VectorStoreRetrieverMemory(retriever=retriever)\nconversation = ConversationChain(llm=ChatOpenAI(), memory=memory)\n\nconversation.predict(input=\"I'm allergic to peanuts\")\n```\n\n**OpenMemory (3 lines, local file, no vendor lock-in):**\n\n```python\nfrom openmemory.client import Memory\n\nmem = Memory()\nmem.add(\"user allergic to peanuts\", user_id=\"user123\")\nresults = mem.search(\"allergies\", user_id=\"user123\")\n```\n\n✅ Zero cloud config • ✅ Local SQLite • ✅ Offline‑friendly • ✅ Your DB, your schema\n\n---\n\n## 5. Features at a Glance\n\n- **Multi-sector memory**  \n  Episodic (events), semantic (facts), procedural (skills), emotional (feelings), reflective (insights).\n\n- **Temporal knowledge graph**  \n  `valid_from` \u002F `valid_to`, point‑in‑time truth, evolution over time.\n\n- **Composite scoring**  \n  Salience + recency + coactivation, not just cosine distance.\n\n- **Decay engine**  \n  Adaptive forgetting per sector instead of hard TTLs.\n\n- **Explainable recall**  \n  “Waypoint” traces that show exactly which nodes were used in context.\n\n- **Embeddings**  \n  OpenAI, Gemini, Ollama, AWS, synthetic fallback.\n\n- **Integrations**  \n  LangChain, CrewAI, AutoGen, Streamlit, MCP, VS Code, IDEs.\n\n- **Connectors**  \n  Import from GitHub, Notion, Google Drive, Google Sheets\u002FSlides, OneDrive, Web Crawler.\n\n- **Migration tool**  \n  Import memories from Mem0, Zep, Supermemory and more.\n\nIf you’re building **agents, copilots, journaling systems, knowledge workers, or coding assistants**, OpenMemory is the piece that turns them from “goldfish” into something that actually remembers.\n\n---\n\n## 6. MCP & IDE Workflow\n\nOpenMemory ships a native MCP server, so any MCP‑aware client can treat it as a tool.\n\n### Claude \u002F Claude Code\n\n```bash\nclaude mcp add --transport http openmemory http:\u002F\u002Flocalhost:8080\u002Fmcp\n```\n\n### Cursor \u002F Windsurf\n\n`.mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"openmemory\": {\n      \"type\": \"http\",\n      \"url\": \"http:\u002F\u002Flocalhost:8080\u002Fmcp\"\n    }\n  }\n}\n```\n\nAvailable tools include:\n\n- `openmemory_query`\n- `openmemory_store`\n- `openmemory_list`\n- `openmemory_get`\n- `openmemory_reinforce`\n\nYour IDE assistant can query, store, list, and reinforce memories without you wiring every call manually.\n\n---\n\n## 7. Temporal Knowledge Graph\n\nOpenMemory treats **time** as a first‑class dimension.\n\n### Concepts\n\n- `valid_from` \u002F `valid_to` – truth windows\n- auto‑evolution – new facts close previous ones\n- confidence decay – old facts fade gracefully\n- point‑in‑time queries – “what was true on X?”\n- timelines – reconstruct an entity’s history\n- change detection – see when something flipped\n\n### Example\n\n```http\nPOST \u002Fapi\u002Ftemporal\u002Ffact\n{\n  \"subject\": \"CompanyX\",\n  \"predicate\": \"has_CEO\",\n  \"object\": \"Alice\",\n  \"valid_from\": \"2021-01-01\"\n}\n```\n\nThen later:\n\n```http\nPOST \u002Fapi\u002Ftemporal\u002Ffact\n{\n  \"subject\": \"CompanyX\",\n  \"predicate\": \"has_CEO\",\n  \"object\": \"Bob\",\n  \"valid_from\": \"2024-04-10\"\n}\n```\n\nAlice’s term is automatically closed; timeline queries stay sane.\n\n---\n\n## 8. CLI (opm)\n\nThe `opm` CLI talks directly to the engine \u002F server.\n\n### Install\n\n```bash\ncd packages\u002Fopenmemory-js\nnpm install\nnpm run build\nnpm link   # adds `opm` to your PATH\n```\n\n### Usage\n\n```bash\n# Start the API server\nopm serve\n\n# In another terminal:\nopm health\nopm add \"Recall that I prefer TypeScript over Python\" --tags preference\nopm query \"language preference\"\n```\n\n### Commands\n\n```bash\nopm add \"user prefers dark mode\" --user u1 --tags prefs\nopm query \"preferences\" --user u1 --limit 5\nopm list --user u1\nopm delete \u003Cid>\nopm reinforce \u003Cid>\nopm stats\n```\n\nUseful for scripting, debugging, and non‑LLM pipelines that still want memory.\n\n---\n\n## 9. Architecture (High Level)\n\nOpenMemory uses **Hierarchical Memory Decomposition** with a temporal graph on top.\n\n```mermaid\ngraph TB\n    classDef inputStyle fill:#eceff1,stroke:#546e7a,stroke-width:2px,color:#37474f\n    classDef processStyle fill:#e3f2fd,stroke:#1976d2,stroke-width:2px,color:#0d47a1\n    classDef sectorStyle fill:#fff3e0,stroke:#f57c00,stroke-width:2px,color:#e65100\n    classDef storageStyle fill:#fce4ec,stroke:#c2185b,stroke-width:2px,color:#880e4f\n    classDef engineStyle fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px,color:#4a148c\n    classDef outputStyle fill:#e8f5e9,stroke:#388e3c,stroke-width:2px,color:#1b5e20\n    classDef graphStyle fill:#e1f5fe,stroke:#0277bd,stroke-width:2px,color:#01579b\n\n    INPUT[Input \u002F Query]:::inputStyle\n    CLASSIFIER[Sector Classifier]:::processStyle\n\n    EPISODIC[Episodic]:::sectorStyle\n    SEMANTIC[Semantic]:::sectorStyle\n    PROCEDURAL[Procedural]:::sectorStyle\n    EMOTIONAL[Emotional]:::sectorStyle\n    REFLECTIVE[Reflective]:::sectorStyle\n\n    EMBED[Embedding Engine]:::processStyle\n\n    SQLITE[(SQLite\u002FPostgres\u003Cbr\u002F>Memories \u002F Vectors \u002F Waypoints)]:::storageStyle\n    TEMPORAL[(Temporal Graph)]:::storageStyle\n\n    subgraph RECALL_ENGINE[\"Recall Engine\"]\n        VECTOR[Vector Search]:::engineStyle\n        WAYPOINT[Waypoint Graph]:::engineStyle\n        SCORING[Composite Scoring]:::engineStyle\n        DECAY[Decay Engine]:::engineStyle\n    end\n\n    subgraph TKG[\"Temporal KG\"]\n        FACTS[Facts]:::graphStyle\n        TIMELINE[Timeline]:::graphStyle\n    end\n\n    CONSOLIDATE[Consolidation]:::processStyle\n    REFLECT[Reflection]:::processStyle\n    OUTPUT[Recall + Trace]:::outputStyle\n\n    INPUT --> CLASSIFIER\n    CLASSIFIER --> EPISODIC\n    CLASSIFIER --> SEMANTIC\n    CLASSIFIER --> PROCEDURAL\n    CLASSIFIER --> EMOTIONAL\n    CLASSIFIER --> REFLECTIVE\n\n    EPISODIC --> EMBED\n    SEMANTIC --> EMBED\n    PROCEDURAL --> EMBED\n    EMOTIONAL --> EMBED\n    REFLECTIVE --> EMBED\n\n    EMBED --> SQLITE\n    EMBED --> TEMPORAL\n\n    SQLITE --> VECTOR\n    SQLITE --> WAYPOINT\n    SQLITE --> DECAY\n\n    TEMPORAL --> FACTS\n    FACTS --> TIMELINE\n\n    VECTOR --> SCORING\n    WAYPOINT --> SCORING\n    DECAY --> SCORING\n    TIMELINE --> SCORING\n\n    SCORING --> CONSOLIDATE\n    CONSOLIDATE --> REFLECT\n    REFLECT --> OUTPUT\n\n    OUTPUT -.->|Reinforce| WAYPOINT\n    OUTPUT -.->|Salience| DECAY\n```\n\n---\n\n## 10. Migration\n\nOpenMemory ships a migration tool to import data from other memory systems.\n\nSupported:\n\n- Mem0\n- Zep\n- Supermemory\n\nExample:\n\n```bash\ncd migrate\npython -m migrate --from zep --api-key ZEP_KEY --verify\n```\n\n(See `migrate\u002F` and docs for detailed commands per provider.)\n\n---\n\n## 11. Roadmap\n\n- 🧬 Learned sector classifier (trainable on your data)\n- 🕸 Federated \u002F clustered memory nodes\n- 🤝 Deeper LangGraph \u002F CrewAI \u002F AutoGen integrations\n- 🔭 Memory visualizer 2.0\n- 🔐 Pluggable encryption at rest\n\nStar the repo to follow along.\n\n---\n\n## 12. Contributing\n\nIssues and PRs are welcome.\n\n- Bugs: https:\u002F\u002Fgithub.com\u002FCaviraOSS\u002FOpenMemory\u002Fissues\n- Feature requests: use the GitHub issue templates\n- Before large changes, open a discussion or small design PR\n\n---\n\n## 13. License\n\nOpenMemory is licensed under **Apache 2.0**. See [LICENSE](LICENSE) for details.\n","OpenMemory 是一个为大语言模型和智能代理设计的认知记忆引擎。它提供真实的长期记忆功能，支持自托管且本地优先（使用 SQLite 或 Postgres），并提供了 Python 和 Node.js 的 SDK。其核心特点包括集成 LangChain、CrewAI 等框架，以及从 GitHub、Notion 等多种数据源导入数据的能力。此外，OpenMemory 还具有可解释的追踪功能，帮助理解回忆的原因。该项目适用于需要增强应用持久化记忆能力的场景，如开发具备长期记忆的人工智能助手或聊天机器人。",2,"2026-06-11 03:24:51","top_topic"]