Skip to main content
Nowledge MemNowledge Mem

Get Entity Relationships

GET
/entities/{entity_id}/relationships

Get relationships for a specific entity.

Returns all connected entities and the memories where this entity is mentioned. Use depth to control how many hops to traverse.

Path Parameters

entity_id*Entity Id

Query Parameters

depth?Depth

Traversal depth for relationships

Range1 <= value <= 3
Default1
limit?Limit

Maximum relationships to return

Range1 <= value <= 200
Default50

Response Body

application/json

application/json

curl -X GET "https://example.com/entities/string/relationships"
{  "entity": {    "id": "string",    "name": "string",    "type": "string",    "description": "",    "aliases": [      "string"    ],    "confidence": 0,    "created_at": "string",    "updated_at": "string",    "community_id": 0  },  "relationships": {    "relates_to": [      {        "source_entity": {          "id": "string",          "name": "string",          "type": "string",          "description": "",          "aliases": [            "string"          ],          "confidence": 0,          "created_at": "string",          "updated_at": "string",          "community_id": 0        },        "target_entity": {          "id": "string",          "name": "string",          "type": "string",          "description": "",          "aliases": [            "string"          ],          "confidence": 0,          "created_at": "string",          "updated_at": "string",          "community_id": 0        },        "relationship": {          "type": "string",          "confidence": 0,          "strength": 0        },        "depth": 0      }    ],    "mentioned_in": [      {        "memory": {          "id": "string",          "title": "",          "content": ""        },        "confidence": 0,        "mention_count": 0      }    ],    "community": {      "community_id": 0,      "name": "string",      "summary": "string",      "member_count": 0    }  },  "metadata": {    "total_relates_to": 0,    "total_mentions": 0,    "traversal_depth": 0,    "limit": 0  }}