Skip to main content
Glama

agent-memory

面向编码代理的本地 Markdown 记忆——任何提供商、任何工具皆可用。

没有共享布局时,每个厂商都拥有一座坟墓——会话存档永远无法成为持久身份,除非你重新教导每一个新代理。完整理由(对比 RAG、对比保险库、对比厂商记忆)见 abi/WHY.md。参考实现路线图:ROADMAP.md

你的记忆存放在你拥有的文件夹中:~/.agents/memory(身份 + 项目地图)和 <repo>/.agents/memory(按项目的工作内容)。你的 Agent——或任何读取 markdown 和可选 MCP 的主机——使用相同的布局。

Markdown 是事实来源。本仓库中的 Python MCP 是参考实现,而非专有后端。

ABI(稳定契约)

abi/ 发布——带版本号、有文档、与实现无关:

文档

内容

abi/README.md

概述 + 一致性

abi/WHY.md

为什么存在(对比 RAG、保险库、厂商坟墓)

ROADMAP.md

参考实现路线图(非 ABI)

abi/LAYOUT.md

文件夹分类法

abi/KINDS.md

事实存放位置

abi/MCP.md

工具契约

abi/INJECTION.md

AGENTS / CLAUDE 绑定

abi/PLATFORM.md

Windows、符号链接、每台机器的路径

abi/INSTALL.md

同步、注入、scan.json、--help-json

abi/INGEST.md

编目 / 提取 / 提炼流水线

安装会将 abi/LAYOUT.md 复制到 ~/.agents/memory/LAYOUT.md。注入和 CLI 标志:abi/INSTALL.md。机器可读:python -m agent_memory --help-json

Related MCP server: mcp-chest-memory

参考实现(本仓库)

Python 代码位于 src/agent_memory/(从克隆目录执行 pip install -e .)。

组件

作用

agent_memory.mcp_server

MCP:搜索 / 添加 / 注册 / 清单 / 同步 / 摄取

agent_memory.store

布局引擎、分类法、注入

python -m agent_memory sync

规范 ~/.agents/AGENTS.md、绑定的 CLAUDE.md、主机注入

python -m agent_memory inventory

磁盘 vs PROJECTS.md(跳过 .agents.cursor

python -m agent_memory ingest

聊天编目 + 提取流水线

skills/memory-sync/

代理安装技能

模板仅存在于 git 中:examples/*.example.*。实际存储:~/.agents/memory。如果 markdown 泄漏到本克隆中,请运行 python -m agent_memory consolidate

编码代理: 安装请遵循 AGENTS.md

布局(摘要)

路径

内容

~/.agents/memory/USER.md

始终在线的身份

~/.agents/memory/PROJECTS.md

slug / 路径 / 角色 / 技术栈 / 状态

~/.agents/memory/concepts/

跨领域的类型化记忆(首次写入时创建)

~/.agents/memory/projects/<slug>/

指向真实目录树的链接(非副本)

<repo>/.agents/memory/

仅在使用时才有文件——暂存收件箱,写入时转为类型化路径

~/.agents/AGENTS.md

简短注入;CLAUDE.md 绑定到它

搜索联合用户 + 所有已注册的项目目录树。聊天正文保留在产品文件夹中;chats-index.md 仅包含标题和路径。

安装

pip 和 MCP 使用相同的解释器:

python -m pip install -e .
python -m agent_memory sync --init
python -m agent_memory inventory

填写 ~/.agents/memory/USER.mdscan.json(首次运行时从 examples/*.example.* 生成)。MCP 合并后重新加载你的 Agent。

Windows 符号链接存根和硬链接回退方案见 abi/PLATFORM.md

脚本

python -m agent_memory inventory
python -m agent_memory inventory --json
python -m agent_memory inventory --register SLUG "/path/to/repo" "role" "stack"
python -m agent_memory sync
python -m agent_memory --help-json
python -m agent_memory sync --help-json
python -m agent_memory inventory --help-json
python -m agent_memory ingest catalog

安装后,PATH 上的 agent-memorypython -m agent_memory 相同。

F
license - not found
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    A
    maintenance
    Local-first, file-based memory layer for AI agents — one shared Markdown vault across Claude, Codex, Gemini, Cursor and any MCP client. Provides read/write memory tools with an audit trail, per-agent trust levels, and Git sync; no cloud and no lock-in.
    2
    MIT
  • A
    license
    -
    quality
    B
    maintenance
    Provides a persistent, local-first memory for coding agents over MCP, enabling automatic recall and recording of past work, failures, and decisions to reduce repetition and token usage.
    MIT
  • A
    license
    -
    quality
    B
    maintenance
    Provides portable memory for AI agents using plain Markdown files. Enables storing, recalling, and managing memories via MCP tools like recall, remember, forget, list, and get.
    18
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • Shared, governed long-term memory for AI agents across tools and sessions via MCP and REST.

  • Your memory, everywhere AI goes. Build knowledge once, access it via MCP anywhere.

  • Shared long-term memory vault for AI agents with 20 MCP tools.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Lolaplex/agent-memory'

If you have feedback or need assistance with the MCP directory API, please join our Discord server