GET /v1/memory

Auth: tenant — _Status:_ stable

List the scratchpad memory entries for the authenticated tenant. These are the per-agent surfaces written via the agent's /mem write slash command, plus the optional shared pipeline scratchpad. Rows come from the agent_scratchpad table in tenants.db (filesystem memory/t<tid>/*.md is legacy fallback only when the DB bridge is unwired).

For the structured graph (typed nodes + directed edges), see GET /v1/memory/entries instead.

Request

No path / query / body params.

curl -H "Authorization: Bearer atr_…" \
  http://arbiter.example.com/v1/memory

Response

200 OK

{
  "tenant_id": 1,
  "count": 2,
  "entries": [
    {
      "kind": "agent",
      "agent_id": "550e8400-e29b-41d4-a716-446655440000",
      "size": 1247
    },
    {
      "kind": "shared",
      "agent_id": "",
      "size": 320
    }
  ]
}
FieldTypeDescription
kindstring"shared" for the pipeline scratchpad (scope_key=""), "agent" for per-agent memory.
agent_idstringEmpty for shared; otherwise the agent's id.
sizeintegerBytes.

The endpoint returns an empty list — not a 404 — when the tenant has never triggered a memory write.

Failure modes

StatusWhenBody
401Missing / invalid bearer; tenant disabled.{"error": "..."}
503Memory not configured on the server.{"error": "memory not configured on this server"}

See also