Skip to main content

agent-memory

One memory for Claude Code and Codex.
What your agents learn, kept as plain Markdown in a git repository you own.

Live demo · Website · Docs

PyPI Python MIT license

mem ui, open in the live demo: a list of memories on the left, one open on the right with where it came from

Why agent-memory

  • Tell one agent, both remember. A preference you give Codex is there the next time Claude Code starts, and the other way round, on every machine that pulls.
  • The right memories in each session. Everything global, plus what was learned in this folder or repository, and nothing from your other projects.
  • Memory in git. One Markdown file per memory in a git repository you own, with where it came from recorded by the hooks. Every change is a commit you can review or revert; add a private remote to sync machines, or keep it all on one. Here is an example. Profiles keep separate sets of memories in repositories of their own, and a switch reaches running sessions too.
  • Nothing to run. Two hooks and git. No service, no account; search by meaning runs on your CPU.
  • A page to keep it tidy. mem ui searches by words and by meaning, edits with undo, and shows what changed week by week.

Quick start

See it first, with nothing installed:

uvx --from "agent-memory-git[ui]" mem ui --demo

Then set it up (Python 3.11+, git and uv):

uv tool install "agent-memory-git[ui]"
mem init ~/repos/agent-memory-data   # your data repository
mem install --dry-run                # every change, as a diff
mem install

Codex asks you to trust new hooks once: open /hooks in Codex and enable the three agent-memory hooks. The docs cover importing existing memories, every file mem install changes, upgrading and uninstalling.

How it works

mem install wires hooks into Claude Code and Codex; at session start they load an index from the private data repository, and at the end of each turn they commit and push new memories back

At session start a hook gives the agent an index of the memories that apply where it runs. The agent saves what is worth keeping as Markdown files, following PROTOCOL.md, and at the end of each turn a hook records where each came from, commits and pushes. The docs explain the file format, where memories load, the commands and the configuration.

Contributing

uv sync --all-extras && uv run pytest

The mem ui page is plain HTML, CSS and JavaScript with no build step, and uv run scripts/site.py serve runs the website and its live demo locally. More in the docs.

License

MIT

Metadata

Release files for agent-memory-git 0.1.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-memory-git 0.1.12
File Size Uploaded Provenance Actions
agent_memory_git-0.1.12.tar.gz 116.3 kB Without provenance Details for agent_memory_git-0.1.12.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agent-memory-git 0.1.12
File Interpreter ABI Platform Actions
agent_memory_git-0.1.12-py3-none-any.whl Python 3 none any Details for agent_memory_git-0.1.12-py3-none-any.whl

Total release size: 261.2 kB

Release files / agent_memory_git-0.1.12.tar.gz

Download URL agent_memory_git-0.1.12.tar.gz
Size 116.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4b614fef27d3ab06e54082be51ca4c9d60690176e4b2f7c6f97cf86a8ef9b7f2
BLAKE2b-256 checksum
How to use checksums
69a5b1b3618c9505d6c1900fae0b96cc921b0fe79fac995a5c5a80b80243fb99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / agent_memory_git-0.1.12-py3-none-any.whl

Download URL agent_memory_git-0.1.12-py3-none-any.whl
Size 144.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
194bdbaf111b1767c8d3fec64bf005af110eb3c2095f860ae6e88c7d47d72e19
BLAKE2b-256 checksum
How to use checksums
2ab144dfdef6ac9d37659c855936b03fb3a6d43f9fc28ddb8ee21b230e4eaada
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for agent-memory-git 0.1.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page