Skip to main content
GET
/
api
/
graph
Get graph
curl --request GET \
  --url https://api.example.com/api/graph
{
  "nodes": [
    {}
  ],
  "edges": [
    {}
  ]
}

Query parameters

limit
integer
default:"10"
Maximum number of nodes/edges to return.
session_id
integer
Filter by session. Omit to return all sessions.
agent_type
string
Filter by agent type. Omit to return all agent types.

Response

nodes
GraphNodeResponse[]
Array of graph nodes.
edges
GraphEdgeResponse[]
Array of graph edges.

GraphNodeResponse

FieldTypeDescription
idu64Node identifier
labelStringNode label
node_typeStringType: "Event", "Goal", "Action", "Context", etc.
created_atu64Creation timestamp
propertiesJSONNode properties (any JSON object)

GraphEdgeResponse

FieldTypeDescription
idu64Edge identifier
fromu64Source node ID
tou64Target node ID
edge_typeStringType: "CausedBy", "PartOf", "LeadsTo", etc.
weightf32Edge weight (0.01.0)
confidencef32Confidence in the edge (0.01.0)
{
  "nodes": [
    {
      "id": 1,
      "label": "user_message",
      "node_type": "Event",
      "created_at": 1738425600000000000,
      "properties": { "message_type": "user_message" }
    }
  ],
  "edges": [
    {
      "id": 1,
      "from": 1,
      "to": 2,
      "edge_type": "LeadsTo",
      "weight": 0.95,
      "confidence": 0.9
    }
  ]
}