pingx.aiAPI docs Markdown

Contact memory API

Inspect and correct what AI agents remember about contacts: facts, todos and suppressions.

Inspect and correct what the AI agents (personas) remember about contacts: facts, todos, do-not-learn suppressions and the episodes they came from. Memory is per (contact, persona).

  • Base path: /memory/v1/; Connect/gRPC pingx.memory.v1.MemoryService.
  • Auth: Authorization: Bearer <key>; memory:read for List/Get, memory:write for everything else (memory = both). The org comes from the key only; another org's contact is "not found".
  • Writes are applied synchronously. If the memory backend is briefly unavailable you get UNAVAILABLE (503); it is safe to retry.
RPCRESTScope
ListContactActivityGET /memory/v1/contacts?search=&includeTest=&pageSize=&pageToken=read
GetContactMemoryGET /memory/v1/contacts/{contactId}/memory?agentId=read
GetFactProvenanceGET /memory/v1/contacts/{contactId}/personas/{agentId}/facts/{factId}/provenanceread
ListRecentMessagesGET /memory/v1/contacts/{contactId}/messages?pageSize=read
ListTestContactsGET /memory/v1/test-contactsread
CreateTestContactPOST /memory/v1/test-contactswrite
ForgetFactPOST .../personas/{agentId}/facts/{factId}:forgetwrite
AmendFactPOST .../personas/{agentId}/facts/{factId}:amendwrite
RenewFactPOST .../personas/{agentId}/facts/{factId}:renewwrite
CloseTodoPOST .../personas/{agentId}/todos/{todoId}:closewrite
ReopenTodoPOST .../personas/{agentId}/todos/{todoId}:reopenwrite
LiftSuppressionPOST .../personas/{agentId}/suppressions:liftwrite
ForgetAllForPersonaPOST .../personas/{agentId}/memory:forgetAllwrite, destructive
ClearForPersonaPOST .../personas/{agentId}/memory:clearwrite, destructive
EraseSubjectPOST /memory/v1/contacts/{contactId}:erasewrite, destructive

(... = /memory/v1/contacts/{contactId}.)

#Irreversible operations

ForgetAllForPersona (soft-deletes every active fact of one persona; no bulk undo), ClearForPersona (hard-deletes one persona's facts, todos, rules and episodes) and EraseSubject (right to be forgotten, all personas, writes an erasure marker) cannot be undone through the API. Each requires "confirm": true in the body, otherwise INVALID_ARGUMENT and nothing is sent to the backend.

#Notes

  • Write ids (agentId, factId, todoId) must be > 0; AmendFact.factValue, CloseTodo.evidence and LiftSuppression.factKey are required; RenewFact.expiresAt must be RFC 3339.
  • Pagination: ListContactActivity returns nextPageToken (opaque); ListRecentMessages is the N most recent (pageSize, default 50, max 200), not paginated.
  • Results of writes: affected rows; 0 means nothing matched.