Skip to main content

Graph API

POST /v1/users/:user_id/graph/edges

Create a graph edge between two memory objects.

Request

POST /v1/users/user_123/graph/edges
Authorization: Bearer <token>
Content-Type: application/json

{
"source_id": "11111111-1111-1111-1111-111111111111",
"target_id": "22222222-2222-2222-2222-222222222222",
"relation": "RelatedTo",
"weight": 0.8
}

Fields

FieldTypeRequiredDescription
source_idUUIDYesSource memory or task node
target_idUUIDYesTarget memory or task node
relationstringYesRelation type
weightnumberNoOptional edge weight

Response

{
"status": "accepted"
}

Supported Relation Types

Next, RelatedTo, Contradicts, Supports, Abstracts, DerivedFrom, CausedBy, EvolvedTo, IsSubTaskOf, Blocks, Accomplishes