mcpField
A
agentmemory-rest-api

agentmemory-rest-api

github.com/rohitg00Agent workflows30.0k11.0k installsUpdated today
Repository

About agentmemory-rest-api

A skill for using agentmemory’s REST API, its primary interface for memory operations. It documents local endpoints, authentication, and safe handling of credentials for agents and developers.

Key features

  1. 01HTTP endpoints for memory operations
  2. 02Bearer authentication guidance
  3. 03Configurable REST port
  4. 04Documented response conventions

Use cases

  1. 01Save or retrieve memories over HTTP
  2. 02Check daemon liveness
  3. 03Configure access to a remote daemon

MCP support

MCP is described as a bridge layered over the REST API; MCP equivalents are available in agentmemory-mcp-tools.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/rohitg00/agentmemory --skill agentmemory-rest-api

After installing, type/agentmemory-rest-apiin Claude Code to confirm it loaded.

Bundled filesREFERENCE.mdTROUBLESHOOTING.md

Details

From the project README

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 REST port defaults to 3111 and is configurable with --port or --instance. The viewer defaults to 3113; the internal engine WebSocket defaults to 49134.

See also

  • agentmemory-mcp-tools for the MCP equivalents.
  • agentmemory-config for local configuration and the secret.

Reference

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

Comments

Markdown supported