The agentmemory HTTP REST API surface, the primary protocol for talking to the memory server. Use when calling agentmemory over HTTP, when MCP is unavailable an
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-agentmemory-rest-api-8e04604abbcb ,按照其中的说明把「agentmemory-rest-api」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
REST is agentmemory's primary surface. MCP is a bridge on top of it. Every memory operation has an HTTP endpoint under http://localhost:3111/agentmemory/*.
# liveness
curl -fsS http://localhost:3111/agentmemory/livez
# save
curl -X POST http://localhost:3111/agentmemory/remember \
-H "Content-Type: application/json" \
-d '{"content":"chose JWT refresh rotation","concepts":["jwt-refresh-rotation"]}'
# recall
curl -X POST http://localhost:3111/agentmemory/smart-search \
-H "Content-Type: application/json" \
-d '{"query":"auth token strategy","limit":5}'
By default localhost is open and no auth is needed. When AGENTMEMORY_SECRET is set, every request needs Authorization: Bearer $AGENTMEMORY_SECRET. See agentmemory-config.
201, reads return 200, validation errors return 400.--port or --instance; streams, viewer, and engine derive from it.The full endpoint list with methods lives in REFERENCE.md, generated from src/triggers/api.ts.