Connections API
Base URL: http://localhost:4545/api/v1
Connections are the typed edges in Remem’s relationship graph. Auto-discovery creates
related_to edges automatically whenever a memory is stored (comparing the new
embedding against existing memories, above auto_discovery_threshold). Use this API
to create, list, traverse, and delete connections explicitly, with any of the 8
supported relationship types.
All endpoints below require auth once REMEM_API_KEY is set — see
Authentication.
Create connection
Section titled “Create connection”POST /connections{ "source_id": "mem_abc", "target_id": "mem_def", "relationship_type": "caused_by", "strength": 0.8}| Field | Type | Default | Notes |
|---|---|---|---|
source_id | UUID | required | |
target_id | UUID | required | |
relationship_type | string | related_to | one of related_to, caused_by, part_of, references, contradicts, supports, similar_to, derived_from |
strength | float 0–1 | none |
Response: 200 OK
{ "source_id": "mem_abc", "connection": { "target_id": "mem_def", "relationship_type": "caused_by", "strength": 0.8, "created_at": "2026-07-01T12:00:00Z" }}List connections
Section titled “List connections”GET /connections?limit=50&offset=0limit defaults to 50, max 500. offset defaults to 0.
Response: 200 OK
{ "connections": [ { "source_id": "mem_abc", "connection": { "target_id": "mem_def", "relationship_type": "caused_by", "strength": 0.8, "created_at": "2026-07-01T12:00:00Z" } } ], "total": 1, "limit": 50, "offset": 0}Traverse connections from a memory
Section titled “Traverse connections from a memory”GET /memories/{id}/related?depth=1&relationship_types=&limit=20Walks the connection graph outward from a given memory.
| Query param | Default | Notes |
|---|---|---|
depth | 1 | max 5 |
limit | 20 | max 100 |
relationship_types | none | comma-separated filter, e.g. caused_by,supports |
Response: 200 OK
{ "memory_id": "mem_abc", "related": [ { "memory": { "id": "mem_def", "content": "..." }, "connection": { "target_id": "mem_def", "relationship_type": "caused_by", "strength": 0.8, "created_at": "2026-07-01T12:00:00Z" } } ]}curl "http://localhost:4545/api/v1/memories/mem_abc/related?depth=2" \ -H "Authorization: Bearer $REMEM_API_KEY"Delete connection
Section titled “Delete connection”DELETE /connections/{source_id}/{target_id}Response: 200 OK, or 404 Not Found if the connection doesn’t exist.
