Generated banner for Memoripy v4
Generated logo for Memoripy v4

Memoripy v4

Memory server

Created by Khazar Ayaz

Published in caspianmoon/memoripy. Publisher page

691 GitHub stars

What it is

Evidence-first local memory for AI agents with temporal versions, admission policies, citations, explainable recall, MCP, and audit tooling.
— the description by Khazar Ayaz

AutoGineer overview, from the brain’s own files

Memoripy is an evidence-first memory runtime designed to provide AI agents with structured, verifiable, and persistent memory. It operates by capturing evidence and managing it through a lifecycle that includes admission, deferral, rejection, or quarantine of candidate memories. The system maintains both current and historical versions of data, allowing for temporal tracking. Retrieval is handled through independent lanes and rank fusion, ensuring that agents receive a scoped and cited context pack. Additionally, Memoripy includes audit tooling to provide transparency into what the system has remembered and the reasoning behind those memory decisions.

How it works

Memory model: Hybrid

AutoGineer overview, from the brain’s own files

The system functions as a memory runtime that processes information through six core operations: capturing evidence, applying admission policies to filter candidates, preserving temporal versions, retrieving data via rank fusion, building cited context packs, and auditing memory state. It utilizes a hybrid memory model and supports integration via an official MCP server, a CLI, and a REST API, with storage capabilities provided by PostgreSQL.

Folders
FolderRoleFiles
.githubagent-config4
docsdocs20
examplesexamples4
teststests11
benchmarksfolder3
memoripyfolder32

Requirements

Runtimes: Python >=3.10

Databases: PostgreSQL

API keys (by name): MEMORIPY_API_KEY

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Google Antigravity, Kiro, OpenCode, Amp, Roo Code, Cline, JetBrains Junie, Devin (ex-Windsurf)

Set it up

  1. This brain runs code automatically: 1 script. Review setup.py before opening the folder in Claude Code. No step below turns a hook on for you.

    • setup.py: python setup.py
  2. Not scanned by AutoGineerThe author’s README also describes installing it from a clone of its repository. Read its install section: AutoGineer did not scan that path. https://github.com/caspianmoon/memoripy/blob/42316ca5d49f7df3d91afbf93e65871b33c588ad/README.md#install-v4-from-source
  3. Not scanned by AutoGineerAutoGineer could not scan everything it runs. https://pypi.org/project/memoripy/
  4. Created by Khazar Ayaz. Published in caspianmoon/memoripy. Licence: Apache License 2.0.

Usage

AutoGineer overview, from the brain’s own files

  • Integrating memory into AI agents via the MCP server
  • Managing memory lifecycles with admission and quarantine policies
  • Auditing agent memory state for transparency
  • Retrieving cited context for agent tasks
  • Tracking historical memory versions
“Retrieve all evidence regarding project X from the last month.”
The system returns a cited context pack containing the relevant temporal versions of memories associated with project X.
“Audit the memory admission for the recent user interaction.”
The system provides an explanation of why the interaction was admitted or rejected based on the configured admission policies.

Documentation by Khazar Ayaz

Read the documentation at the source

CHANGELOG.md

Changelog

0.4.0

Memoripy v4 rebuilds the runtime around evidence-first memory correctness.

Added
  • formal admission barrier with accept, defer, reject, and quarantine outcomes

  • source and trust classification

  • typed memory for policies, commitments, procedures, decisions, constraints, beliefs, artifacts, and state

  • bitemporal validity and immutable version history

  • independent retrieval lanes with reciprocal-rank fusion

  • retrieval receipts and cited context packs

  • adaptive scope expansion with user, agent, run, project, organization, and namespace isolation

  • memory audit CLI and static HTML reports

  • memory-contract runner

  • explicit correction, explanation, feedback, and recovery APIs

  • cross-platform locking and corruption-safe file persistence

  • optional API-key protection for the local service

  • strict model-assisted extraction with evidence-span validation

  • deterministic temporal parsing for explicit and relative dates

  • evaluation-driven retrieval tuning and reusable retrieval profiles

  • honest comparison adapters for Mem0, Hindsight, LangMem, and Graphiti

  • hashed, scoped tenant API keys with physically isolated tenant stores

  • authenticated hosted gateway and zero-build memory inspector

  • official optional MCP v2 server with capture, recall, explain, correct, forget, audit, and list tools

  • Docker deployment files for the hosted gateway

  • protected PyPI trusted-publishing workflow and MCP integration CI

Changed
  • automatic extraction is intentionally conservative

  • retrieved memory is rejected as fresh evidence

  • assistant-authored user facts are rejected by default

  • untrusted external instructions and likely secrets are quarantined

  • activation separates retrieval frequency from utility feedback

  • package metadata moved to pyproject.toml

  • external comparison targets that cannot start are reported as unavailable rather than assigned fabricated zero scores

  • MCP remains an optional dependency so the core package stays dependency-free

Compatibility
  • v2 and v3 snapshots migrate to schema 4 on import

  • v3 capture, context, chat, and maintenance namespaces remain available

  • legacy storage wrappers remain best-effort compatibility surfaces

88 files · 62 not served here

Advantages

Limitations

Security

Risk level: Low risk

This brain runs

Install scripts (1)

  • setup.py: python setup.py
  • Low risk: scripts-present (setup.py)

Attribution and licence

Created by
Khazar Ayaz
Declared authors
  • Khazar Ayaz (declared in pyproject.toml)
Publisher
Khazar Ayaz (Community)
Source
caspianmoon/memoripy · commit 42316ca
Licence
Apache License 2.0 (files served here)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Khazar Ayaz.

Install from source

62 of its files are not served here, so there is no ZIP. caspianmoon/memoripy at 42316ca