Repolode
caspianmoon

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. 1

    Install v4 from source

    pip install "git+https://github.com/caspianmoon/memoripy.git@v4"
  2. 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