How turns become memories, how to list an agent’s turns with filters, and how to forget specific turns in v2.
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:
Turn (a user message, an agent reply, or one piece of a file) └── Memories (one or more dated facts extracted from that turn)
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 withoutX-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.
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}
Status
code
Cause
What to do
403
forbidden
Caller reaches the agent, but its role cannot see or delete memories, or the call sent X-SP-End-User.
Use a key with the Project admin role or Agent admin of this agent, without X-SP-End-User.
404
agent_not_found
Caller does not reach the agent, or the agent does not exist.
Check agent_id and which project your key belongs to.
404
not_found
No turn matches turn_id.
Check the id and URL encoding.
409
conflict
The turn is a document piece (file_piece: true), is still learning, or multiple turns share the same id.
For a file piece, call DELETE/v2/agents//files/ instead. For a turn still learning, wait and retry.
409
agent_not_ready
Agent is still initializing.
Poll until status is ready.
Common workflows
Forget a whole thread: list turns with GET/v2/agents//memories?thread_id=, page until next_cursor is null, and forget each non-file turn (works before or after deleting the thread).
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"SapientPriors API","description":"Memory agents your product calls from its own backend.","colors":{"primary":"#9a6b42","light":"#cfa06e","dark":"#7a5233"},"logo":{"light":"https://mintcdn.com/sapient-priors/-tITydu-TdVT8-GJ/logo/light.svg?fit=max\u0026auto=format\u0026n=-tITydu-TdVT8-GJ\u0026q=85\u0026s=9db37e90eb18803314b2e860625d33ef","dark":"https://mintcdn.com/sapient-priors/-tITydu-TdVT8-GJ/logo/dark.svg?fit=max\u0026auto=format\u0026n=-tITydu-TdVT8-GJ\u0026q=85\u0026s=f2ffd2171388c2362d805f78da8f03b4","href":"https://sapientpriors.com"},"favicon":"https://mintcdn.com/sapient-priors/-tITydu-TdVT8-GJ/favicon.svg?fit=max\u0026auto=format\u0026n=-tITydu-TdVT8-GJ\u0026q=85\u0026s=449843599313141ba2e50a3278c997dc","api":{"playground":{"display":"simple"},"examples":{"defaults":"required","languages":["curl","python","javascript"]}},"appearance":{"default":"light","strict":false},"background":{"color":{"light":"#f2f0ea","dark":"#141310"}},"navbar":{"links":[{"icon":"download","href":"https://www.sapientpriors.com/docs/openapi.yaml","label":"Download API spec"},{"href":"/llms.txt","label":"llms.txt"}]},"footer":{"socials":{"website":"https://sapientpriors.com"}},"contextual":{"options":["copy","view","download-spec","chatgpt","claude","cursor"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"sapient-priors","hasAudioNarration":false,"actualSubdomain":"sapient-priors","customDomains":["www.sapientpriors.com"],"gitSource":{"type":"github","owner":"sapientpriors-inc","repo":"sapientpriors","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":"","_id":"6b11002f9ffae5051c41d88a"},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6b125a8e1a90a9e5dc849ef3","clientVersion":"0.0.4448","searchFilterCounts":[{"language":"default","tag":"API reference","count":60},{"language":"default","tag":"Guides","count":50},{"language":"default","tag":"How to use","count":34},{"language":"default","tag":"Start here","count":8},{"language":"default","tag":"Walkthroughs","count":7},{"language":"default","tag":"How Priors works","count":6},{"language":"default","tag":"Agents","count":6},{"language":"default","tag":"Teach","count":5},{"language":"default","tag":"Set up","count":5},{"language":"default","tag":"Files","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":":root{--sp-ink: rgba(20, 22, 26, 0.92);--sp-ink-muted: rgba(33, 30, 24, 0.62);--sp-accent: #84512e;--sp-accent-tint: rgba(132, 81, 46, 0.085);--sp-accent-tint-strong: rgba(132, 81, 46, 0.14);--sp-accent-border: rgba(132, 81, 46, 0.28);--sp-accent-border-hover: rgba(132, 81, 46, 0.45);--sp-accent-fg: #ffffff;--sp-surface: rgba(255, 255, 255, 0.76);--sp-surface-hover: rgba(255, 255, 255, 0.92);--sp-surface-subtle: rgba(33, 30, 24, 0.032);--sp-code-tint: rgba(33, 30, 24, 0.055);--sp-border: rgba(33, 30, 24, 0.12);--sp-border-strong: rgba(33, 30, 24, 0.28);--sp-shadow: 0 1px 6px rgba(33, 30, 24, 0.04);--sp-warn-bg: rgba(180, 96, 28, 0.075);--sp-warn-border: rgba(180, 96, 28, 0.30);--sp-get-bg: rgba(15, 118, 110, 0.12);--sp-get-fg: #0f766e;--sp-post-bg: rgba(29, 78, 216, 0.11);--sp-post-fg: #1d4ed8;--sp-patch-bg: rgba(180, 83, 9, 0.13);--sp-patch-fg: #b45309;--sp-delete-bg: rgba(190, 18, 60, 0.11);--sp-delete-fg: #be123c}html.dark{--sp-ink: rgba(242, 239, 232, 0.94);--sp-ink-muted: rgba(236, 231, 220, 0.62);--sp-accent: #cfa06e;--sp-accent-tint: rgba(207, 160, 110, 0.11);--sp-accent-tint-strong: rgba(207, 160, 110, 0.17);--sp-accent-border: rgba(207, 160, 110, 0.32);--sp-accent-border-hover: rgba(207, 160, 110, 0.48);--sp-accent-fg: #141310;--sp-surface: rgba(255, 255, 255, 0.032);--sp-surface-hover: rgba(255, 255, 255, 0.055);--sp-surface-subtle: rgba(255, 255, 255, 0.04);--sp-code-tint: rgba(236, 231, 220, 0.085);--sp-border: rgba(236, 231, 220, 0.12);--sp-border-strong: rgba(236, 231, 220, 0.26);--sp-shadow: none;--sp-warn-bg: rgba(217, 119, 6, 0.10);--sp-warn-border: rgba(217, 119, 6, 0.32);--sp-get-bg: rgba(45, 212, 191, 0.15);--sp-get-fg: #5eead4;--sp-post-bg: rgba(96, 165, 250, 0.16);--sp-post-fg: #93c5fd;--sp-patch-bg: rgba(251, 191, 36, 0.15);--sp-patch-fg: #fcd34d;--sp-delete-bg: rgba(251, 113, 133, 0.16);--sp-delete-fg: #fda4af}.nav-logo{height:2.35rem!important;width:auto!important}.prose,.mdx-content,.api-section{hyphens:none!important;-webkit-hyphens:none!important}:not(pre)>code{background:var(--sp-code-tint);border:0;border-radius:4px;padding:0.1em 0.38em;font-size:0.86em;font-weight:500;white-space:nowrap}.code-block [data-component-part=\"scroll-area-viewport\"],.code-group [data-component-part=\"scroll-area-viewport\"]{overflow-x:hidden!important}.code-block [data-component-part=\"scroll-area-content\"],.code-group [data-component-part=\"scroll-area-content\"]{display:block!important;min-width:0!important;width:auto!important}.code-block pre.shiki,.code-block pre.shiki code,.code-block pre.shiki code .line,.code-group pre.shiki,.code-group pre.shiki code,.code-group pre.shiki code .line{white-space:pre-wrap!important;width:auto!important;min-width:0!important;max-width:100%!important;overflow-wrap:anywhere!important;word-break:break-word!important}.code-block .code-block-fade-overlay,.code-group .code-block-fade-overlay{display:none!important}.code-block{margin-top:1.15rem;margin-bottom:1.35rem;border-radius:12px!important;border:1px solid var(--sp-border)!important;box-shadow:var(--sp-shadow)}html:not(.dark) .code-block,html:not(.dark) .code-block .code-block-background{background:var(--sp-surface)!important}.code-group{background:var(--sp-surface-subtle)!important;border:1px solid var(--sp-border)!important;border-radius:12px!important;box-shadow:var(--sp-shadow)}html:not(.dark) .code-group .code-block-background{background:var(--sp-surface)!important}div:has(>[aria-label=\"Scrollable table\"]){width:100%!important;max-width:100%!important;margin-left:0!important;margin-right:0!important;padding-top:0!important;padding-bottom:0!important}[aria-label=\"Scrollable table\"]{margin:0!important;border-radius:12px!important;border:1px solid var(--sp-border)!important;background:var(--sp-surface)!important;box-shadow:var(--sp-shadow);overflow-x:auto!important;overflow-y:hidden!important}[aria-label=\"Scrollable table\"] [data-component-part=\"scroll-area-content\"]{min-width:0!important;max-width:100%!important;width:100%!important;display:block!important}[aria-label=\"Scrollable table\"] [data-component-part=\"scroll-area-content\"]>div{padding-left:0!important;padding-right:0!important;display:block!important;width:100%!important;max-width:100%!important}table{width:100%!important;max-width:100%!important;table-layout:auto;border-collapse:collapse;margin:0!important}table thead{background:var(--sp-surface-subtle)}table th{font-size:0.72rem;letter-spacing:0.055em;text-transform:uppercase;color:var(--sp-ink-muted);font-weight:600;padding:0.64rem 0.72rem;vertical-align:bottom;text-align:left;border-bottom:1px solid var(--sp-border);white-space:normal}table th:first-child,table td:first-child{padding-left:0.95rem}table th:last-child,table td:last-child{padding-right:0.95rem}table th code{background:transparent!important;padding:0!important;font-size:0.78rem!important;font-weight:600;letter-spacing:0.01em;text-transform:none;color:var(--sp-ink-muted)}table thead th{border-bottom:1px solid var(--sp-border)}table td{min-width:0!important;padding:0.72rem 0.72rem;vertical-align:top;line-height:1.54;border-bottom:1px solid var(--sp-border);white-space:normal;overflow-wrap:break-word}table tbody tr:last-child td{border-bottom:0}table td:first-child>strong:only-child{white-space:nowrap}table tbody tr:hover td{background:var(--sp-accent-tint)}hr{border-color:var(--sp-border)}table td:first-child{white-space:normal}table td code{white-space:normal;overflow-wrap:anywhere}table td .sp-ep{white-space:nowrap;flex-wrap:nowrap;max-width:none;padding:0.08rem 0.36rem 0.08rem 0.14rem;gap:0.28rem}table td .sp-ep>code{white-space:nowrap;overflow-wrap:normal;font-size:0.75em!important}.mdx-content h2{margin-top:2.5rem;margin-bottom:0.85rem;padding-top:1.25rem;border-top:1px solid var(--sp-border);letter-spacing:-0.015em}.mdx-content h2:first-child{margin-top:1rem;padding-top:0;border-top:0}.mdx-content h3{margin-top:1.75rem;margin-bottom:0.55rem;letter-spacing:-0.01em}.mdx-content p{line-height:1.7}.mdx-content ul,.mdx-content ol{margin-top:0.6rem;margin-bottom:1.1rem}.mdx-content li{line-height:1.65;margin-top:0.32rem;margin-bottom:0.32rem}[data-callout-type]{border-radius:10px;margin-top:1.15rem;margin-bottom:1.35rem}[data-callout-type=\"warning\"]{background:var(--sp-warn-bg);border-color:var(--sp-warn-border)}[data-callout-type=\"note\"],[data-callout-type=\"info\"]{background:var(--sp-accent-tint);border-color:var(--sp-accent-border)}.card{background:var(--sp-surface)!important;border-color:var(--sp-border)!important;box-shadow:var(--sp-shadow);transition:border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease}.card:hover{background:var(--sp-surface-hover)!important;border-color:var(--sp-accent-border-hover)!important}.sp-tree{margin:1.3rem 0 1.65rem;border-radius:12px;border:1px solid var(--sp-border);background:var(--sp-surface);overflow:hidden;box-shadow:var(--sp-shadow)}.sp-tree-body{padding:1rem 1.15rem 1.1rem}.sp-tree-children{position:relative;margin-left:0.72rem;padding-left:1.25rem;margin-top:0.2rem}.sp-tree-node{position:relative;padding:0.18rem 0}.sp-tree-children>.sp-tree-node::before{content:\"\";position:absolute;left:-1.25rem;top:-0.2rem;bottom:-0.2rem;width:1.5px;background:var(--sp-accent-border)}.sp-tree-children>.sp-tree-node:last-child::before{bottom:auto;height:1.34rem}.sp-tree-children>.sp-tree-node::after{content:\"\";position:absolute;left:-1.25rem;top:1.12rem;width:0.92rem;height:1.5px;background:var(--sp-accent-border)}.sp-tree-row{display:flex;align-items:center;gap:0.65rem;padding:0.42rem 0.68rem;border-radius:8px}.sp-tree-row.sp-boundary{background:var(--sp-accent-tint);border:1px solid var(--sp-accent-border);padding:0.5rem 0.75rem}.sp-tree-left{display:inline-flex;align-items:center;gap:0.48rem;flex-shrink:0}.sp-tree-dot{width:7px;height:7px;border-radius:999px;background:var(--sp-border-strong);flex-shrink:0}.sp-tree-row.sp-boundary .sp-tree-dot{background:var(--sp-accent);box-shadow:0 0 0 3px var(--sp-accent-tint-strong)}.sp-tree-name{font-weight:600;font-size:0.9rem;color:var(--sp-ink)}.sp-tree-pill{font-size:0.62rem;font-weight:700;letter-spacing:0.07em;text-transform:uppercase;padding:0.15rem 0.5rem;border-radius:999px;background:var(--sp-accent);color:var(--sp-accent-fg)}.sp-tree-leader{flex:1 1 0.75rem;min-width:0.5rem;border-bottom:1px dotted var(--sp-border);transform:translateY(1px)}.sp-tree-desc{font-size:0.81rem;color:var(--sp-ink-muted);text-align:right;flex-shrink:1}@media (max-width: 640px){.sp-tree-row{flex-wrap:wrap;gap:0.2rem}.sp-tree-leader{display:none}.sp-tree-desc{width:100%;text-align:left;padding-left:0.95rem}}.sp-scenario-ref{display:none}body:has(.sp-scenario-ref) #header .eyebrow{height:auto!important;display:inline-flex;align-items:center;gap:0.6rem;margin-bottom:0.7rem;font-size:0.7rem;font-weight:600;letter-spacing:0.07em;text-transform:uppercase;color:var(--sp-ink-muted)}body:has(.sp-scenario-ref) #header .eyebrow::before{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;font-size:1.55rem;font-weight:700;line-height:1;letter-spacing:-0.02em;text-transform:none;padding:0.28rem 0.62rem;border-radius:8px;background:var(--sp-accent-tint);border:1px solid var(--sp-accent-border);color:var(--sp-accent)}body:has([data-scenario=\"A1\"]) #header .eyebrow::before{content:\"A1\"}body:has([data-scenario=\"A2\"]) #header .eyebrow::before{content:\"A2\"}body:has([data-scenario=\"A3\"]) #header .eyebrow::before{content:\"A3\"}body:has([data-scenario=\"A4\"]) #header .eyebrow::before{content:\"A4\"}body:has([data-scenario=\"A5\"]) #header .eyebrow::before{content:\"A5\"}body:has([data-scenario=\"B1\"]) #header .eyebrow::before{content:\"B1\"}body:has([data-scenario=\"B2\"]) #header .eyebrow::before{content:\"B2\"}body:has([data-scenario=\"B3\"]) #header .eyebrow::before{content:\"B3\"}body:has([data-scenario=\"B4\"]) #header .eyebrow::before{content:\"B4\"}body:has([data-scenario=\"B5\"]) #header .eyebrow::before{content:\"B5\"}body:has([data-scenario=\"C1\"]) #header .eyebrow::before{content:\"C1\"}body:has([data-scenario=\"C2\"]) #header .eyebrow::before{content:\"C2\"}body:has([data-scenario=\"C3\"]) #header .eyebrow::before{content:\"C3\"}body:has([data-scenario=\"C4\"]) #header .eyebrow::before{content:\"C4\"}body:has([data-scenario=\"D1\"]) #header .eyebrow::before{content:\"D1\"}body:has([data-scenario=\"D2\"]) #header .eyebrow::before{content:\"D2\"}body:has(.sp-scenario-ref) #header #page-title{font-size:1.9rem;line-height:1.22}.sp-ep{display:inline-flex;align-items:center;gap:0.42rem;padding:0.14rem 0.5rem 0.14rem 0.2rem;border-radius:6px;background:var(--sp-surface);border:1px solid var(--sp-border);vertical-align:baseline;line-height:1.35;white-space:nowrap;text-decoration:none!important;transition:border-color 140ms ease, background-color 140ms ease}a.sp-ep:hover{border-color:var(--sp-accent-border-hover);background:var(--sp-accent-tint)}.sp-ep>code{background:transparent!important;padding:0!important;font-size:0.84em!important;color:var(--sp-ink)}.sp-ep-stack{display:flex;flex-direction:column;align-items:flex-start;gap:0.35rem}.sp-param{color:var(--sp-accent);font-weight:600}.sp-m{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;font-size:0.69rem;font-weight:700;letter-spacing:0.04em;padding:0.1rem 0.38rem;border-radius:4px;text-transform:uppercase}.sp-get{background:var(--sp-get-bg);color:var(--sp-get-fg)}.sp-post{background:var(--sp-post-bg);color:var(--sp-post-fg)}.sp-patch{background:var(--sp-patch-bg);color:var(--sp-patch-fg)}.sp-delete{background:var(--sp-delete-bg);color:var(--sp-delete-fg)}div:has(>.group>.method-pill){background:var(--sp-surface)!important;border-color:var(--sp-border)!important;border-radius:11px!important;box-shadow:var(--sp-shadow)}div:has(>.group>.method-pill) .group{flex-wrap:wrap;row-gap:0.25rem}div:has(>.group>.method-pill) [data-component-part=\"scroll-area-viewport\"]{overflow:visible!important}div:has(>.group>.method-pill) [data-component-part=\"scroll-area-content\"]>div{flex-wrap:wrap;row-gap:0.2rem}div:has(>.group>.method-pill) [data-component-part=\"scroll-area-content\"] div[class*=\"border-2\"]{color:var(--sp-accent)!important;background:var(--sp-accent-tint)!important;border-color:var(--sp-accent-border)!important;border-width:1px!important}.api-section{margin-top:2rem;padding-top:1.35rem;border-top:1px solid var(--sp-border)}.primitive-param-field,.object-param-field,.array-param-field{border-bottom-color:var(--sp-border)!important}.api-section-heading-title{letter-spacing:-0.015em}.param-head{gap:0.4rem;align-items:center}.api-section div:has(>select[aria-label=\"Select schema type\"]){background:var(--sp-surface);border:1px solid var(--sp-border-strong);border-radius:8px;padding:0.3rem 0.65rem;font-weight:600;color:var(--sp-ink);box-shadow:var(--sp-shadow);transition:border-color 140ms ease, background-color 140ms ease}.api-section div:has(>select[aria-label=\"Select schema type\"]):hover{border-color:var(--sp-accent-border-hover);background:var(--sp-accent-tint)}.api-section div:has(>select[aria-label=\"Select schema type\"])>span{font-weight:600!important;color:var(--sp-ink)!important}.sp-scenario-list{display:flex;flex-direction:column;margin:0.9rem 0 1.65rem;border-radius:12px;border:1px solid var(--sp-border);background:var(--sp-surface);overflow:hidden;box-shadow:var(--sp-shadow)}.sp-scenario-item{display:flex;align-items:center;gap:0.95rem;padding:0.82rem 1.05rem;text-decoration:none!important;border-bottom:1px solid var(--sp-border);transition:background-color 140ms ease}.sp-scenario-item:last-child{border-bottom:0}.sp-scenario-item:hover{background:var(--sp-accent-tint)}.sp-scenario-badge{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;font-size:0.78rem;font-weight:700;letter-spacing:-0.01em;width:2.3rem;height:1.85rem;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:7px;background:var(--sp-accent-tint);border:1px solid var(--sp-accent-border);color:var(--sp-accent);transition:background-color 140ms ease, border-color 140ms ease}.sp-scenario-item:hover .sp-scenario-badge{background:var(--sp-accent-tint-strong);border-color:var(--sp-accent-border-hover)}.sp-scenario-body{display:flex;flex-direction:column;gap:0.14rem;min-width:0;flex:1}.sp-scenario-title{font-size:0.94rem;font-weight:600;line-height:1.35;color:var(--sp-ink)}.sp-scenario-desc{font-size:0.84rem;line-height:1.45;color:var(--sp-ink-muted)}.sp-scenario-arrow{font-size:0.95rem;color:var(--sp-ink-muted);flex-shrink:0;transition:transform 140ms ease, color 140ms ease}.sp-scenario-item:hover .sp-scenario-arrow{color:var(--sp-accent);transform:translateX(3px)}"}]}
{"page":{"pagePath":"concepts/memories","slug":"/concepts/memories","pageMetadata":{"title":"Memories","description":"How turns become memories, how to list an agent's turns with filters, and how to forget specific turns in v2.","href":"/concepts/memories"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"How turns become memories, how to list an agent’s turns with filters, and how to forget specific turns in v2.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`how-turns-map-to-memories`,children:`How turns map to memories`}),`\n`,_jsxs(_components.p,{children:[`You do not edit individual extracted facts directly. Every memory in Priors is tied back to the `,_jsx(_components.strong,{children:`turn`}),` (message or document piece) that produced it:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Turn (a user message, an agent reply, or one piece of a file)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` └── Memories (one or more dated facts extracted from that turn)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`When you list memories with `,_jsxs(_components.a,{className:`sp-ep`,href:`/api-reference/v2/memories/list-memories`,children:[_jsx(`span`,{className:`sp-m sp-get`,children:`GET`}),_jsxs(`code`,{children:[`/v2/agents/`,_jsx(`span`,{className:`sp-param`,children:`{agent_id}`}),`/memories`]})]}),`, Priors returns the agent’s journaled turns (newest first) along with each turn’s learning `,_jsx(_components.code,{children:`state`}),`. When you forget a turn with `,_jsxs(_components.a,{className:`sp-ep`,href:`/api-reference/v2/memories/forget-a-memory`,children:[_jsx(`span`,{className:`sp-m sp-delete`,children:`DELETE`}),_jsxs(`code`,{children:[`/v2/agents/`,_jsx(`span`,{className:`sp-param`,children:`{agent_id}`}),`/memories/`,_jsx(`span`,{className:`sp-param`,children:`{turn_id}`})]})]}),`, Priors deletes every memory made from that turn in one call.`]}),`\n`,_jsxs(_components.p,{children:[`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 `,_jsx(_components.a,{href:`/access/roles`,children:`Roles and permissions`}),`.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`With a service-account key, call `,_jsx(_components.strong,{children:`without`}),` `,_jsx(_components.code,{children:`X-SP-End-User`}),`. An end user can only chat and teach.`]}),`\n`,_jsxs(_components.li,{children:[`A caller who reaches the agent without that role gets `,_jsx(_components.code,{children:`403 forbidden`}),`. A caller who does not reach it gets `,_jsx(_components.code,{children:`404 agent_not_found`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`list-memories-turns`,children:`List memories (turns)`}),`\n`,_jsxs(_components.p,{children:[`Send `,_jsxs(_components.a,{className:`sp-ep`,href:`/api-reference/v2/memories/list-memories`,children:[_jsx(`span`,{className:`sp-m sp-get`,children:`GET`}),_jsxs(`code`,{children:[`/v2/agents/`,_jsx(`span`,{className:`sp-param`,children:`{agent_id}`}),`/memories`]})]}),`. Narrow results with optional query filters:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`thread_id`})}),_jsx(_components.td,{children:`Return only turns from this thread (works even after the thread was deleted).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`file_id`})}),_jsx(_components.td,{children:`Return only turns that came from or cited this file.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`speaker_id`})}),_jsxs(_components.td,{children:[`Return only turns sent with this `,_jsx(_components.code,{children:`speaker_id`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`limit`})}),_jsx(_components.td,{children:`Page size (1 to 100, default 50).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`cursor`})}),_jsxs(_components.td,{children:[`Pass `,_jsx(_components.code,{children:`next_cursor`}),` from the previous response to read the next page.`]})]})]})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://app.sapientpriors.com/api/v2/agents/agent_01J.../memories?thread_id=thread_01J...\u0026limit=50\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$SP_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"items\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"turn_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"thread_01J...:4\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"thread_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"thread_01J...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"speaker\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Priya\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"speaker_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"prospect-4471\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Our new phone number is 555-0199.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-17T10:12:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"file_ids\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"state\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"learned\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"file_piece\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"next_cursor\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`turn-fields`,children:`Turn fields`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`turn_id`})}),_jsxs(_components.td,{children:[`Identifier to pass (URL-encoded) to `,_jsxs(_components.a,{className:`sp-ep`,href:`/api-reference/v2/memories/forget-a-memory`,children:[_jsx(`span`,{className:`sp-m sp-delete`,children:`DELETE`}),_jsxs(`code`,{children:[`…/memories/`,_jsx(`span`,{className:`sp-param`,children:`{turn_id}`})]})]}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`state`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`learned`}),` (memories exist), `,_jsx(_components.code,{children:`learning`}),` (still being extracted), `,_jsx(_components.code,{children:`not_learned`}),` (extraction failed; resend if needed), or `,_jsx(_components.code,{children:`forgotten`}),` (memories were deleted).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`file_piece`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`true`}),` when this turn is a piece of an uploaded document; delete the file instead of the individual piece.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`forget-a-turn’s-memories`,children:`Forget a turn’s memories`}),`\n`,_jsxs(_components.p,{children:[`Send `,_jsxs(_components.a,{className:`sp-ep`,href:`/api-reference/v2/memories/forget-a-memory`,children:[_jsx(`span`,{className:`sp-m sp-delete`,children:`DELETE`}),_jsxs(`code`,{children:[`/v2/agents/`,_jsx(`span`,{className:`sp-param`,children:`{agent_id}`}),`/memories/`,_jsx(`span`,{className:`sp-param`,children:`{turn_id}`})]})]}),`. `,_jsxs(_components.strong,{children:[`Always URL-encode `,_jsx(_components.code,{children:`turn_id`})]}),` because an id can contain `,_jsx(_components.code,{children:`/`}),` or `,_jsx(_components.code,{children:`#`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` DELETE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://app.sapientpriors.com/api/v2/agents/agent_01J.../memories/thread_01J...%3A4\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$SP_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Success:`}),` status `,_jsx(_components.code,{children:`204`}),` with no body.`]}),`\n`,_jsx(Heading,{level:`3`,id:`what-forgetting-removes-and-what-stays`,children:`What forgetting removes, and what stays`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Removed:`}),` every memory extracted from that exact `,_jsx(_components.code,{children:`turn_id`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`Stays (marked `,_jsx(_components.code,{children:`forgotten`}),`):`]}),` the turn record remains in conversation history with `,_jsx(_components.code,{children:`state: \"forgotten\"`}),` so service restarts or resumes never re-learn it.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Stays (other turns):`}),` memories extracted from `,_jsx(_components.strong,{children:`other`}),` turns are untouched. If the same fact was repeated in a second user message, or echoed in an agent reply that was learned (`,_jsx(_components.code,{children:`learn_reply: true`}),`), list the thread’s turns and forget those turns too.`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`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.`})}),`\n`,_jsxs(Heading,{level:`3`,id:`errors-on-delete-/v2/agents/agent_id/memories/turn_id`,children:[`Errors on `,_jsx(_components.code,{children:`DELETE /v2/agents/{agent_id}/memories/{turn_id}`})]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:_jsx(_components.code,{children:`code`})}),_jsx(_components.th,{children:`Cause`}),_jsx(_components.th,{children:`What to do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`forbidden`})}),_jsxs(_components.td,{children:[`Caller reaches the agent, but its role cannot see or delete memories, or the call sent `,_jsx(_components.code,{children:`X-SP-End-User`}),`.`]}),_jsxs(_components.td,{children:[`Use a key with the Project admin role or Agent admin of this agent, without `,_jsx(_components.code,{children:`X-SP-End-User`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`agent_not_found`})}),_jsx(_components.td,{children:`Caller does not reach the agent, or the agent does not exist.`}),_jsxs(_components.td,{children:[`Check `,_jsx(_components.code,{children:`agent_id`}),` and which project your key belongs to.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`not_found`})}),_jsxs(_components.td,{children:[`No turn matches `,_jsx(_components.code,{children:`turn_id`}),`.`]}),_jsx(_components.td,{children:`Check the id and URL encoding.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`409`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`conflict`})}),_jsxs(_components.td,{children:[`The turn is a document piece (`,_jsx(_components.code,{children:`file_piece: true`}),`), is still `,_jsx(_components.code,{children:`learning`}),`, or multiple turns share the same id.`]}),_jsxs(_components.td,{children:[`For a file piece, call `,_jsxs(_components.a,{className:`sp-ep`,href:`/api-reference/v2/files/delete-file`,children:[_jsx(`span`,{className:`sp-m sp-delete`,children:`DELETE`}),_jsxs(`code`,{children:[`/v2/agents/`,_jsx(`span`,{className:`sp-param`,children:`{agent_id}`}),`/files/`,_jsx(`span`,{className:`sp-param`,children:`{file_id}`})]})]}),` instead. For a turn still `,_jsx(_components.code,{children:`learning`}),`, wait and retry.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`409`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`agent_not_ready`})}),_jsx(_components.td,{children:`Agent is still initializing.`}),_jsxs(_components.td,{children:[`Poll until `,_jsx(_components.code,{children:`status`}),` is `,_jsx(_components.code,{children:`ready`}),`.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`common-workflows`,children:`Common workflows`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Forget a whole thread:`}),` list turns with `,_jsxs(_components.a,{className:`sp-ep`,href:`/api-reference/v2/memories/list-memories`,children:[_jsx(`span`,{className:`sp-m sp-get`,children:`GET`}),_jsxs(`code`,{children:[`/v2/agents/`,_jsx(`span`,{className:`sp-param`,children:`{agent_id}`}),`/memories?thread_id=`,_jsx(`span`,{className:`sp-param`,children:`{thread_id}`})]})]}),`, page until `,_jsx(_components.code,{children:`next_cursor`}),` is `,_jsx(_components.code,{children:`null`}),`, and forget each non-file turn (works before or after deleting the thread).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Forget a whole document:`}),` call `,_jsxs(_components.a,{className:`sp-ep`,href:`/api-reference/v2/files/delete-file`,children:[_jsx(`span`,{className:`sp-m sp-delete`,children:`DELETE`}),_jsxs(`code`,{children:[`/v2/agents/`,_jsx(`span`,{className:`sp-param`,children:`{agent_id}`}),`/files/`,_jsx(`span`,{className:`sp-param`,children:`{file_id}`})]})]}),` and poll its `,_jsx(_components.code,{children:`Location`}),` header (`,_jsxs(_components.a,{className:`sp-ep`,href:`/api-reference/v2/memories/list-memories`,children:[_jsx(`span`,{className:`sp-m sp-get`,children:`GET`}),_jsxs(`code`,{children:[`…/memories?file_id=`,_jsx(`span`,{className:`sp-param`,children:`{file_id}`})]})]}),`) until every turn is `,_jsx(_components.code,{children:`forgotten`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Forget everything on an agent:`}),` call `,_jsxs(_components.a,{className:`sp-ep`,href:`/api-reference/v2/agents/delete-agent`,children:[_jsx(`span`,{className:`sp-m sp-delete`,children:`DELETE`}),_jsxs(`code`,{children:[`/v2/agents/`,_jsx(`span`,{className:`sp-param`,children:`{agent_id}`})]})]}),`. See `,_jsx(_components.a,{href:`/how-to-use/customer-leaves`,children:`C3. A customer leaves`}),`.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Memories","description":"How turns become memories, how to list an agent's turns with filters, and how to forget specific turns in v2.","href":"/concepts/memories"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[1958,2016,""],[2401,2536,"`/memories/`]})]}),`"],[3707,3765,""],[12341,12441,"(`code`,{children:`…/memories/`})]}),`.`"],[13535,13670,"`/memories/`]})]}),`"],[19397,19532,"`/files/`]})]}),` in"],[20478,20635,"`/memories?thread_id=`]})]}),`, page unt"],[21116,21251,"`/files/`]})]}),` an"],[21476,21576,"(`code`,{children:`…/memories?file_id=`}"],[21931,22032,"(`code`,{children:`/v2/agents/`})]}),`. "]]},"mdxExtracts":{"tableOfContents":[{"title":"How turns map to memories","slug":"how-turns-map-to-memories","depth":2,"children":[]},{"title":"List memories (turns)","slug":"list-memories-turns","depth":2,"children":[{"title":"Turn fields","slug":"turn-fields","depth":3,"children":[]}]},{"title":"Forget a turn’s memories","slug":"forget-a-turn’s-memories","depth":2,"children":[{"title":"What forgetting removes, and what stays","slug":"what-forgetting-removes-and-what-stays","depth":3,"children":[]},{"title":"Errors on DELETE /v2/agents/{agent_id}/memories/{turn_id}","slug":"errors-on-delete-/v2/agents/agent_id/memories/turn_id","depth":3,"children":[]}]},{"title":"Common workflows","slug":"common-workflows","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"sapient-priors","siteName":"SapientPriors API","title":"Memories - SapientPriors API","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-12-04T06:15:48.987Z","originalFileLocation":"concepts/memories.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"How turns become memories, how to list an agent\u0026#x27;s turns with filters, and how to forget specific turns in v2.\">\u003cmeta data-mint-head name=\"application-name\" content=\"SapientPriors API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/sapient-priors/41Zzrd5M-yWREesQ/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/sapient-priors/41Zzrd5M-yWREesQ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/sapient-priors/41Zzrd5M-yWREesQ/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/sapient-priors/41Zzrd5M-yWREesQ/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/sapient-priors/41Zzrd5M-yWREesQ/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/sapient-priors/41Zzrd5M-yWREesQ/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/sapient-priors/41Zzrd5M-yWREesQ/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/sapient-priors/41Zzrd5M-yWREesQ/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/sapient-priors/41Zzrd5M-yWREesQ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Memories - SapientPriors API\">\u003cmeta data-mint-head property=\"og:description\" content=\"How turns become memories, how to list an agent\u0026#x27;s turns with filters, and how to forget specific turns in v2.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"SapientPriors API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.sapientpriors.com/docs/concepts/memories\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://sapient-priors.mintlify.site/docs/_mintlify/api/og/v2?division=How+Priors+works\u0026amp;title=Memories\u0026amp;description=How+turns+become+memories%2C+how+to+list+an+agent%27s+turns+with+filters%2C+and+how+to+forget+specific+turns+in+v2.\u0026amp;theme=751e326e2f24e0e46155d5db\u0026amp;signature=ac2646d746fe1858ef142edfee745579c70e5e5eedcf94c8f6bad936e98c070e\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Memories - SapientPriors API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"How turns become memories, how to list an agent\u0026#x27;s turns with filters, and how to forget specific turns in v2.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://sapient-priors.mintlify.site/docs/_mintlify/api/og/v2?division=How+Priors+works\u0026amp;title=Memories\u0026amp;description=How+turns+become+memories%2C+how+to+list+an+agent%27s+turns+with+filters%2C+and+how+to+forget+specific+turns+in+v2.\u0026amp;theme=751e326e2f24e0e46155d5db\u0026amp;signature=ac2646d746fe1858ef142edfee745579c70e5e5eedcf94c8f6bad936e98c070e\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/sapient-priors/41Zzrd5M-yWREesQ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"SapientPriors API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#9a6b42\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.sapientpriors.com/docs/concepts/memories\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/concepts/memories.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.sapientpriors.com/#organization\",\"name\":\"SapientPriors API\",\"url\":\"https://www.sapientpriors.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/sapient-priors/-tITydu-TdVT8-GJ/logo/light.svg?fit=max\u0026auto=format\u0026n=-tITydu-TdVT8-GJ\u0026q=85\u0026s=9db37e90eb18803314b2e860625d33ef\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.sapientpriors.com/docs#website\",\"name\":\"SapientPriors API\",\"url\":\"https://www.sapientpriors.com/docs\",\"publisher\":{\"@id\":\"https://www.sapientpriors.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.sapientpriors.com/docs/concepts/memories#webpage\",\"url\":\"https://www.sapientpriors.com/docs/concepts/memories\",\"name\":\"Memories\",\"description\":\"How turns become memories, how to list an agent's turns with filters, and how to forget specific turns in v2.\",\"dateModified\":\"2026-12-04T06:15:48.987Z\",\"isPartOf\":{\"@id\":\"https://www.sapientpriors.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://www.sapientpriors.com/docs/concepts/memories#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.sapientpriors.com/docs/concepts/memories#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guides\",\"item\":\"https://www.sapientpriors.com/docs/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How Priors works\",\"item\":\"https://www.sapientpriors.com/docs/concepts/agents\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Memories\",\"item\":\"https://www.sapientpriors.com/docs/concepts/memories\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://www.sapientpriors.com/docs/concepts/memories#article\",\"headline\":\"Memories\",\"name\":\"Memories\",\"description\":\"How turns become memories, how to list an agent's turns with filters, and how to forget specific turns in v2.\",\"url\":\"https://www.sapientpriors.com/docs/concepts/memories\",\"mainEntityOfPage\":{\"@id\":\"https://www.sapientpriors.com/docs/concepts/memories#webpage\"},\"dateModified\":\"2026-12-04T06:15:48.987Z\",\"publisher\":{\"@id\":\"https://www.sapientpriors.com/#organization\"},\"isPartOf\":{\"@id\":\"https://www.sapientpriors.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"SapientPriors API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"SapientPriors API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/concepts/memories.md","siteName":"SapientPriors API","nav":{"global":null,"tabs":[{"tab":"How to use","pages":[{"title":"How to use","href":"/how-to-use/overview"}]},{"tab":"Guides","groups":[{"group":"Guides","pages":[{"group":"Start here","expanded":true,"pages":[{"title":"Start here","href":"/introduction"},{"title":"The complete lifecycle","href":"/lifecycle"},{"title":"Authentication","href":"/authentication"},{"title":"Errors","href":"/errors"},{"title":"Limits","href":"/limits"},{"title":"Credits","href":"/credits"},{"title":"Your data","href":"/data"},{"title":"Integration notes","href":"/integration"}]},{"group":"Accounts and access","expanded":true,"pages":[{"title":"Organizations, projects, and agents","href":"/access/overview"},{"title":"Roles and permissions","href":"/access/roles"},{"title":"Service accounts","href":"/access/service-accounts"}]},{"group":"Walkthroughs","expanded":false,"pages":[{"title":"0. Set up your organization","href":"/walkthroughs/set-up-your-organization"},{"title":"1. Your first agent, from start to finish","href":"/walkthroughs/first-conversation"},{"title":"2. Bring your own model","href":"/walkthroughs/bring-your-own-model"},{"title":"3. Teach from a document","href":"/walkthroughs/teach-from-a-document"},{"title":"4. Build a chat interface","href":"/walkthroughs/build-a-chat-interface"},{"title":"5. Call Priors from your own backend","href":"/walkthroughs/call-from-your-backend"},{"title":"6. Use Priors with a personal key","href":"/walkthroughs/personal-key"}]},{"group":"How Priors works","expanded":false,"pages":[{"title":"Agents","href":"/concepts/agents"},{"title":"Threads","href":"/concepts/threads"},{"title":"Learning","href":"/concepts/learning"},{"title":"Answering","href":"/concepts/answering"},{"title":"Files","description":"List, inspect, download, resume, and delete files an agent holds in v2, and understand citations and attached images.","href":"/concepts/files"},{"title":"Memories","href":"/concepts/memories"}]},{"group":"Reference","expanded":false,"pages":[{"title":"Terminology","description":"Every term used across the Priors v2 documentation, defined once.","href":"/terminology"}]}]}]},{"tab":"API reference","versions":[{"version":"Latest","default":true,"tag":"v2","groups":[{"group":"API reference","pages":[{"title":"Conventions","href":"/api-reference/overview"},{"group":"Agents","expanded":true,"pages":[{"title":"List agents","deprecated":null,"version":null,"sidebarTitle":"List agents","openapi":"/openapi.yaml get /v2/agents","href":"/api-reference/v2/agents/list-agents"},{"title":"Create agent","deprecated":null,"version":null,"sidebarTitle":"Create agent","openapi":"/openapi.yaml post /v2/agents","href":"/api-reference/v2/agents/create-agent"},{"title":"Get agent","deprecated":null,"version":null,"sidebarTitle":"Get agent","openapi":"/openapi.yaml get /v2/agents/{agent_id}","href":"/api-reference/v2/agents/get-agent"},{"title":"Update agent","deprecated":null,"version":null,"sidebarTitle":"Update agent","openapi":"/openapi.yaml patch /v2/agents/{agent_id}","href":"/api-reference/v2/agents/update-agent"},{"title":"Delete agent","deprecated":null,"version":null,"sidebarTitle":"Delete agent","openapi":"/openapi.yaml delete /v2/agents/{agent_id}","href":"/api-reference/v2/agents/delete-agent"},{"title":"List activity","deprecated":null,"version":null,"sidebarTitle":"List activity","openapi":"/openapi.yaml get /v2/agents/{agent_id}/logs","href":"/api-reference/v2/agents/list-activity"}]},{"group":"Threads","expanded":false,"pages":[{"title":"List threads","deprecated":null,"version":null,"sidebarTitle":"List threads","openapi":"/openapi.yaml get /v2/agents/{agent_id}/threads","href":"/api-reference/v2/threads/list-threads"},{"title":"Create thread","deprecated":null,"version":null,"sidebarTitle":"Create thread","openapi":"/openapi.yaml post /v2/agents/{agent_id}/threads","href":"/api-reference/v2/threads/create-thread"},{"title":"Get thread","deprecated":null,"version":null,"sidebarTitle":"Get thread","openapi":"/openapi.yaml get /v2/agents/{agent_id}/threads/{thread_id}","href":"/api-reference/v2/threads/get-thread"},{"title":"Update thread","deprecated":null,"version":null,"sidebarTitle":"Update thread","openapi":"/openapi.yaml patch /v2/agents/{agent_id}/threads/{thread_id}","href":"/api-reference/v2/threads/update-thread"},{"title":"Delete thread","deprecated":null,"version":null,"sidebarTitle":"Delete thread","openapi":"/openapi.yaml delete /v2/agents/{agent_id}/threads/{thread_id}","href":"/api-reference/v2/threads/delete-thread"}]},{"group":"Learning","expanded":false,"pages":[{"title":"Learn messages or files","deprecated":null,"version":null,"sidebarTitle":"Learn messages or files","openapi":"/openapi.yaml post /v2/agents/{agent_id}/threads/{thread_id}/observe","href":"/api-reference/v2/threads/learn-messages-or-files"},{"title":"List observe calls","deprecated":null,"version":null,"sidebarTitle":"List observe calls","openapi":"/openapi.yaml get /v2/agents/{agent_id}/threads/{thread_id}/observe","href":"/api-reference/v2/threads/list-observe-calls"},{"title":"Get learning status","deprecated":null,"version":null,"sidebarTitle":"Get learning status","openapi":"/openapi.yaml get /v2/agents/{agent_id}/threads/{thread_id}/observe/{observation_id}","href":"/api-reference/v2/threads/get-learning-status"}]},{"group":"Answering","expanded":false,"pages":[{"title":"Learn and answer","deprecated":null,"version":null,"sidebarTitle":"Learn and answer","openapi":"/openapi.yaml post /v2/agents/{agent_id}/threads/{thread_id}/observe-and-respond","href":"/api-reference/v2/threads/learn-and-answer"},{"title":"Answer","deprecated":null,"version":null,"sidebarTitle":"Answer","openapi":"/openapi.yaml post /v2/agents/{agent_id}/threads/{thread_id}/respond","href":"/api-reference/v2/threads/answer"},{"title":"Learn and recall","deprecated":null,"version":null,"sidebarTitle":"Learn and recall","openapi":"/openapi.yaml post /v2/agents/{agent_id}/threads/{thread_id}/observe-and-recall","href":"/api-reference/v2/threads/learn-and-recall"},{"title":"Recall memories","deprecated":null,"version":null,"sidebarTitle":"Recall memories","openapi":"/openapi.yaml post /v2/agents/{agent_id}/threads/{thread_id}/recall","href":"/api-reference/v2/threads/recall-memories"}]},{"group":"Files","expanded":false,"pages":[{"title":"List files","deprecated":null,"version":null,"sidebarTitle":"List files","openapi":"/openapi.yaml get /v2/agents/{agent_id}/files","href":"/api-reference/v2/files/list-files"},{"title":"Get file","deprecated":null,"version":null,"sidebarTitle":"Get file","openapi":"/openapi.yaml get /v2/agents/{agent_id}/files/{file_id}","href":"/api-reference/v2/files/get-file"},{"title":"Download file","deprecated":null,"version":null,"sidebarTitle":"Download file","openapi":"/openapi.yaml get /v2/agents/{agent_id}/files/{file_id}/download","href":"/api-reference/v2/files/download-file"},{"title":"Resume a file","deprecated":null,"version":null,"sidebarTitle":"Resume a file","openapi":"/openapi.yaml post /v2/agents/{agent_id}/files/{file_id}/resume","href":"/api-reference/v2/files/resume-a-file"},{"title":"Delete file","deprecated":null,"version":null,"sidebarTitle":"Delete file","openapi":"/openapi.yaml delete /v2/agents/{agent_id}/files/{file_id}","href":"/api-reference/v2/files/delete-file"}]},{"group":"Memories","expanded":false,"pages":[{"title":"List memories","deprecated":null,"version":null,"sidebarTitle":"List memories","openapi":"/openapi.yaml get /v2/agents/{agent_id}/memories","href":"/api-reference/v2/memories/list-memories"},{"title":"Forget a memory","deprecated":null,"version":null,"sidebarTitle":"Forget a memory","openapi":"/openapi.yaml delete /v2/agents/{agent_id}/memories/{turn_id}","href":"/api-reference/v2/memories/forget-a-memory"}]},{"group":"Your key","expanded":false,"pages":[{"title":"Get me","deprecated":null,"version":null,"sidebarTitle":"Get me","openapi":"/openapi.yaml get /v2/me","href":"/api-reference/v2/users/get-me"}]},{"group":"Projects","expanded":false,"pages":[{"title":"Get a project's usage","deprecated":null,"version":null,"sidebarTitle":"Get a project's usage","openapi":"/openapi.yaml get /v2/projects/{project_id}/usage","href":"/api-reference/v2/projects/get-a-projects-usage"}]},{"group":"Organization","expanded":false,"pages":[{"title":"Find a member","deprecated":null,"version":null,"sidebarTitle":"Find a member","openapi":"/openapi.yaml get /v2/organization/members","href":"/api-reference/v2/organization/find-a-member"}]},{"group":"Status","expanded":false,"pages":[{"title":"Get the answer mode","deprecated":null,"version":null,"sidebarTitle":"Get the answer mode","openapi":"/openapi.yaml get /v2/health/answer-mode","href":"/api-reference/v2/health/get-the-answer-mode"}]}]}]}]}]},"basePath":"","title":"Memories - SapientPriors API","deploymentId":"dpl_hSqyvJ4yQMj8zFViHgqnZFPm1xMv","buildId":"dpl_hSqyvJ4yQMj8zFViHgqnZFPm1xMv","dynamics":[],"chunks":[]}