Knowledge Graph
The Knowledge Graph API exposes entities extracted from memories and the relationships between them. Use it to discover people, organizations, places, and concepts mentioned across memories — and to traverse how they connect to each other.
Graph endpoints require the hasKnowledgeGraph entitlement on your plan. All endpoints require memory.read.
Endpoint Overview
| Method | Path | Description |
|---|---|---|
GET | /v1/graph/entities | List all entities in the workspace |
GET | /v1/graph/entities/:id | Get full details of an entity |
GET | /v1/graph/entities/:id/relationships | Get outgoing and incoming relationships of an entity |
GET | /v1/graph/search | Semantic search for entities |
GET | /v1/graph/traverse | Multi-hop graph traversal from a starting entity |
POST | /v1/graph/query | Natural language query over the graph |
Entity Object
| Field | Type | Description |
|---|---|---|
id | string | UUID of the entity |
name | string | Canonical entity name |
type | string | Entity type: PERSON, ORGANIZATION, PLACE, THING |
description | string | null | Short description extracted from memories |
metadata | object | null | Additional structured metadata |
relationships_count | number | Total number of relationships |
related_memories_count | number | Number of memories referencing this entity |
created_at | string | ISO 8601 creation timestamp |
updated_at | string | ISO 8601 last-update timestamp |
List Entities
/v1/graph/entitiesList all entities in the workspace, paginated
| Parameter | Type | Description |
|---|---|---|
user_id | string | Filter entities linked to a specific user |
type | string | Filter by entity type: `PERSON`, `ORGANIZATION`, `PLACE`, or `THING` |
page | number | Page number, starting at 1 (default: 1) |
page_size | number | Results per page, max 100 (default: 20) |
Get Entity
/v1/graph/entities/:idGet full details of a single entity
Returns 404 ENTITY_NOT_FOUND if the entity does not exist or belongs to another workspace.
Get Entity Relationships
/v1/graph/entities/:id/relationshipsGet all relationships of an entity, grouped into outgoing and incoming
The weight field (0.0–1.0) represents the strength of the relationship as extracted from memories.
Search Entities
/v1/graph/searchSemantic search for entities by natural language query
| Parameter | Type | Description |
|---|---|---|
queryrequired | string | Natural language search query (max 500 chars) |
user_id | string | Filter results by user ID |
type | string | Filter by entity type: `PERSON`, `ORGANIZATION`, `PLACE`, or `THING` |
limit | number | Maximum results to return, max 50 (default: 10) |
The score field (0.0–1.0) indicates semantic similarity to the query.
Traverse Graph
/v1/graph/traverseWalk relationships outward from a starting entity up to 3 hops
| Parameter | Type | Description |
|---|---|---|
fromrequired | string (UUID) | UUID of the starting entity |
depth | number | Number of hops to traverse: 1–3 (default: 2) |
relationship_type | string | Filter traversal to a specific relationship type (e.g., `WORKS_AT`) |
entity_type | string | Filter traversal to a specific entity type (e.g., `PERSON`) |
limit | number | Maximum number of edges to return, max 100 (default: 50) |
Returns 404 ENTITY_NOT_FOUND if the starting entity does not exist or belongs to another workspace.
Natural Language Query
/v1/graph/queryAnswer a natural language question using the knowledge graph
| Parameter | Type | Description |
|---|---|---|
queryrequired | string | Natural language question to answer (max 1000 chars) |
user_id | string | Scope the query to a specific user's graph context |
limit | number | Maximum number of entities to consider, max 20 (default: 10) |
The confidence field (0.0–1.0) reflects how well the graph data supports the answer. Low confidence answers may be based on limited or indirect relationships.