CaviraOSS's OpenMemory Gives AI Agents Human-Like Memory for $0.35 per Million Tokens
OpenMemory is a self-hosted cognitive memory engine for LLM agents, treating time, decay, and multi-sector recall as first-class primitives instead of raw vector search.
Takeaways
- OpenMemory is a self-hosted cognitive memory engine for LLM agents, past 4,000 GitHub stars.
- Five memory sectors: episodic, semantic, procedural, emotional, reflective, each with its own decay curve.
- Temporal knowledge graph tracks valid_from/valid_to windows and supports point-in-time queries.
- Ships Python and Node SDKs, docs, VS Code extension, and native MCP server for Claude, Cursor, Windsurf.
- Local-first on SQLite or Postgres; connectors for GitHub, Notion, Google Drive, OneDrive, web crawler.
- Apache 2.0 licensed; currently undergoing a rewrite with breaking changes expected on main.
Most AI agents suffer from a form of digital amnesia. Between sessions they forget who you are, what you prefer, and everything they learned yesterday. The usual workaround is a retrieval-augmented generation pipeline: chunk text, stuff it into a vector database, retrieve by cosine similarity, and hope for the best. OpenMemory, an Apache-2.0 project from CaviraOSS that has crossed 4,000 stars on GitHub, argues that this approach is really search dressed up as memory.
The project bills itself as a cognitive memory engine for LLMs and agents, shipping as a local-first, self-hosted stack with Python and Node SDKs, a backend server, a VS Code extension, and an MCP server for Claude, Cursor, and Windsurf. It runs on SQLite or Postgres, integrates with LangChain, CrewAI, AutoGen, Streamlit, MCP, and VS Code, and produces explainable traces that show why a given item was recalled.
Sectors, not just similarity
The core idea is that human-like memory is not a single flat space. OpenMemory splits stored information into five parallel sectors: episodic (events), semantic (facts), procedural (skills), emotional (feelings), and reflective (insights). A sector classifier routes new inputs into the right bucket, each with its own decay slope and reinforcement rules.
On top of that, the system layers a temporal knowledge graph that treats time as a first-class dimension. Facts carry valid_from and valid_to windows, new facts auto-close older ones, confidence decays gracefully, point-in-time queries let you ask what was true on a given date, and change detection surfaces when something flipped. If CompanyX had Alice as CEO in 2021 and Bob took over in 2024, posting the newer fact automatically closes Alice's term instead of leaving both entries floating in an ambiguous vector cloud.