agentmemory-rest-api — Claude Code skill: HTTP access to agent memory
Documents the REST surface of the agentmemory server: saving and searching memories over HTTP. Useful when MCP is unavailable or your host does not speak it.
npx skills add rohitg00/agentmemory --skill agentmemory-rest-api -a claude-codeWhat agentmemory-rest-api does
REST is agentmemory's primary protocol, and MCP is a bridge on top of it. Every memory operation has an endpoint under http://localhost:3111/agentmemory/*: remember writes an entry, smart-search looks one up, livez answers a liveness check.
Protected endpoints need bearer auth by default, localhost included. Only liveness is public. The secret comes from AGENTMEMORY_SECRET or from the generated file $HOME/.agentmemory/secret. For a remote daemon you need a credential tied to that endpoint plus HTTPS; a local-file secret must not be forwarded, and an authenticated redirect to another host must not be followed.
The port is configurable with --port or --instance, and streams, viewer and engine derive from it. Saves return 201, reads return 200, validation errors return 400. The full endpoint list with methods lives in REFERENCE.md, generated from src/triggers/api.ts.
What it helps with
- store an architecture decision in agent memory
- look up earlier notes by search query
- wire memory into a host that does not speak MCP
- check that the agentmemory daemon is up
- call memory directly from a curl script
Example prompts for the agent
- Save to agentmemory that we chose JWT refresh rotation
- Search agentmemory for recent notes on auth token strategy, limit 5
- Check over REST that the agentmemory daemon is alive
How to install agentmemory-rest-api
1Skills CLI (Vercel)
npx skills add rohitg00/agentmemory --skill agentmemory-rest-api -a claude-code2Manually: put the files in place
~/.claude/skills/agentmemory-rest-api/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/agentmemory-rest-api/
1Skills CLI (Vercel)
npx skills add rohitg00/agentmemory --skill agentmemory-rest-api -a codex2Manually: put the files in place
.agents/skills/agentmemory-rest-api/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add rohitg00/agentmemory --skill agentmemory-rest-api -a cursor2Manually: put the files in place
.cursor/skills/agentmemory-rest-api/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install rohitg00/agentmemory agentmemory-rest-api2Manually: put the files in place
.github/skills/agentmemory-rest-api/SKILL.md1Skills CLI (Vercel)
npx skills add rohitg00/agentmemory --skill agentmemory-rest-api -a gemini-cli2Platform CLI
gemini skills install https://github.com/rohitg00/agentmemory --path plugin/skills/agentmemory-rest-apiManually: put the files in place
.devin/skills/agentmemory-rest-api/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add rohitg00/agentmemory --skill agentmemory-rest-api -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about agentmemory-rest-api
How do I install agentmemory-rest-api in Claude Code?
Run npx skills add rohitg00/agentmemory --skill agentmemory-rest-api -a claude-code. The skill lands in ~/.claude/skills/agentmemory-rest-api/SKILL.md.
What does agentmemory-rest-api do?
It documents the agentmemory server's HTTP endpoints under http://localhost:3111/agentmemory/* and how to use them: save, search, liveness. Handy as a fallback when MCP is unavailable.
Does agentmemory need a key for requests?
Yes. Protected endpoints require bearer auth even on localhost; only livez is public. The secret comes from AGENTMEMORY_SECRET or the file $HOME/.agentmemory/secret.
Source text
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