Agent Skills › rohitg00/agentmemory › agentmemory-rest-api

agentmemory-rest-api

GitHub

提供 agentmemory 的 HTTP REST API 接口文档,涵盖保存、检索等内存操作。用于 MCP 不可用时的备选通信,或集成不支持 MCP 的主机,包含认证配置与端点规范。

plugin/skills/agentmemory-rest-api/SKILL.md rohitg00/agentmemory

触发场景

需要调用 agentmemory REST API MCP 协议不可用时作为备选方案 集成不支持 MCP 的系统

安装

npx skills add rohitg00/agentmemory --skill agentmemory-rest-api -g -y
更多选项

非标准路径

npx skills add https://github.com/rohitg00/agentmemory/tree/main/plugin/skills/agentmemory-rest-api -g -y

不安装直接使用

npx skills use rohitg00/agentmemory@agentmemory-rest-api

指定 Agent (Claude Code)

npx skills add rohitg00/agentmemory --skill agentmemory-rest-api -a claude-code -g -y

安装 repo 全部 skill

npx skills add rohitg00/agentmemory --all -g -y

预览 repo 内 skill

npx skills add rohitg00/agentmemory --list

SKILL.md

Frontmatter
{
    "name": "agentmemory-rest-api",
    "description": "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 and you need a fallback, or when integrating a host that does not speak MCP.",
    "user-invocable": false
}

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/*.

Quick start

# liveness
curl -fsS http://localhost:3111/agentmemory/livez

# For this fixed loopback URL only. Do not print the value or enable shell tracing.
agentmemory_secret="${AGENTMEMORY_SECRET:-$(cat "$HOME/.agentmemory/secret")}"
test -n "$agentmemory_secret" || exit 1

# save
curl -fsS -X POST http://localhost:3111/agentmemory/remember \
  -H "Authorization: Bearer $agentmemory_secret" \
  -H "Content-Type: application/json" \
  -d '{"content":"chose JWT refresh rotation","concepts":["jwt-refresh-rotation"]}'

# recall
curl -fsS -X POST http://localhost:3111/agentmemory/smart-search \
  -H "Authorization: Bearer $agentmemory_secret" \
  -H "Content-Type: application/json" \
  -d '{"query":"auth token strategy","limit":5}'

Auth

Protected endpoints require bearer authentication by default, including localhost. Liveness is public. The example uses an explicit environment secret or the generated local secret file; if the daemon uses a secret from its .env, load that value locally without displaying it. For a remote daemon, require an explicit credential for that endpoint and HTTPS. Never forward a local-file secret or follow an authenticated redirect to another host. See TROUBLESHOOTING.md.

Conventions

  • Save returns 201, reads return 200, validation errors return 400.
  • Use documented fields only. A successful response does not prove an unsupported field was applied.
  • The port is configurable with --port or --instance; streams, viewer, and engine derive from it.

See also

  • agentmemory-mcp-tools for the MCP equivalents.
  • agentmemory-config for the port quartet and the secret.

Reference

The full endpoint list with methods lives in REFERENCE.md, generated from src/triggers/api.ts.

版本历史

  • e01540e 当前 2026-10-19 02:22

    强化插件与安全机制,新增 Bearer Token 认证要求,明确 localhost 默认需鉴权及远程 HTTPS 安全规范。

  • a8e7d19 2026-07-24 11:39

同 Skill 集合

plugin/skills/agentmemory-agents/SKILL.md
plugin/skills/agentmemory-architecture/SKILL.md
plugin/skills/agentmemory-config/SKILL.md
plugin/skills/agentmemory-hooks/SKILL.md
plugin/skills/agentmemory-mcp-tools/SKILL.md
plugin/skills/commit-context/SKILL.md
plugin/skills/commit-history/SKILL.md
plugin/skills/forget/SKILL.md
plugin/skills/handoff/SKILL.md
plugin/skills/lesson/SKILL.md
plugin/skills/memory-discipline/SKILL.md
plugin/skills/recall/SKILL.md
plugin/skills/recap/SKILL.md
plugin/skills/remember/SKILL.md
plugin/skills/session-history/SKILL.md
plugin/skills/write-agentmemory-skill/SKILL.md

元信息

文件数
0
版本
e01540e
Hash
04e0cd09
收录时间
2026-07-24 11:39

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-20 18:49
浙ICP备14020137号-1