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.
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.
| Folder | Role | Files |
|---|---|---|
| .github | agent-config | 4 |
| docs | docs | 20 |
| examples | examples | 4 |
| tests | tests | 11 |
| benchmarks | folder | 3 |
| memoripy | folder | 32 |
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
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
- 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
- Not scanned by AutoGineerAutoGineer could not scan everything it runs. https://pypi.org/project/memoripy/
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.tomlexternal 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
- .dockerignore (not served here)
- .github/workflows/ci.yml (not served here)
- .github/workflows/compare-memory.yml (not served here)
- .github/workflows/mcp-smoke.yml (not served here)
- .github/workflows/publish-pypi.yml (not served here)
- .gitignore (not served here)
- ATTRIBUTION.md
- AUTOGINEER-RUNS.md
- CHANGELOG.md
- CONTRIBUTING.md
- Dockerfile (not served here)
- LICENSE
- README.md (not served here)
- SECURITY.md
- benchmarks/README.md (not served here)
- benchmarks/__init__.py (not served here)
- benchmarks/v4_contracts.json (not served here)
- docker-compose.gateway.yml (not served here)
- docs/admission-and-trust.md
- docs/api-reference.md
- docs/architecture.md
- docs/assistant-memory.md
- docs/assisted-extraction.md
- docs/audit-and-evals.md
- docs/brain-mode-and-maintenance.md
- docs/concepts.md
- docs/faq.md
- docs/getting-started.md
- docs/hosted-gateway.md
- docs/index.md
- docs/low-level-and-compatibility.md
- docs/mcp-server.md
- docs/migration-v3-v4.md
- docs/release-v0.4.0.md
- docs/releasing.md
- docs/service-and-storage.md
- docs/tuning-and-comparisons.md
- docs/v4-architecture.md
- examples/README.md (not served here)
- examples/assisted_extraction.py (not served here)
- examples/mcp_tokens.example.json (not served here)
- examples/v4_receipts.py (not served here)
- memoripy/__init__.py (not served here)
- memoripy/__main__.py (not served here)
- memoripy/admission.py (not served here)
- memoripy/assisted.py (not served here)
- memoripy/audit.py (not served here)
- memoripy/cli.py (not served here)
- memoripy/client.py (not served here)
- memoripy/comparisons.py (not served here)
- memoripy/engine.py (not served here)
- memoripy/evals.py (not served here)
- memoripy/extractors.py (not served here)
- memoripy/gateway.py (not served here)
- memoripy/implemented_models.py (not served here)
- memoripy/in_memory_storage.py (not served here)
- memoripy/inspector.py (not served here)
- memoripy/json_storage.py (not served here)
- memoripy/main.py (not served here)
- memoripy/mcp_server.py (not served here)
- memoripy/memory_manager.py (not served here)
- memoripy/memory_store.py (not served here)
- memoripy/model.py (not served here)
- memoripy/pipeline.py (not served here)
- memoripy/postgres_repository.py (not served here)
- memoripy/repository.py (not served here)
- memoripy/retrieval.py (not served here)
- memoripy/service.py (not served here)
- memoripy/storage.py (not served here)
- memoripy/temporal.py (not served here)
- memoripy/tenant.py (not served here)
- memoripy/tuning.py (not served here)
- memoripy/types.py (not served here)
- memoripy/utils.py (not served here)
- pyproject.toml (not served here)
- requirements.txt (not served here)
- setup.py (not served here)
- tests/test_assisted_temporal.py (not served here)
- tests/test_benchmarks.py (not served here)
- tests/test_mcp_integration.py (not served here)
- tests/test_mcp_tools.py (not served here)
- tests/test_memoripy_v2.py (not served here)
- tests/test_memoripy_v3.py (not served here)
- tests/test_memoripy_v4.py (not served here)
- tests/test_pipeline_features.py (not served here)
- tests/test_publish_workflow.py (not served here)
- tests/test_tenant_gateway.py (not served here)
- tests/test_tuning_comparisons.py (not served here)
Advantages
- Provides explainable recall and audit tooling to understand why specific information was remembered. evidence: docs/index.md
- Supports temporal versioning to track changes in memory over time. evidence: docs/index.md
Limitations
- Requires external configuration and setup for storage backends like PostgreSQL. evidence: pyproject.toml
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