OpenMemory
CaviraOSS/OpenMemory
Local persistent memory store for LLM applications including claude desktop, github copilot, codex, antigravity, etc.
Local persistent memory store for LLM applications including claude desktop, github copilot, codex, antigravity, etc.
Categories
Tags
Similar tools
ECC
affaan-m/ECC
The agent harness performance optimization system
hermes-agent
NousResearch/hermes-agent
The self-improving AI agent built by Nous Research
AutoGPT
Significant-Gravitas/AutoGPT
AutoGPT: Build, Deploy, and Run AI Agents
ollama
ollama/ollama
Get up and running with Kimi-K2.6, GLM-5.1, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
prompts.chat
f/prompts.chat
The world's largest open-source prompt library for AI
transformers
huggingface/transformers
π€ Transformers: the model-definition framework for state-of-the-art machine learning models
Install
npm install OpenMemoryREADME
π§ This project is currently being rewritten.
Expect breaking changes and potential bugs.
Contributers needed
To contribute, visit https://github.com/CaviraOSS/OpenMemory/tree/rewrite branch. If you find an issue, please open a GitHub issue with details so it can be tracked and resolved.
OpenMemory
Real long-term memory for AI agents. Not RAG. Not a vector DB. Self-hosted, Python + Node.
OpenMemory is a cognitive memory engine for LLMs and agents.
- π§ Real long-term memory (not just embeddings in a table)
- πΎ Self-hosted, local-first (SQLite / Postgres)
- π Python + π¦ Node SDKs
- π§© Integrations: LangChain, CrewAI, AutoGen, Streamlit, MCP, VS Code
- π₯ Sources: GitHub, Notion, Google Drive, OneDrive, Web Crawler
- π Explainable traces (see why something was recalled)
Your model stays stateless. Your app stops being amnesiac.
1. TL;DR β Use It in 10 Seconds
π Python (local-first)
Install:
pip install openmemory-py
Use:
from openmemory.client import Memory
mem = Memory()
mem.add("user prefers dark mode", user_id="u1")
results = mem.search("preferences", user_id="u1")
await mem.delete("memory_id")
Note:
add,search,get,deleteare async. Useawaitin async contexts.
π OpenAI
mem = Memory()
client = mem.openai.register(OpenAI(), user_id="u1")
resp = client.chat.completions.create(...)
π§± LangChain
from openmemory.integrations.langchain import OpenMemoryChatMessageHistory
history = OpenMemoryChatMessageHistory(memory=mem, user_id="u1")
π€ CrewAI / AutoGen / Streamlit
OpenMemory is designed to sit behind agent frameworks and UIs:
- Crew-style agents: use
Memoryas a shared long-term store - AutoGen-style orchestrations: store dialog + tool calls as episodic memory
- Streamlit apps: give each user a persistent memory by
user_id
See the integrations section in the docs for concrete patterns.
π¦ Node / JavaScript (local-first)
Install:
npm install openmemory-js
Use:
import { Memory } from "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" })
await mem.delete("memory_id")
Drop this into:
- Node backends
- CLIs
- local tools
- anything that needs durable memory without running a separate service.
π₯ Connectors
Ingest data from external sources directly into memory:
# python
github = mem.source("github")
await github.connect(token="ghp_...")
await github.ingest_all(repo="owner/repo")
// javascript
const github = await mem.source("github")
await github.connect({ token: "ghp_..." })
await github.ingest_all({ repo: "owner/repo" })
Available connectors: github, notion, google_drive, google_sheets, google_slides, onedrive, web_crawler
2. Modes: SDKs, Server, MCP
OpenMemory can run inside your app or as a central service.
2.1 Python SDK
- β Local SQLite by default
- β Supports external DBs (via config)
- β Great fit for LangChain / LangGraph / CrewAI / notebooks
Docs: https://openmemory.cavira.app/docs/sdks/python
2.2 Node SDK
- Same cognitive model as Python
- Ideal for JS/TS applications
- Can either run fully local or talk to a central backend
Docs: https://openmemory.cavira.app/docs/sdks/javascript
2.3 Backend server (multi-user + dashboard + MCP)
Use when you want:
- orgβwide memory
- HTTP API
- dashboard
- MCP server for Claude / Cursor / Windsurf
Run from source:
git clone https://github.com/CaviraOSS/OpenMemory.git
cd OpenMemory
cp .env.example .env
cd packages/openmemory-js
npm install
npm run dev # default :8080
Or with Docker (API + MCP):
docker compose up --build -d
Optional: include the dashboard service profile:
docker compose --profile ui up --build -d
Using Doppler-managed config (