SmartMemory
POST
/memory/clustering/run

Run entity clustering/deduplication for the workspace.

This operation identifies and merges duplicate entities based on vector similarity. All operations are workspace-scoped to ensure tenant isolation.

Parameters:

  • distance_threshold: Similarity threshold (0.0-1.0, default 0.1)
  • dry_run: If true, preview clusters without merging

Returns:

  • merged_count: Number of entities merged
  • clusters_found: Number of clusters identified
  • total_entities: Total entities processed
  • execution_time: Time taken in seconds
  • clusters: Cluster details (only if dry_run=True)

Query Parameters

distance_threshold?Distance Threshold
dry_run?Dry Run

Response Body

application/json

application/json

curl -X POST "https://example.com/memory/clustering/run"
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}