For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
PlaygroundDiscordStatusDashboardSign Up >
DocumentationSDK ReferenceGraphiti
DocumentationSDK ReferenceGraphiti
  • SDK Reference
      • GETGet Entity Types
      • PUTSet Entity Types
      • POSTAdd Data
      • POSTAdd Data in batch mode
      • POSTAdd Fact Triple
      • POSTClone graph
      • POSTSearch Graph
LogoLogo
PlaygroundDiscordStatusDashboardSign Up >
SDK ReferenceGraph

Add Fact Triple

POST
https://api.getzep.com/api/v2/graph/add-fact-triple
POST
/api/v2/graph/add-fact-triple
1from zep_cloud import Zep
2
3client = Zep(
4 api_key="YOUR_API_KEY",
5)
6client.graph.add_fact_triple(
7 fact="fact",
8 fact_name="fact_name",
9)
1{
2 "edge": {
3 "created_at": "string",
4 "fact": "string",
5 "name": "string",
6 "source_node_uuid": "string",
7 "target_node_uuid": "string",
8 "uuid": "string",
9 "attributes": {},
10 "episodes": [
11 "string"
12 ],
13 "expired_at": "string",
14 "invalid_at": "string",
15 "valid_at": "string"
16 },
17 "source_node": {
18 "created_at": "string",
19 "name": "string",
20 "summary": "string",
21 "uuid": "string",
22 "attributes": {},
23 "labels": [
24 "string"
25 ]
26 },
27 "target_node": {
28 "created_at": "string",
29 "name": "string",
30 "summary": "string",
31 "uuid": "string",
32 "attributes": {},
33 "labels": [
34 "string"
35 ]
36 }
37}
Add a fact triple for a user or group
Was this page helpful?
Previous

Clone graph

Next
Built with

Request

Triple to add
factstringRequired<=50 characters
The fact relating the two nodes that this edge represents
fact_namestringRequired1-50 characters

The name of the edge to add. Should be all caps using snake case (eg RELATES_TO)

target_node_namestringRequired<=50 characters
The name of the target node to add
created_atstringOptional
The timestamp of the message
expired_atstringOptional

The time (if any) at which the edge expires

fact_uuidstringOptional
The uuid of the edge to add
group_idstringOptional
invalid_atstringOptional

The time (if any) at which the fact stops being true

source_node_namestringOptional<=50 characters
The name of the source node to add
source_node_summarystringOptional<=500 characters
The summary of the source node to add
source_node_uuidstringOptional
The source node uuid
target_node_summarystringOptional<=500 characters
The summary of the target node to add
target_node_uuidstringOptional
The target node uuid
user_idstringOptional
valid_atstringOptional
The time at which the fact becomes true

Response

Resulting triple
edgeobject
source_nodeobject
target_nodeobject

Errors

400
Bad Request Error
500
Internal Server Error