agentmemory-architecture
它能做什么
这项技能说明 agentmemory 服务器的构建方式,以及它如何存储和检索记忆。在你扩展或排查问题之前,理解这个系统会很有帮助。
适用场景
- ✓当你想了解 agentmemory 如何存储和检索记忆时。
- ✓当你计划为记忆服务器扩展新功能时。
- ✓当你需要向别人解释记忆系统如何工作时。
技能链接
https://github.com/rohitg00/agentmemory/blob/main/plugin/skills/agentmemory-architecture/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请解释 agentmemory 如何存储并找到我的记忆,从一条笔记被保存的那一刻,到它被回忆起来的过程。”
每周 5 个新技能,1 分钟读完。
工作原理
服务器在本地运行,记录观察内容,并为混合搜索建立索引,这种搜索结合了关键词匹配和向量匹配。记忆会与其会话一同保存,并经历记录、压缩、整合和遗忘的生命周期。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
agentmemory is a memory server for coding agents. It runs locally, captures observations, indexes them for hybrid retrieval, and serves them back over REST and MCP. Worker Compose runs the pinned iii engine with AgentMemory and the registry state and http workers. The state worker uses a file-backed KV store by default, with Redis available by configuration; it is not SQLite.
iii primitives
Everything is a function, a trigger, or worker state on the iii engine. There is no separate plugin system; the worker registers functions (mem::*) and HTTP triggers (api::*) and the engine routes calls. agentmemory does not bypass iii; new capability is a new function plus a trigger.
Retrieval model
Recall combines BM25 keyword search with configured vector similarity and graph expansion. A clean installation without an embedding provider uses BM25 without an API key. Set EMBEDDING_PROVIDER=local to enable on-device embeddings, which may download a model, or configure a remote provider. LLM compression and summaries require a configured provider and their relevant options.
Storage and lifecycle
Memories carry content, concepts, files, importance, and timestamps, grouped into sessions and optionally linked to commits. A lifecycle of capture, compress, consolidate, and forget keeps the store useful over time rather than letting it grow unbounded.
Ports
REST defaults to port 3111, the viewer to 3113, and the internal engine WebSocket to 49134. Use --port <N> or --instance <N> to select another local runtime.
Viewer
A real-time web viewer at http://localhost:3113 shows memory building as sessions run, with authenticated SSE updates over the REST port. Useful for demos and for confirming capture is working.
See also
- agentmemory-mcp-tools and agentmemory-rest-api for the surfaces.
- agentmemory-hooks for automatic capture.
- agentmemory-config for ports and feature flags.
常见问题
搜索需要 API 密钥吗?
不需要。全新安装使用关键词搜索,不需要嵌入服务商或 API 密钥。
记忆保存在哪里?
默认的状态存储是基于文件的,也可以配置为使用 Redis。它不是 SQLite。
它使用哪些端口?
REST 和查看器各自使用自己的本地端口,默认值列在文档中。
详情
作者的原始描述
How agentmemory is built, the iii engine primitives it runs on, its storage model, ports, and the viewer. Use when reasoning about how memory is stored or retrieved end to end, when extending the system, or when answering how agentmemory works under the hood.
repo: rohitg00/agentmemory
热度
- GitHub 星标
- 30k
- 排名
- #9340
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agentmemory-agents
30k帮你的智能体把 agentmemory 记忆服务器连接到 Claude Code、Cursor 和 Codex 等编程工具。
agentmemory-config
30k帮你的智能体设置并检查 agentmemory 记忆服务器,包括端口、配置和功能开关。
agentmemory-hooks
30k帮你的智能体自动从编程会话中记录有用的笔记,而不需要你逐条手动保存。
agentmemory-mcp-tools
30k帮你的智能体选择合适的 agentmemory 工具,用于保存、搜索和管理记忆。