SmartMemory
POST
/memory/graph/edges

Read all edges between a set of nodes in a single query.

Accepts a list of node IDs (max 5000) and returns every directed edge where both endpoints are in the list, scoped to the caller's workspace. Replaces N per-node GET /{item_id}/links calls with one round-trip.

Query Parameters

include_properties?Include Properties

Include edge properties

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/memory/graph/edges" \  -H "Content-Type: application/json" \  -d '{    "node_ids": [      "string"    ]  }'
{
  "edges": [
    {
      "source_id": "string",
      "target_id": "string",
      "edge_type": "string",
      "properties": {},
      "canonical_type": "string",
      "plausibility_score": 0
    }
  ],
  "count": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}