Skip to content
Navigation

Clear all memories for a user+agent pair or a shared namespace

Permanently delete all memory data for one scope.

User-initiated deletion is a HARD delete: edges, entity nodes, and episodic content are removed from both the graph database and the search overlay — nothing is retained. (System-side fact invalidation remains a soft expired_at; that history powers contradiction resolution and is not user data retention.) The user path also invalidates the context cache for the pair.

graph_id empties a shared namespace instead, service tokens only; the response scope field names what was cleared.

POST
https://truememory-api.mvstg.com/memories/{agent_id}/clear
View as Markdown

Authorization

  • HTTPBearerHTTPrequired

Path parameters

  • agent_idstringrequired

Query parameters

  • graph_idoptional

    Optional. Clear a shared namespace instead of the user's own memory. Requires a service token; the agent_id path segment is ignored.

    One of the following:

    • string
    • null

Header parameters

  • X-On-Behalf-Ofoptional

    One of the following:

    • string
    • null
  • X-External-User-Idoptional

    One of the following:

    • string
    • null
  • X-App-Idoptional

    One of the following:

    • string
    • null

Returns

200

Successful Response

JSON
  • scopeuserorgraphrequired
  • deleted_countintegerrequired
  • expired_countintegerrequired

    Same as deleted_count; kept for older clients.

  • statusoptionalstring
    default: "cleared"
  • graph_idoptional

    Present only when scope is graph.

    One of the following:

    • string
    • null

422

Validation Error
JSON
  • detailoptionalarray ofobject
    • locarray ofrequired

      One of the following:

      • string
      • integer
    • msgstringrequired
    • typestringrequired
    • inputoptionalunknown
    • ctxoptionalobject

Type to search…

↑↓ navigate↵ selectEsc close