Skip to content
Gryz Docs
API

Memory API reference

REST API for creating and listing Agent Memory records, mirroring the remember and list_memories MCP tools.

Updated · Reviewed by Jacob

Answer first

Agent Memory is primarily written and read over MCP (remember, recall, forget, list_memories). The REST routes under /api/memory are a same-origin fallback for the Gryz dashboard. They require a logged-in session (cookie auth), not a Bearer API key, and are gated by the agent_memory feature flag — denied callers get 404.

Base URL: https://www.gryz.ai

Plan limits

Every write (remember, POST /api/memory/, and JSONL import) is gated by two independent quotas — hitting either returns 403:

PlanTotal memories (personal + project)Distinct projects
Free501
Pro5003
Pro PlusUnlimitedUnlimited

Personal-scope and project-scope memories share the same total-count quota — it is not per-scope. The project-count quota is separate: it bounds how many distinct project_key values you can have active memories under, not how many memories exist within any one project.

POST /api/memory/

Create a single memory. Mirrors the remember MCP tool and runs the same gating, project-count quota, provenance, and trust classification through rememberMemory().

Body (JSON):

{
  "scope": "project",
  "project_key": "github.com/acme/app",
  "body": "The team deploys on Fridays.",
  "valid_from": "2026-09-01T00:00:00Z",
  "salience": 2
}
  • scope"personal" or "project" (required)
  • project_key — required when scope is "project", must be omitted for "personal"
  • body — the atomic fact, 1–4000 characters (required)
  • valid_from — ISO timestamp the fact became true (optional, defaults to now)
  • salience — importance weight 010 (optional, defaults to 1)

Responses:

  • 201{ "memory": { ... } } with the stored record and its provenance chain
  • 403 — cross-origin request, account tier cannot use memory, the total memory-count quota for the plan is exceeded (code: "memory_quota_exceeded"), or the project-count quota is exceeded (code: "project_quota_exceeded") — see Plan limits above
  • 404agent_memory flag not enabled for the caller
  • 422 — validation error

GET /api/memory/

List the authenticated user's memories with provenance summary and scope. Supports limit, offset, scope, and project_key query params.

Error shape

{
  "error": "Human-readable message",
  "code": "OPTIONAL_CODE"
}

For assistant-driven workflows, use the MCP memory tools instead — the REST routes are not exposed to API keys.

Was this page helpful?