API Overview
Base URL: https://api.memlayer.dev
All responses are JSON. All request bodies use Content-Type: application/json.
Endpoints
Section titled “Endpoints”| Method | Path | Description |
|---|---|---|
| GET | /health | Health check |
| POST | /api/v1/retain | Ingest content, extract memories |
| GET | /api/v1/recall | Semantic search |
| POST | /api/v1/reflect | Consolidate memories |
| POST | /api/v1/forget | Delete entity |
| POST | /api/v1/ingest | Bulk memory ingestion |
| GET | /api/v1/memories | List memories |
| GET | /api/v1/memories/:id | Get single memory |
| DELETE | /api/v1/memories/:id | Delete memory |
| GET | /api/v1/memories/:id/children | Get child memories |
| GET | /api/v1/memories/:id/relationships | Get relationships |
| GET | /api/v1/memories/:id/layer/:layer | Layer traversal |
| POST | /api/v1/relationships/batch | Batch fetch relationships |
| GET | /api/v1/entities/:entity_id/history | Temporal history |
| GET | /api/v1/debug/state | Debug state |
| POST | /api/v1/admin/reset | Reset database (dev/test only) |
Memory Object
Section titled “Memory Object”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}| Field | Type | Description |
|---|---|---|
id | UUID | Unique memory identifier |
entity_id | string | Groups memory versions |
content | string | The stored knowledge |
layer | int (0-3) | Semantic layer |
parent_id | UUID or null | Parent in the hierarchy |
importance | float (0-1) | How important this memory is |
access_count | int | Times accessed |
last_accessed | ISO 8601 or null | Last access time |
system_time | ISO 8601 | When recorded (transaction time) |
source | string or null | Origin identifier |
valid_from | ISO 8601 | When this became true |
valid_to | ISO 8601 or null | When this stopped being true (null = current) |
See Memories for detailed endpoint documentation.