Memory operating system for LLMs and AI agents that stores, retrieves, and manages long-term memory as an editable graph.
caspianmoon/memoripy
Local, evidence-first memory runtime for AI agents that filters writes, tracks fact changes over time, and explains each recalled result.
Open-source alternative to:Mem0
- Stars
- 692
- Forks
- 57
- Open issues
- 3
- Last commit
- 3 months ago
What is it?
Memoripy is a local memory layer for AI agents. Instead of storing everything an agent sees, it runs an admission policy before writing, rejecting or quarantining noise, likely secrets, and instructions embedded in untrusted content. Records are bitemporal and versioned, so a changed fact such as a new address supersedes the old one while the historical evidence remains queryable.
Recall combines several independent retrieval lanes, including BM25 lexical matching, semantic similarity, entity overlap, and temporal matching, using reciprocal-rank fusion. Each result carries a receipt that shows which lanes found it, its rank in each, and its scope, along with citations back to source material. Memories can be scoped by user, agent, run, project, organization, and namespace.
The project includes a CLI for auditing an existing store for duplicates, conflicts, missing evidence, and feedback loops, plus a memory contract runner, an optional HTTP service, an MCP server, and a self-hosted multi-tenant gateway with an inspector UI. The core has no required third-party dependencies, and LLM or embedding providers are optional.
Key features
- 01Admission policy rejects, defers, or quarantines automatic writes before they reach durable state.
- 02Bitemporal, immutable version history lets current and historical facts be queried separately.
- 03Recall fuses multiple retrieval lanes and attaches a receipt and citations to each result.
- 04Scope isolation across user, agent, run, project, organization, and namespace.
- 05CLI audit, inspect, eval, and recover commands for maintaining a memory store.
- 06Official MCP server and HTTP service with bearer-token authentication.
Use cases
- Giving a personal or customer-facing agent durable memory that updates when facts change.
- Auditing an existing agent memory store for stale, duplicate, or unsupported entries before migrating.
- Hosting per-tenant agent memory behind an authenticated gateway with an inspector UI.
- Connecting an MCP-compatible client to a local memory store with scoped tokens.
Quick start
- 1
Install v4 from source
pip install "git+https://github.com/caspianmoon/memoripy.git@v4" - 2
Create a Memory store and capture a fact in Python
Things to know
- v4 is developed on a branch and the PyPI stable release may still point to the older API.
- Installing from source requires git and a Git-hosted install rather than a published package.
In collections
Topics
FAQ
- What is memoripy?
- Local, evidence-first memory runtime for AI agents that filters writes, tracks fact changes over time, and explains each recalled result. Memoripy is a local memory layer for AI agents. Instead of storing everything an agent sees, it runs an admission policy before writing, rejecting or quarantining noise, likely secrets, and instructions embedded in untrusted content. Records are bitemporal and versioned, so a changed fact such as a new address supersedes the old one while the historical evidence remains queryable.
- Is memoripy free to use? What license does it have?
- memoripy is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is memoripy still maintained?
- Updated within 6 months. The last commit to memoripy was on Aug 17, 2026.
- What can I use memoripy for?
- Giving a personal or customer-facing agent durable memory that updates when facts change. Auditing an existing agent memory store for stale, duplicate, or unsupported entries before migrating. Hosting per-tenant agent memory behind an authenticated gateway with an inspector UI. Connecting an MCP-compatible client to a local memory store with scoped tokens.
- How do I install memoripy?
- Install v4 from source: pip install "git+https://github.com/caspianmoon/memoripy.git@v4" Create a Memory store and capture a fact in Python
- Where can I get memoripy?
- The source code and installation instructions are on GitHub: https://github.com/caspianmoon/memoripy
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Local-first AI memory system that stores conversation history verbatim and retrieves it with semantic search, exposed as an MCP server and CLI.
A RAG framework for LLMs that builds a knowledge graph from documents and uses Personalized PageRank to support multi-hop retrieval and long-term memory.
A local-first memory and decision layer for AI agents that stores context as Markdown and JSONL files you own, usable across several IDEs and LLMs.
Persistent memory layer for AI agents with Git-style snapshots, branches, merges and rollback, backed by MatrixOne.
Open-source, self-hostable AI-native backend that gives AI-generated apps a database, auth, storage, memory, functions and CDN hosting in one service.