Skip to main content
Returns every memory stored for a user and agent pair, newest first. Unlike semantic search, this endpoint applies no relevance scoring — it is a raw, ordered listing. Use it to build memory browsers in your dashboard, audit what an agent knows about a user, export data for GDPR requests, or debug why a particular memory is or isn’t appearing in search results.

Request

Headers

NameRequiredDescription
X-API-KeyYesYour MemLayer API key (ml_live_xxx)

Query Parameters

user_id
string
required
Return memories belonging to this user. Must exactly match the value used when storing.
agent_id
string
required
Return memories associated with this agent. Must exactly match the value used when storing.
memory_type
string
Optional filter. One of episodic, semantic, or summary. Omit to return all types.
limit
integer
default:"20"
Number of memories to return per page. Range: 1–100.
offset
integer
default:"0"
Number of memories to skip before returning results. Use with limit to paginate through large memory sets.
# First page
curl "https://memlayer.online/memories?\
user_id=user_123&agent_id=support_bot&limit=20&offset=0" \
  -H "X-API-Key: ml_live_xxx"

# Second page
curl "https://memlayer.online/memories?\
user_id=user_123&agent_id=support_bot&limit=20&offset=20" \
  -H "X-API-Key: ml_live_xxx"

# Filter by type
curl "https://memlayer.online/memories?\
user_id=user_123&agent_id=support_bot&memory_type=semantic" \
  -H "X-API-Key: ml_live_xxx"

Response

Success — 200

memories
MemoryOut[]
Array of memory objects for this page, ordered by created_at descending. score and score_detail are always null in list responses — they are only populated by the search endpoint.
total
integer
Total count of memories matching the query (across all pages), not just the current page. Use this to calculate the number of pages: ceil(total / limit).
limit
integer
The limit value applied to this request.
offset
integer
The offset value applied to this request.
{
  "memories": [
    {
      "id":          "775263ee-73af-4416-9804-1f274048ae08",
      "content":     "User prefers concise bullet points over long paragraphs",
      "user_id":     "user_123",
      "agent_id":    "support_bot",
      "memory_type": "semantic",
      "importance":  0.8,
      "metadata":    {},
      "score":       null,
      "score_detail": null,
      "created_at":    "2026-06-01T10:00:00Z",
      "last_accessed": "2026-06-07T09:00:00Z",
      "expires_at":    null
    }
  ],
  "total":  47,
  "limit":  20,
  "offset": 0
}

Errors

CodeMeaning
401Invalid or missing X-API-Key
403Account suspended
422Validation error — check parameter types and constraints