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
CONTRIBUTING.md
Contributing to Memoripy
Memoripy accepts focused fixes, tests, memory contracts, integrations, and documentation improvements.
Development setup
git clone https://github.com/caspianmoon/memoripy.git
cd memoripy
git checkout v4
python -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[dev]"On Windows PowerShell, activate with .venv\\Scripts\\Activate.ps1.
Required checks
python -m compileall -q memoripy
python -m unittest discover -s tests -v
python -m memoripy eval
python -m buildContribution rules
Add or update a memory contract for behavior changes.
Preserve evidence and version history when changing memory lifecycle behavior.
Do not weaken user, organization, project, or namespace isolation.
Do not treat retrieved memory as fresh source evidence.
Do not silently recover corrupt data as an empty store.
Keep the base runtime free of required third-party dependencies.
Label benchmark limitations and comparison conditions honestly.
Do not commit generated memory stores, event logs, lock files, API keys, or production conversation data.
Pull requests
Explain:
the user-visible behavior being changed
why the current behavior is wrong or insufficient
the failure case covered by tests or contracts
storage or migration impact
validation performed
Small, reviewable changes are easier to merge than broad rewrites without evaluation.
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