Skip to main content
GET /openapi/memorylake/api/v2/projects/{id}/memories/{memoryId}/trace
Returns the full change history of a memory — all versions it has gone through and the original conversation messages that triggered each change.

Path Parameters

id
string
required
Project ID
memoryId
string
required
Memory ID to trace
curl -X GET 'https://app.memorylake.ai/openapi/memorylake/api/v2/projects/proj-a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6/memories/mem-123/trace' \
  -H 'Authorization: Bearer sk_xxxxxx'

Response

data
object
{
  "success": true,
  "data": {
    "memory_id": "mem-123",
    "current_memory": "User prefers Hangzhou cuisine restaurants",
    "trace": [
      {
        "history_id": "19135a2d-2cc6-45db-bfc7-959d8fc117b2",
        "event_type": "ADD",
        "new_memory": "User prefers Hangzhou cuisine restaurants",
        "expired": false,
        "changed_at": "2024-01-15T10:00:00Z",
        "event_id": "batch-637d4f2ded6243feb926e5cf15f69b97",
        "source_messages": [
          {
            "role": "user",
            "content": "What restaurants do you recommend in Hangzhou?",
            "timestamp": 1705312800
          },
          {
            "role": "assistant",
            "content": "I recommend trying Grandma's Kitchen for Hangzhou cuisine.",
            "timestamp": 1705312800
          }
        ]
      }
    ]
  }
}