agentmemory-architecture
GitHubAgentMemory 是面向编码代理的本地内存服务器,基于 iii 引擎构建。它通过混合检索(BM25+向量)存储和提取记忆,提供 REST/MCP 接口及实时 Web 查看器,支持记忆的生命周期管理。
触发场景
安装
npx skills add rohitg00/agentmemory --skill agentmemory-architecture -g -y
SKILL.md
Frontmatter
{
"name": "agentmemory-architecture",
"description": "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.",
"user-invocable": false
}
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.
版本历史
-
c6c476d
当前 2026-11-02 19:01
升级至 iii 0.25.0 引擎;引入 Worker Compose 进行进程编排与部署;移除旧的 Docker/配置文件生命周期;新增 SSE 实时流更新查看器;重构状态报告并清理未使用的队列 worker。
-
e01540e
2026-10-19 02:22
更新检索模型描述,明确默认安装无需 API key 且嵌入运行在本地;调整 LLM 提供商配置说明,强调摘要和自动注入为可选功能。
- a8e7d19 2026-07-24 11:38


