Skip to main content

How turns map to memories

You do not edit individual extracted facts directly. Every memory in Priors is tied back to the turn (message or document piece) that produced it:
When you list memories with GET/v2/agents//memories, Priors returns the agent’s journaled turns (newest first) along with each turn’s learning state. When you forget a turn with DELETE/v2/agents//memories/, Priors deletes every memory made from that turn in one call. Both endpoints need a role that may see the agent’s memories: Org admin, Project admin, or Agent admin of that agent, or the creator of a private agent. See Roles and permissions.
  • With a service-account key, call without X-SP-End-User. An end user can only chat and teach.
  • A caller who reaches the agent without that role gets 403 forbidden. A caller who does not reach it gets 404 agent_not_found.

List memories (turns)

Send GET/v2/agents//memories. Narrow results with optional query filters:

Turn fields

Forget a turn’s memories

Send DELETE/v2/agents//memories/. Always URL-encode turn_id because an id can contain / or #.
Success: status 204 with no body.

What forgetting removes, and what stays

  • Removed: every memory extracted from that exact turn_id.
  • Stays (marked forgotten): the turn record remains in conversation history with state: "forgotten" so service restarts or resumes never re-learn it.
  • Stays (other turns): memories extracted from other turns are untouched. If the same fact was repeated in a second user message, or echoed in an agent reply that was learned (learn_reply: true), list the thread’s turns and forget those turns too.
Deleting a turn removes only the memories made from that turn. When removing sensitive data or correcting a mistake, inspect adjacent turns in the same thread (including agent replies) and forget any turn that restated the same fact.

Errors on DELETE /v2/agents/{agent_id}/memories/{turn_id}

Common workflows