SmartMemory
POST
/memory/graph/resolve-aliases

Consolidate fragmented entity aliases for the workspace (CORE-GRAPH-ALIAS-RESOLVE-2 B2).

Merges each unambiguous single-token alias node (e.g. "Hudson") into its multi-token canonical ("Rock Hudson") over the COMPLETE workspace graph, abstaining on collisions ("Hudson" with both "Rock Hudson" and "Rochelle Hudson" present). Run after a bulk ingest, when the full ambiguity picture is present. Workspace-scoped (tenant isolation).

Parameters:

  • dry_run: If true, report the resolve/abstain plan without mutating the graph.
  • disambiguate: Opt-in (CORE-GRAPH-ALIAS-DISAMBIG-1, default false). Additionally recover colliding surfaces by structural typed-neighbor overlap — merge only on a confident, clear winner, else keep abstaining (never mis-merge). Extractor-dependent; helps LLM-extracted graphs.

Returns:

  • resolved: alias surfaces merged into a canonical (unambiguous + disambiguated)
  • abstained: single-token surfaces left untouched (>=2 canonical candidates)
  • redirected_edges: external edges moved onto canonicals
  • ambiguous: the abstained surfaces
  • disambiguated: collisions recovered by the opt-in disambiguation pass (0 unless disambiguate=true)
  • dry_run: echoes the request flag
  • plus scope context (workspace_id, user_id)

Query Parameters

dry_run?Dry Run
disambiguate?Disambiguate

Response Body

application/json

application/json

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