Agent memory with a bouncer, a paper trail, and trust issues
Most agent memory systems optimize for volume; this one optimizes for verifiable, correctly scoped truth.

What it does
Memoripy v4 is a local memory runtime for AI agents that stores facts, preferences, policies, and episodic summaries with full version history and temporal validity. It acts as a durable layer between your agent and its context window, deciding what deserves to be remembered through a formal admission barrier and explaining why every recalled result was selected. The system runs fully offline with no required third-party dependencies and can be exposed via an optional HTTP service or MCP server.
The interesting bit
Instead of treating memory as a simple vector dump, Memoripy structures recall as a union of independent retrieval lanes—lexical, semantic, temporal, authority-based, and others—fused so a weak keyword match cannot bury a better semantic candidate. Every result carries a receipt documenting which lanes found it, its rank in each, and why it was included, while a built-in audit CLI inspects for feedback loops, unsupported claims, and conflicting facts before you migrate an existing agent.
Key highlights
- A configurable write barrier rejects noise before it becomes durable memory: retrieved-memory re-ingestion, assistant-authored user claims, system-prompt restatements, transient acknowledgements, untrusted external instructions, and low-confidence candidates are all filtered or quarantined.
- Bitemporal, immutable records track how facts change over time, keeping historical evidence intact while surfacing current truth; explicit corrections and deletions are versioned rather than silently overwritten.
- Scope isolation enforces user, agent, run, project, and organization boundaries, expanding retrieval outward only when coverage is insufficient and preventing cross-tenant leakage by semantic similarity alone.
attention_fastbrain mode separates raw retrieval frequency from actual utility, tracking signals like confirmed use, successful outcomes, corrections, and rejections to avoid popularity poisoning.- File-store reliability includes atomic writes, checksums, transaction journals, and explicit recovery; the system fails closed on corrupt state instead of pretending the memory store is empty.
Caveats
- The v4 branch is currently under active development and the PyPI stable release may still point to the older API until v4 is published, so production use likely requires installing from source.
- The bundled HTTP service is intended for local development and controlled deployments; multi-tenant hosting requires running the separate gateway behind TLS and an appropriate reverse proxy.
- Irreversible evidence deletion for privacy or legal requirements is left to the application to implement separately.
Verdict
Developers building agents that need auditable, long-lived memory with strict provenance and isolation should look here; those looking for a quick drop-in vector cache without admission policies or temporal versioning will find the formalism excessive.
Frequently asked
- What is caspianmoon/memoripy?
- Most agent memory systems optimize for volume; this one optimizes for verifiable, correctly scoped truth.
- Is memoripy open source?
- Yes — caspianmoon/memoripy is open source, released under the Apache-2.0 license.
- What language is memoripy written in?
- caspianmoon/memoripy is primarily written in Python.
- How popular is memoripy?
- caspianmoon/memoripy has 693 stars on GitHub.
- Where can I find memoripy?
- caspianmoon/memoripy is on GitHub at https://github.com/caspianmoon/memoripy.