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 |
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 install --all
mam status
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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file multi_agent_memory-0.1.2.tar.gz.
File metadata
- Download URL: multi_agent_memory-0.1.2.tar.gz
- Upload date:
- Size: 30.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea55093d8786cc5b0fbaa7c08ac1c5385fc608a36dd6822b11b099444d570bf6
|
|
| MD5 |
422bb545f0def5865bdddd2179639b81
|
|
| BLAKE2b-256 |
eaf9eea491bc22a088856b269c11cd2b78f20291860a82e68f48499c48e6a5b8
|
Provenance
The following attestation bundles were made for multi_agent_memory-0.1.2.tar.gz:
Publisher:
release.yml on mic1on/multi-agent-memory
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
multi_agent_memory-0.1.2.tar.gz -
Subject digest:
ea55093d8786cc5b0fbaa7c08ac1c5385fc608a36dd6822b11b099444d570bf6 - Sigstore transparency entry: 2343267580
- Sigstore integration time:
-
Permalink:
mic1on/multi-agent-memory@0287d372b3d73546d8e99b3a45706d7c1181058b -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/mic1on
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0287d372b3d73546d8e99b3a45706d7c1181058b -
Trigger Event:
push
-
Statement type:
File details
Details for the file multi_agent_memory-0.1.2-py3-none-any.whl.
File metadata
- Download URL: multi_agent_memory-0.1.2-py3-none-any.whl
- Upload date:
- Size: 20.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed1a53fc5e2c984c2798ed0ac78989fda985e1111841be3457e4461488457348
|
|
| MD5 |
225389d792d8011409b095f2ec2a38c5
|
|
| BLAKE2b-256 |
912e706811a02e3d6b245f614df87a0d075f3c86ad8de6032fdc3e42fe2a64d3
|
Provenance
The following attestation bundles were made for multi_agent_memory-0.1.2-py3-none-any.whl:
Publisher:
release.yml on mic1on/multi-agent-memory
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
multi_agent_memory-0.1.2-py3-none-any.whl -
Subject digest:
ed1a53fc5e2c984c2798ed0ac78989fda985e1111841be3457e4461488457348 - Sigstore transparency entry: 2343267618
- Sigstore integration time:
-
Permalink:
mic1on/multi-agent-memory@0287d372b3d73546d8e99b3a45706d7c1181058b -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/mic1on
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0287d372b3d73546d8e99b3a45706d7c1181058b -
Trigger Event:
push
-
Statement type: