Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add rohitg00/agentmemory --skill agentmemory-rest-api -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/agentmemory-rest-api/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/agentmemory-rest-api/

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

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set17

The whole set →
handoff Resumes the latest agent session for the current directory and surfaces any unanswered questions first. CX Codex +1 13,400installs agentmemory-agents Teaches host coding assistants how to link with the agentmemory server via connect adapters. Helps configure MCP bridges and fix agent config paths. CX Codex +1 11,000installs agentmemory-mcp-tools Index of every agentmemory MCP tool with its parameters and workflows. Helps agents pick the right memory tool and format valid arguments. CX Codex +1 10,900installs agentmemory-config This skill configures and diagnoses local agentmemory, covering MCP connections, environment variables, ports, and feature flags. Use it during setup or when a connection fails. CX Codex +1 10,900installs write-agentmemory-skill Sets structure and formatting rules for agentmemory skills. Use it when creating a new SKILL.md or reviewing an existing skill for consistency. CX Codex +1 10,700installs agentmemory-hooks A skill covering the agentmemory plugin hooks that record observations across a session, so routine work needs no memory_save call. CX Codex +1 10,800installs agentmemory-architecture A skill that walks through the agentmemory server: the iii engine, storage model, ports and viewer. Useful when you extend it or debug recall. CX Codex +1 10,700installs lesson Stores corrections and hard-won rules as confidence-weighted lessons, then recalls them before similar work. Useful when the same mistake keeps returning. CX Codex +1 3,900installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor