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
docs/releasing.md
Releasing Memoripy
Memoripy publishes to PyPI through a dedicated GitHub Actions workflow and PyPI OIDC trusted publishing. No long-lived PyPI token is stored in GitHub.
Trust boundary
Configure the existing memoripy project on PyPI with this exact GitHub publisher identity:
Owner:
caspianmoonRepository:
memoripyWorkflow:
publish-pypi.ymlEnvironment:
pypi
The workflow grants id-token: write only to the final publishing job. The build and verification jobs receive read-only repository access.
The pypi GitHub environment should require approval from a trusted maintainer. This adds a human release gate after artifact verification and before PyPI receives an OIDC token.
Release process
Run the complete test and package-validation matrix for the intended release commit.
Create a non-draft GitHub release with a version tag such as
v0.4.0.Attach exactly one Memoripy wheel and one Memoripy source distribution to that release.
Open Actions → Publish Python package.
Select the
masterbranch.Enter the existing GitHub release tag.
Set
publishtotrue.Approve the protected
pypienvironment when GitHub requests approval.
The workflow downloads the exact artifacts already attached to the selected GitHub release. It does not rebuild the package from the current branch. Before publishing, it verifies:
the tag format
that the GitHub release exists and is not a draft
that exactly one wheel and one source distribution exist
that the package name is
memoripythat the wheel version matches the release tag
that the source-distribution filename matches the version
that Twine accepts the package metadata
the SHA256 hashes printed in the workflow log
Publishing is rejected when the workflow is dispatched from any branch other than master or when the explicit publish=true confirmation is absent.
Current v0.4.0 release
The GitHub prerelease already contains:
memoripy-0.4.0-py3-none-any.whlmemoripy-0.4.0.tar.gz
After the PyPI trusted publisher is registered, publish it by dispatching the permanent workflow from master with tag=v0.4.0 and publish=true.
Rules
Do not upload from a developer laptop.
Do not add a repository or organization-level PyPI token.
Do not publish artifacts rebuilt from a different commit than the GitHub release.
Do not approve the
pypienvironment until the verification job has passed.Do not reuse a version already present on PyPI. Published PyPI files are immutable.
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