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

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

multi_agent_memory-0.1.3.tar.gz (31.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

multi_agent_memory-0.1.3-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file multi_agent_memory-0.1.3.tar.gz.

File metadata

  • Download URL: multi_agent_memory-0.1.3.tar.gz
  • Upload date:
  • Size: 31.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for multi_agent_memory-0.1.3.tar.gz
Algorithm Hash digest
SHA256 2a43689f351d331940d47564e0fffd21a52a1002dbc689a9f361db6ebce6dae7
MD5 6a5901cce8ec94d172d2f716def26dce
BLAKE2b-256 135a1f86c6502cc54c95f44780b4456a266688db146cf541565646517f2e118e

See more details on using hashes here.

Provenance

The following attestation bundles were made for multi_agent_memory-0.1.3.tar.gz:

Publisher: release.yml on mic1on/multi-agent-memory

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file multi_agent_memory-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for multi_agent_memory-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8020923d11877d76fc7cd3319740a7e18ede6d092df23898497c6ec6f78f2594
MD5 a38d2611f44d023f6c8d6554dd31596e
BLAKE2b-256 f237e82ccd693bbebe7d333b01da2c248e88c54ced8bb07dfd5a87a48c23c793

See more details on using hashes here.

Provenance

The following attestation bundles were made for multi_agent_memory-0.1.3-py3-none-any.whl:

Publisher: release.yml on mic1on/multi-agent-memory

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page