Skip to content

API Overview

Base URL: https://api.memlayer.dev

All responses are JSON. All request bodies use Content-Type: application/json.

MethodPathDescription
GET/healthHealth check
POST/api/v1/retainIngest content, extract memories
GET/api/v1/recallSemantic search
POST/api/v1/reflectConsolidate memories
POST/api/v1/forgetDelete entity
POST/api/v1/ingestBulk memory ingestion
GET/api/v1/memoriesList memories
GET/api/v1/memories/:idGet single memory
DELETE/api/v1/memories/:idDelete memory
GET/api/v1/memories/:id/childrenGet child memories
GET/api/v1/memories/:id/relationshipsGet relationships
GET/api/v1/memories/:id/layer/:layerLayer traversal
POST/api/v1/relationships/batchBatch fetch relationships
GET/api/v1/entities/:entity_id/historyTemporal history
GET/api/v1/debug/stateDebug state
POST/api/v1/admin/resetReset database (dev/test only)

All endpoints that return memories use this shape:

{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"entity_id": "user-haskell-preference",
"content": "User prefers Haskell for type-safe programming",
"layer": 2,
"parent_id": null,
"importance": 0.75,
"access_count": 3,
"last_accessed": "2025-01-15T12:00:00Z",
"system_time": "2025-01-15T10:30:00Z",
"source": "conversation",
"valid_from": "2025-01-15T10:30:00Z",
"valid_to": null
}
FieldTypeDescription
idUUIDUnique memory identifier
entity_idstringGroups memory versions
contentstringThe stored knowledge
layerint (0-3)Semantic layer
parent_idUUID or nullParent in the hierarchy
importancefloat (0-1)How important this memory is
access_countintTimes accessed
last_accessedISO 8601 or nullLast access time
system_timeISO 8601When recorded (transaction time)
sourcestring or nullOrigin identifier
valid_fromISO 8601When this became true
valid_toISO 8601 or nullWhen this stopped being true (null = current)

See Memories for detailed endpoint documentation.