Skip to navigation

Add hyperedge

Creates one hyperedge: a fact that relates more than two nodes, written onto one member edge per node pair. The member edges must span at least three distinct nodes, since two nodes are a pair of edges rather than a hyperedge; a single pair uses graph.edge.add. Zep assigns the hyperedge identifier and every member edge identifier at accept time, and the members become readable when the task completes.

Authentication

AuthorizationApi-Key

Type "Api-Key" followed by a space and the project API key.

Path parameters

graph_uuidstringRequired
Graph UUID

Request

Request body
edgeslist of objectsRequired
The member edges to create. Each pair becomes one edge carrying the shared fact.
factstringRequired

The natural-language fact, written onto every member edge.

attributesmap from strings to anyOptional
Additional attributes to store on every member edge.
expired_atstringOptional
The time at which the fact was superseded or invalidated.
invalid_atstringOptional
The time at which the fact stopped being true.
metadatamap from strings to anyOptional
Metadata attached to the episode created for this hyperedge.
valid_atstringOptional
The time at which the fact became true.

Response

Accepted
hyperedgeobjectOptional

An accept-time acknowledgement of the hyperedge you submitted.

taskobjectOptional
The asynchronous task that tracks writing the member edges.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error