Entity graph
Entities, relations, shortest paths, and neighborhood traversal.
Memory writes extract entities and relations into a graph alongside the
rows. Four read-only endpoints query it. All take user_id as an optional
query param (defaults to the resolved identity).
GET /api/v1/graph/entities
Search entities by name and/or type. Query params: user_id, name,
entity_type, limit (default 20).
Response: { "entities": […], "count": N }.
GET /api/v1/graph/relations
All relations touching one entity. Query params: entity (required),
user_id, include_memory_text (default false — set true to include the
text of the memories behind each relation).
GET /api/v1/graph/path
Shortest path between two entities. Query params: from and to
(required), user_id, max_depth (default 5, hard-capped at 10).
GET /api/v1/graph/traverse
Breadth-first neighborhood around an entity. Query params: entity
(required), user_id, depth (default 2, hard-capped at 5), limit
(default 50).