Skip to content

/agentmemory-rest-api

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.

From plugin
agentmemory
30k17 skills2 commands1 MCP

Claude Code

$ npx -y skills add rohitg00/agentmemory --skill agentmemory-rest-api --agent claude-code

SKILL.md

agentmemory-rest-api.SKILL.md
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

Every endpoint except liveness requires `Authorization: Bearer <secret>`, including on localhost. The server always has a secret: `AGENTMEMORY_SECRET` when you set one, otherwise one it generates at first start. Requests without the header get `401`. 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 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`.

Read more
@rohitg00
Ships withagentmemory

#1 Persistent memory for AI coding agents based on real-world benchmarks

Stars on GitHub

Momentum

stars in total
30.2k
Star history of rohitg00/agentmemory on GitHub, a chart by star-history.com

Other skills on agentmemory.

agentmemory-agents
Auto-invoked

agentmemory-agents

How agentmemory wires into host coding agents via the connect command. Use when installing agentmemory into a specific agent,…

agentmemory-architecture
Auto-invoked

agentmemory-architectu…

How agentmemory is built, the iii engine primitives it runs on, its storage model, ports, and the viewer. Use when reasoning…

agentmemory-config
Auto-invoked

agentmemory-config

Set up and diagnose local agentmemory, including MCP, environment variables, ports, and feature flags. Use when getting started,…

agentmemory-hooks
Auto-invoked

agentmemory-hooks

The agentmemory plugin hooks that capture observations automatically across the agent session lifecycle. Use when explaining how…

agentmemory-mcp-tools
Auto-invoked

agentmemory-mcp-tools

Map of every agentmemory MCP tool, what each does, and its parameters. Use when choosing which memory tool to call, when a tool…

commit-context
Auto-invoked

commit-context

Trace a file, function, or line back to the agent session that produced its current commit. Use when the user asks "why is this…

More skills from other plugins.

context-loader
Auto-invoked

context-loader

Search memories from earlier Pi sessions in this repository. Use it when earlier work may already explain the code, error,…

mem05d69k
@mem0ai@mem0aiInstall Skill
analyzing-ai-citations

analyzing-ai-citations

Answer AI citation and answer engine optimization (AEO) questions in PostHog: whether AI answer engines (ChatGPT, Claude, and an…

posthog11d41k
@posthog@posthogInstall Skill

Questions about agentmemory-rest-api.

Which coding agents can use agentmemory-rest-api?
agentmemory-rest-api installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.