Skip to main content

Get Core Memories

Fetches the "core" memories stored for a given user. Unlike the general retrieval endpoints, this strictly returns memories that have been classified as foundational or highly persistent ("type": "core").

HTTP Request

GET /get_core/{user_id}

Path Parameters

ParameterTypeRequiredDescription
user_idstringYesThe unique identifier (userId) of the user whose core memories you want to retrieve.

Response

Success Response

  • Status Code: 200 OK
  • Content-Type: application/json

Returns a JSON array consisting solely of core memory objects.

Memory Object Structure:

FieldTypeDescription
memory_textstringThe text content of the stored memory.
typestringThe classification of the memory. For this endpoint, it will always be "core".
memory_idstringThe unique identifier for this specific memory entry.
userIdstringThe user ID associated with this memory.

Example Response:

[
{
"memory_text": "User's name is Mario.",
"type": "core",
"memory_id": "654c4ca6-1079-11f1-bd71-00155d0d397d",
"userId": "5a9b4183-a19c-4a43-961f-1a6b36fce63c"
}
]

Error Responses

If the request fails, the API returns a standard HTTP status code along with a brief error message.

Status CodeMessageReason
400 Bad RequestBad RequestThe {user_id} parameter was missing or could not be parsed from the URL path.
500 Internal Server ErrorOops something went wrong! Please try again later!The server encountered an internal error while fetching the core memories from the database.