Skip to main content

GET /memory/

Retrieve a single memory by its unique identifier. This endpoint is useful for fetching detailed information about a specific memory.

Path Parameters

memory_id
string
required
The unique identifier of the memory to retrieve.

Response

success
boolean
Indicates whether the request was successful.
memory
object
The memory object with all its details.

Example Request

curl http://localhost:8000/memory/mem_abc123

Example Response

{
  "success": true,
  "memory": {
    "id": "mem_abc123",
    "memory": "User prefers TypeScript over JavaScript for new projects",
    "user_id": "user_123",
    "metadata": {
      "memory_type": "LONG_TERM",
      "source": "conversation",
      "confidence": "high"
    },
    "hash": "a1b2c3d4e5f6",
    "created_at": "2025-03-01T10:00:00Z",
    "updated_at": "2025-03-01T10:00:00Z"
  }
}

Error Response

If the memory ID doesn’t exist:
{
  "detail": "Memory not found"
}

Use Cases

Memory Details

Display detailed information about a specific memory in the UI.

Verify Updates

Confirm that a memory was updated correctly after an edit operation.

Context Validation

Verify memory exists before performing operations that depend on it.

Audit Trail

Retrieve specific memories for debugging or audit purposes.
Source: backend/main.py:308-317

Build docs developers (and LLMs) love