agentmemory-rest-api — скилл для Claude Code: HTTP-доступ к памяти
Описывает REST-поверхность сервера agentmemory: сохранение и поиск воспоминаний по HTTP. Нужен, когда MCP недоступен или хост его не понимает.
npx skills add rohitg00/agentmemory --skill agentmemory-rest-api -a claude-codeЧто делает agentmemory-rest-api
REST — основной протокол agentmemory, а MCP работает поверх него. Каждая операция с памятью живёт на своём эндпоинте под http://localhost:3111/agentmemory/*: remember сохраняет запись, smart-search ищет по запросу, livez отвечает на проверку живости.
Защищённые эндпоинты требуют bearer-токена даже на localhost, публичен только livez. Секрет берут из переменной окружения AGENTMEMORY_SECRET или из файла $HOME/.agentmemory/secret. Для удалённого демона нужен отдельный ключ под этот эндпоинт и HTTPS: локальный секрет туда передавать нельзя, как и следовать за аутентифицированным редиректом на другой хост.
Порт меняется флагами --port или --instance, от него зависят потоки, вьюер и движок. Сохранение возвращает 201, чтение — 200, ошибка валидации — 400. Полный список эндпоинтов с методами лежит в REFERENCE.md, он сгенерирован из src/triggers/api.ts.
Какие задачи решает
- сохранить решение по архитектуре в память агента
- найти прошлые заметки по поисковому запросу
- подключить память к хосту, который не умеет MCP
- проверить, что демон agentmemory отвечает
- вызвать память напрямую из скрипта на curl
Примеры запросов агенту
- Сохрани в память agentmemory, что мы выбрали ротацию JWT refresh-токенов
- Найди в agentmemory последние заметки про стратегию auth-токенов, лимит 5
- Проверь через REST, что демон agentmemory жив
Как установить agentmemory-rest-api
1Через Skills CLI (Vercel)
npx skills add rohitg00/agentmemory --skill agentmemory-rest-api -a claude-code2Вручную: положить файлы
~/.claude/skills/agentmemory-rest-api/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/agentmemory-rest-api/
1Через Skills CLI (Vercel)
npx skills add rohitg00/agentmemory --skill agentmemory-rest-api -a codex2Вручную: положить файлы
.agents/skills/agentmemory-rest-api/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add rohitg00/agentmemory --skill agentmemory-rest-api -a cursor2Вручную: положить файлы
.cursor/skills/agentmemory-rest-api/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install rohitg00/agentmemory agentmemory-rest-api2Вручную: положить файлы
.github/skills/agentmemory-rest-api/SKILL.md1Через Skills CLI (Vercel)
npx skills add rohitg00/agentmemory --skill agentmemory-rest-api -a gemini-cli2Командой платформы
gemini skills install https://github.com/rohitg00/agentmemory --path plugin/skills/agentmemory-rest-apiВручную: положить файлы
.devin/skills/agentmemory-rest-api/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add rohitg00/agentmemory --skill agentmemory-rest-api -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Из того же набора15
Весь набор →Похожие
Рядом в теме «Настройка агента: память, контекст, субагенты»
Всё по теме «Настройка агента: память, контекст, субагенты» →Вопросы о agentmemory-rest-api
Как установить agentmemory-rest-api в Claude Code?
Выполните npx skills add rohitg00/agentmemory --skill agentmemory-rest-api -a claude-code. Скилл появится в ~/.claude/skills/agentmemory-rest-api/SKILL.md.
Что делает agentmemory-rest-api?
Описывает HTTP-эндпоинты сервера agentmemory под http://localhost:3111/agentmemory/* и порядок работы с ними: сохранение, поиск, проверка живости. Пригодится как запасной путь, когда MCP недоступен.
Нужен ли ключ для запросов к agentmemory?
Да. Защищённые эндпоинты требуют bearer-токена даже на localhost, открыт только livez. Секрет берут из AGENTMEMORY_SECRET или из файла $HOME/.agentmemory/secret.
Исходный текст
SKILL.md · Apache-2.0
---
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
```bash
# 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](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`.
© rohitg00 · Apache-2.0 · rohitg00/agentmemory