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

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: caspianmoon

  • Repository: memoripy

  • Workflow: publish-pypi.yml

  • Environment: 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

  1. Run the complete test and package-validation matrix for the intended release commit.

  2. Create a non-draft GitHub release with a version tag such as v0.4.0.

  3. Attach exactly one Memoripy wheel and one Memoripy source distribution to that release.

  4. Open Actions → Publish Python package.

  5. Select the master branch.

  6. Enter the existing GitHub release tag.

  7. Set publish to true.

  8. Approve the protected pypi environment 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 memoripy

  • that 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.whl

  • memoripy-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 pypi environment 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

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