SmartMemory
DELETE
/memory/agents/{agent_id}

Delete (deactivate) an agent.

This also revokes all API keys associated with the agent.

Path Parameters

agent_id*Agent Id

Response Body

application/json

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

Dedup Entities

Dedup cross-extractor fragmented entity nodes for the workspace (CORE-GRAPH-CANONICAL-DEDUP-1). Collapses same-name entity-node fragments (the same entity split across >1 node because two extractors disagreed on its type -> divergent canonical_key -> the write-time dedup missed them) into one node, precision-first. Unblocks ensemble alias disambiguation — a fragmented canonical makes `resolve_aliases(disambiguate=true)` abstain. Workspace-scoped (tenant isolation). Opt-in, default-off. Recommended ensemble sequence: dedup-entities then resolve-aliases?disambiguate=true. **Parameters:** - `dry_run`: If true, report the dedup plan without mutating the graph. - `require_structural_confirmation`: If true (default), a same-name pair merges only on T0 (same Wikidata QID), T1 (same canonical_key), or T2 (>= tau_min shared typed entity-neighbors). If false, exact same-name clusters merge on name alone once T0/T1 fail (riskier disjoint-edge-tail recovery). **Returns:** - `merged_clusters`: same-name fragment (sub-)clusters collapsed into one node - `merged_nodes`: total fragment nodes merged away - `redirected_edges`: external edges moved onto survivors (0 when dry_run) - `abstained_clusters`: clusters left untouched (no confident identity tier — the disjoint-edge tail) - `dry_run`: echoes the request flag - plus scope context (`workspace_id`, `user_id`)

Delete Graph Node

Delete an entity node and all its edges from the graph. Uses DETACH DELETE to remove the node and every relationship attached to it. For memory nodes prefer DELETE /memory/{id} which also handles MongoDB cleanup.