Skip to main content

multi-agent-memory

Local-first, shared long-term memory for Codex, Pi, OpenCode, Claude Code, and other agent CLIs.

All agents can use the same human-readable Markdown Vault, including global preferences, project decisions, and reusable learnings. The SQLite index is only a rebuildable local search cache. There is no hosted service, telemetry, or automatic upload.

中文文档:README.zh-CN.md

Install

Requires Python 3.11+. The recommended installation uses uv:

uv tool install multi-agent-memory
mam init
mam status

For one-off commands:

uvx --from multi-agent-memory mam status

Install an agent adapter

Install one adapter, all adapters, or choose interactively:

mam install --agent pi
mam install --all
mam install

You can also ask the current agent:

Install and configure multi-agent-memory for the current agent. Use uv tool install multi-agent-memory, preserve existing configuration, run mam init, install only the current agent's adapter with mam install --agent ..., run mam status, and tell me whether a restart is needed. Do not use sudo, overwrite unmanaged files, or read and upload complete transcripts, credentials, tokens, cookies, or private keys.

Supported adapters:

Agent Installation
Codex mam install --agent codex
Pi mam install --agent pi
OpenCode mam install --agent opencode
Claude Code mam install --agent claude
ZCode mam install --agent zcode

Restart the agent after installing or upgrading its adapter. Hermes and OpenClaw are not supported yet.

Everyday use

Ask a connected agent in natural language:

帮我总结这轮记忆
记住:使用中文沟通,回答先给结论
确认刚才那条记忆
忘掉关于部署方式的记忆
回忆关于这个项目的决策

Or use the CLI directly:

mam context
mam propose --type preferences --text "Use Chinese and lead with the conclusion."
mam search "deployment" --include-candidates
mam confirm MEMORY_ID
mam forget MEMORY_ID

New memories are candidates and do not affect recall until confirmed. mam forget marks a memory deprecated; it remains auditable.

Global and project memory

Global memories apply everywhere. Project memories apply when the agent is inside the matching Git checkout:

mam propose --type project \
  --text "Batch jobs must report resolved and unresolved items."

mam propose --type project --project my-app \
  --text "Database migrations must include a rollback plan."

mam context combines global memories with memories for the current project.

Vault and privacy

The Markdown Vault is the source of truth and can be opened in Obsidian. Set its location with environment variables:

export AGENT_MEMORY_VAULT="$HOME/Documents/Obsidian/AgentMemory"
export AGENT_MEMORY_STATE_DIR="$HOME/.local/share/multi-agent-memory"
mam init

Adapters recall confirmed memories automatically. They do not silently summarize arbitrary transcripts. Ask the agent to summarize a meaningful work cycle, or provide a summary file:

mam session-summary --file summary.md

Do not store or commit credentials, API keys, cookies, private keys, complete transcripts, the Vault, or the SQLite index. For permanent deletion, remove the Markdown note and rebuild the index:

mam rebuild-index

Upgrade

uv tool upgrade multi-agent-memory
mam status

After an upgrade, the next Agent startup automatically synchronizes adapters that were previously installed by mam. Run mam install --agent NAME only for a new agent or to repair a reported conflict. Automatic synchronization can be disabled with AGENT_MEMORY_AUTO_SYNC_ADAPTERS=false.

If the tool was installed with an exact version pin, use:

uv tool install --force multi-agent-memory@latest

Upgrading does not delete the Vault or memories. Managed adapter files are backed up when replaced; unrelated configuration is preserved.

Development

uv sync
uv run pytest
python -m compileall src
node --check adapters/pi/agent-memory.js
node --check adapters/opencode/agent-memory.js

MIT License. See LICENSE.

Metadata

Release files for multi-agent-memory 0.2.2

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

Source distribution (sdist)

Source distribution for multi-agent-memory 0.2.2
File Size Uploaded Provenance
multi_agent_memory-0.2.2.tar.gz 37.6 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for multi-agent-memory 0.2.2
File Interpreter ABI Platform
multi_agent_memory-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 62.5 kB

Release files / multi_agent_memory-0.2.2.tar.gz

Download URL multi_agent_memory-0.2.2.tar.gz
Size 37.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2cf39bdd9a6a100bc2fb7911daa37d519fdd0df5428fb27bc7c9c5f3243883ae
BLAKE2b-256 checksum
How to use checksums
135badfd47613e92d9b89224c3e8b335e762c561adea8d97c7a80b62ca648d53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 21, 2026.

Transparency log

Release files / multi_agent_memory-0.2.2-py3-none-any.whl

Download URL multi_agent_memory-0.2.2-py3-none-any.whl
Size 24.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
af65dfd1ed3e35a83eca1a2c2e3523fb9bda022ccfcb1c37e011d61033aab3d7
BLAKE2b-256 checksum
How to use checksums
1e1f645280e12a7ade3b07de4c506eb5dab43a0e02681c4279e2e3fc88f423b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 21, 2026.

Transparency log

Security for multi-agent-memory 0.2.2

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for multi_agent_memory-0.2.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 21, 2026.

Transparency log

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