agent-memory
agent-memory
面向编码代理的本地 Markdown 记忆——任何提供商、任何工具皆可用。
没有共享布局时,每个厂商都拥有一座坟墓——会话存档永远无法成为持久身份,除非你重新教导每一个新代理。完整理由(对比 RAG、对比保险库、对比厂商记忆)见 abi/WHY.md。参考实现路线图:ROADMAP.md。
你的记忆存放在你拥有的文件夹中:~/.agents/memory(身份 + 项目地图)和 <repo>/.agents/memory(按项目的工作内容)。你的 Agent——或任何读取 markdown 和可选 MCP 的主机——使用相同的布局。
Markdown 是事实来源。本仓库中的 Python MCP 是参考实现,而非专有后端。
ABI(稳定契约)
随 abi/ 发布——带版本号、有文档、与实现无关:
文档 | 内容 |
概述 + 一致性 | |
为什么存在(对比 RAG、保险库、厂商坟墓) | |
参考实现路线图(非 ABI) | |
文件夹分类法 | |
事实存放位置 | |
工具契约 | |
AGENTS / CLAUDE 绑定 | |
Windows、符号链接、每台机器的路径 | |
同步、注入、scan.json、 | |
编目 / 提取 / 提炼流水线 |
安装会将 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 .)。
组件 | 作用 |
| MCP:搜索 / 添加 / 注册 / 清单 / 同步 / 摄取 |
| 布局引擎、分类法、注入 |
| 规范 |
| 磁盘 vs |
| 聊天编目 + 提取流水线 |
| 代理安装技能 |
模板仅存在于 git 中:examples/*.example.*。实际存储:~/.agents/memory。如果 markdown 泄漏到本克隆中,请运行 python -m agent_memory consolidate。
编码代理: 安装请遵循 AGENTS.md。
布局(摘要)
路径 | 内容 |
| 始终在线的身份 |
| slug / 路径 / 角色 / 技术栈 / 状态 |
| 跨领域的类型化记忆(首次写入时创建) |
| 指向真实目录树的链接(非副本) |
| 仅在使用时才有文件——暂存收件箱,写入时转为类型化路径 |
| 简短注入; |
搜索联合用户 + 所有已注册的项目目录树。聊天正文保留在产品文件夹中;chats-index.md 仅包含标题和路径。
安装
pip 和 MCP 使用相同的解释器:
python -m pip install -e .
python -m agent_memory sync --init
python -m agent_memory inventory填写 ~/.agents/memory/USER.md 和 scan.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-memory 与 python -m agent_memory 相同。
This server cannot be installed
Maintenance
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
- Alicense-qualityAmaintenanceLocal-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.2MIT
- Alicense-qualityBmaintenanceProvides 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
- AlicenseBqualityBmaintenanceLocal-first memory server for AI coding agents that stores work sessions, tasks, and durable memories in Markdown files, exposed through MCP tools for session management and memory retrieval.10151MIT
- Alicense-qualityBmaintenanceProvides 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.181MIT
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.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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