Memory makes every prompt bigger. That is the deal — and it is fine until the
bill arrives and nobody can say how much of it was memory, or whether the tenth
recalled item was worth anything.Two levers, and both are measurable rather than vibes.
context = client.get_context( space_id="support", query="why did the proxy fix not work?", user_id="acme-corp", max_tokens=600,)
get_context returns a prompt-ready string with the budget enforced
server-side. Whole memories are dropped, lowest-ranked first — never text cut
mid-sentence, which would leave the model reading half a fact.This beats a client-side loop because your loop does not know the ranking.
Dashboard → Usage → Memory in your prompts. It appears once the proxy
has carried a turn, and shows three readings for the last 30 days:
Context injected (context_tokens) — what memory added to your prompts.
Cache-eligible (cache_prefix_tokens) — how much of that was unchanged
since the previous turn: the measured eligibility for a provider discount, not
an estimate of savings.
Stable share — the second as a percentage of the first.
These are dashboard figures. client.get_usage() is the API-key view of your
credits (credits_remaining, credits_limit, credits_used,
rate_limit_per_min) and does not carry them.
Run twenty representative turns with max_tokens unset. Record
Context injected from the Usage page.
Re-run with a ceiling at roughly half. Score answer quality on the same
questions.
Find the point where quality drops. That number is your budget; most spaces
sit well below the default.
Run the same twenty turns in relevance and then stable order and compare
Cache-eligible after each. Relevance mode should read near zero — that contrast
is the evidence the setting is doing anything.
cache_prefix_tokens reports eligibility, not money saved. Whether a
discount applies is the provider’s business, and it depends on their cache
state. Do not present this figure to a customer as a saving.
Stable ordering trades freshness for cacheability. The most relevant
memory is no longer first in the block. If answer quality drops, this is the
first thing to turn off.
Budget selection happens in relevance order, then emission is reordered —
so a tighter budget drops the weakest memory, not the newest one.
There is no baseline to compare against. What you would have spent without
a memory layer is unobservable, and any “X% saved” number built on a guessed
baseline will not survive being asked how it was calculated.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Anona Memory","description":"Managed memory for AI agents. Record, retrieve, and reason over long-lived agent memory through a single API.","colors":{"primary":"#ce3430","light":"#e7413c","dark":"#b02324"},"logo":{"light":"https://mintcdn.com/anonalabs/EbHrb6Piz6HoXns-/logo/anona-lockup-light.svg?fit=max\u0026auto=format\u0026n=EbHrb6Piz6HoXns-\u0026q=85\u0026s=e071f027f34ec6b33984a7f58dad387f","dark":"https://mintcdn.com/anonalabs/EbHrb6Piz6HoXns-/logo/anona-lockup-dark.svg?fit=max\u0026auto=format\u0026n=EbHrb6Piz6HoXns-\u0026q=85\u0026s=cda5788809f06de5dcd8cf0812fbea53"},"favicon":"https://mintcdn.com/anonalabs/EbHrb6Piz6HoXns-/favicon.svg?fit=max\u0026auto=format\u0026n=EbHrb6Piz6HoXns-\u0026q=85\u0026s=c4752464baac0ee98e78996bda962821","background":{"color":{"light":"#ffffff","dark":"#1a1d21"}},"navbar":{"links":[{"href":"mailto:support@anonalabs.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://memory.anonalabs.com"}},"footer":{"socials":{"github":"https://github.com/anonalabs"}},"search":{"prompt":"Search the Anona Memory docs"},"fonts":{"heading":{"family":"Instrument Serif","weight":400},"body":{"family":"Space Grotesk"}},"contextual":{"options":["copy","view","chatgpt","claude","cursor","vscode","mcp",{"title":"Copy all docs for LLM","description":"Every page as one Markdown file, for pasting into an agent's context","icon":"file-lines","href":"https://docs.anonalabs.com/llms-full.txt"},{"title":"Docs index for LLM","description":"llms.txt - the page map an agent can crawl on demand","icon":"list","href":"https://docs.anonalabs.com/llms.txt"}],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/anonalabs/Anona-Memory-SDK"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"anonalabs","hasAudioNarration":false,"actualSubdomain":"anonalabs","customDomains":["docs.anonalabs.com"],"gitSource":{"type":"github","owner":"anonalabs","repo":"anona-memory","deployBranch":"main","contentDirectory":"mintlify-docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"collectionId":"60bfb882-8cd2-4fd4-be2f-449f4f31920d","liveDeploymentHistoryId":"6ae1c7a24fe4c8cc739c373a","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae1c7a24fe4c8cc739c373a"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae432fa2b01475daafa184a","clientVersion":"0.0.4021","searchFilterCounts":[{"language":"default","tag":"Use Cases","count":41},{"language":"default","tag":"Anona CLI","count":16},{"language":"default","tag":"Memory (data plane)","count":13},{"language":"default","tag":"Command reference","count":11},{"language":"default","tag":"Integrations","count":10},{"language":"default","tag":"Build","count":10},{"language":"default","tag":"Guides","count":8},{"language":"default","tag":"Research","count":8},{"language":"default","tag":"Account (control plane)","count":7},{"language":"default","tag":"Team","count":7}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","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":"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":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","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":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","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":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"/* cyrillic-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx3cwhsk.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxTcwhsk.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxPcwhsk.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx_cwhsk.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx7cwhsk.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxDcwg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx3cwhsk.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxTcwhsk.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxPcwhsk.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx_cwhsk.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx7cwhsk.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxDcwg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx3cwhsk.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxTcwhsk.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxPcwhsk.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx_cwhsk.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx7cwhsk.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxDcwg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n:root{--font-mono:\"JetBrains Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas,\n monospace}[class*=font-mono],code,kbd,pre,samp{font-family:var(--font-mono)!important}#content-area pre{line-height:1.7}#content-area h3,#content-area h4,#content-area h5,#content-area h6{font-family:var(--font-body, \"Space Grotesk\"),system-ui,sans-serif;font-weight:600;letter-spacing:-.01em}#banner{background-color:#1a1816!important}html.dark #banner{background-color:#22262b!important;border-bottom:1px solid #2f343a}img.nav-logo{height:2rem!important;max-height:2rem!important;width:auto!important;object-fit:contain;align-self:center}#navbar a[href=\"/\"]{display:flex;align-items:center}#content-area table{font-size:.875rem;line-height:1.6;display:block;overflow-x:auto;max-width:100%}#content-area thead th{font-weight:600;letter-spacing:.01em;white-space:nowrap}#content-area td,#content-area th{vertical-align:top;padding-top:.6rem;padding-bottom:.6rem}#content-area td code,#content-area th code{white-space:nowrap;font-size:.8125rem}@media (min-width:1280px){[class*=max-w-8xl]{max-width:none!important}#content-container>div{justify-content:space-between}#content-area{max-width:69rem}}main .relative.grow:has(.mdx-content>span:first-child>a[href=\"/use-cases/overview\"]){--uc-gutter:4px;padding-top:2.25rem}@media (min-width:1024px){main .relative.grow:has(.mdx-content>span:first-child>a[href=\"/use-cases/overview\"]){--uc-gutter:91.2px}}main .mdx-content:has(>span:first-child>a[href=\"/use-cases/overview\"]){position:static}main .mdx-content:has(>span:first-child>a[href=\"/use-cases/overview\"])>span:first-child{position:absolute;top:0;left:var(--uc-gutter);font-size:.875rem}main .mdx-content .uc-examples{display:flex;flex-wrap:wrap;gap:.375rem;margin:0 0 1.75rem}main .mdx-content .uc-examples a{display:inline-flex;align-items:center;gap:.4rem;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.75rem;line-height:1.7;padding:.2rem .7rem;border:1px solid rgba(128,128,128,.45);border-bottom:1px solid rgba(128,128,128,.45);border-radius:.4rem;background:rgba(128,128,128,.12);text-decoration:none;white-space:nowrap}main .mdx-content .uc-examples a::before{content:\"\";flex:none;width:.95rem;height:.95rem;background-color:currentColor;-webkit-mask:url(data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2016%2016%27%3E%3Cpath%20d%3D%27M8%200C3.58%200%200%203.58%200%208c0%203.54%202.29%206.53%205.47%207.59.4.07.55-.17.55-.38%200-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01%201.08.58%201.23.82.72%201.21%201.87.87%202.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95%200-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12%200%200%20.67-.21%202.2.82.64-.18%201.32-.27%202-.27s1.36.09%202%20.27c1.53-1.04%202.2-.82%202.2-.82.44%201.1.16%201.92.08%202.12.51.56.82%201.27.82%202.15%200%203.07-1.87%203.75-3.65%203.95.29.25.54.73.54%201.48%200%201.07-.01%201.93-.01%202.2%200%20.21.15.46.55.38A8.012%208.012%200%200%200%2016%208c0-4.42-3.58-8-8-8z%27%2F%3E%3C%2Fsvg%3E) center/contain no-repeat;mask:url(data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2016%2016%27%3E%3Cpath%20d%3D%27M8%200C3.58%200%200%203.58%200%208c0%203.54%202.29%206.53%205.47%207.59.4.07.55-.17.55-.38%200-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01%201.08.58%201.23.82.72%201.21%201.87.87%202.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95%200-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12%200%200%20.67-.21%202.2.82.64-.18%201.32-.27%202-.27s1.36.09%202%20.27c1.53-1.04%202.2-.82%202.2-.82.44%201.1.16%201.92.08%202.12.51.56.82%201.27.82%202.15%200%203.07-1.87%203.75-3.65%203.95.29.25.54.73.54%201.48%200%201.07-.01%201.93-.01%202.2%200%20.21.15.46.55.38A8.012%208.012%200%200%200%2016%208c0-4.42-3.58-8-8-8z%27%2F%3E%3C%2Fsvg%3E) center/contain no-repeat}main .mdx-content .uc-examples a:hover{border-color:rgba(128,128,128,.8);background:rgba(128,128,128,.2)}main .mdx-content .uc-examples a.uc-api::before{display:none}"}],"page":{"pagePath":"use-cases/cut-the-bill","slug":"/use-cases/cut-the-bill","pageMetadata":{"title":"Cut the bill without cutting recall","description":"Cap what memory is allowed to spend of your prompt, and measure what the provider's cache gave back.","href":"/use-cases/cut-the-bill"},"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: \"Cap what memory is allowed to spend of your prompt, and measure what the provider’s cache gave back.\"\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`,em:`em`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:_jsx(_components.a,{href:`/use-cases/overview`,children:`← All use cases`})}),`\n`,_jsxs(`div`,{className:`uc-examples`,children:[_jsx(`a`,{href:`https://github.com/anonalabs/Anona-Memory-SDK/blob/main/examples/drop_in_proxy.py`,children:`drop_in_proxy.py`}),_jsx(`a`,{href:`https://github.com/anonalabs/Anona-Memory-SDK/blob/main/examples/memory_basics.py`,children:`memory_basics.py`})]}),`\n`,_jsx(Heading,{level:`2`,id:`the-scenario`,children:`The scenario`}),`\n`,_jsx(_components.p,{children:`Memory makes every prompt bigger. That is the deal — and it is fine until the\nbill arrives and nobody can say how much of it was memory, or whether the tenth\nrecalled item was worth anything.`}),`\n`,_jsx(_components.p,{children:`Two levers, and both are measurable rather than vibes.`}),`\n`,_jsx(Heading,{level:`2`,id:`step-1-—-put-a-hard-ceiling-on-the-block`,children:`Step 1 — Put a hard ceiling on the block`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`python`,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:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`context `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.get_context(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` space_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"support\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` query`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"why did the proxy fix not work?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` user_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"acme-corp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` max_tokens`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`600`}),_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`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`get_context`}),` returns a prompt-ready string with the budget enforced\nserver-side. Whole memories are dropped, lowest-ranked first — never text cut\nmid-sentence, which would leave the model reading half a fact.`]}),`\n`,_jsx(_components.p,{children:`This beats a client-side loop because your loop does not know the ranking.`}),`\n`,_jsx(Heading,{level:`2`,id:`step-2-—-make-the-block-cacheable`,children:`Step 2 — Make the block cacheable`}),`\n`,_jsxs(_components.p,{children:[`Providers discount an unchanged prompt `,_jsx(_components.em,{children:`prefix`}),`. A memory block reordered by\nrelevance every turn destroys that prefix on every turn.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`python`,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:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`llm `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ANONA_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` base_url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.anonalabs.com/v1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` default_headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-Anona-Space-Id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"support\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-Anona-Block-Order\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"stable\"`}),_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`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`stable`}),` orders by when memories were created rather than by score, so the block\nmostly does not change between turns and the discount can apply.`]}),`\n`,_jsx(Heading,{level:`2`,id:`step-3-—-read-what-it-actually-cost`,children:`Step 3 — Read what it actually cost`}),`\n`,_jsxs(_components.p,{children:[`Dashboard → `,_jsx(_components.strong,{children:`Usage`}),` → `,_jsx(_components.strong,{children:`Memory in your prompts`}),`. It appears once the proxy\nhas carried a turn, and shows three readings for the last 30 days:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Context injected`}),` (`,_jsx(_components.code,{children:`context_tokens`}),`) — what memory added to your prompts.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Cache-eligible`}),` (`,_jsx(_components.code,{children:`cache_prefix_tokens`}),`) — how much of that was unchanged\nsince the previous turn: the measured eligibility for a provider discount, not\nan estimate of savings.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Stable share`}),` — the second as a percentage of the first.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`These are dashboard figures. `,_jsx(_components.code,{children:`client.get_usage()`}),` is the API-key view of your\n`,_jsx(_components.strong,{children:`credits`}),` (`,_jsx(_components.code,{children:`credits_remaining`}),`, `,_jsx(_components.code,{children:`credits_limit`}),`, `,_jsx(_components.code,{children:`credits_used`}),`,\n`,_jsx(_components.code,{children:`rate_limit_per_min`}),`) and does not carry them.`]}),`\n`,_jsx(Heading,{level:`2`,id:`evals`,children:`Evals`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Run twenty representative turns with `,_jsx(_components.code,{children:`max_tokens`}),` unset. Record\n`,_jsx(_components.strong,{children:`Context injected`}),` from the Usage page.`]}),`\n`,_jsx(_components.li,{children:`Re-run with a ceiling at roughly half. Score answer quality on the same\nquestions.`}),`\n`,_jsx(_components.li,{children:`Find the point where quality drops. That number is your budget; most spaces\nsit well below the default.`}),`\n`,_jsxs(_components.li,{children:[`Run the same twenty turns in `,_jsx(_components.code,{children:`relevance`}),` and then `,_jsx(_components.code,{children:`stable`}),` order and compare\n`,_jsx(_components.strong,{children:`Cache-eligible`}),` after each. Relevance mode should read near zero — that contrast\nis the evidence the setting is doing anything.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`guardrails`,children:`Guardrails`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`cache_prefix_tokens`}),` reports eligibility, not money saved.`]}),` Whether a\ndiscount applies is the provider’s business, and it depends on their cache\nstate. Do not present this figure to a customer as a saving.`]})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Stable ordering trades freshness for cacheability.`}),` The most relevant\nmemory is no longer first in the block. If answer quality drops, this is the\nfirst thing to turn off.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Budget selection happens in relevance order, then emission is reordered`}),` —\nso a tighter budget drops the `,_jsx(_components.em,{children:`weakest`}),` memory, not the newest one.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`There is no baseline to compare against.`}),` What you would have spent without\na memory layer is unobservable, and any “X% saved” number built on a guessed\nbaseline will not survive being asked how it was calculated.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`built-from`,children:`Built from`}),`\n`,_jsxs(_components.p,{children:[`Both are complete, runnable scripts:\n`,_jsx(_components.a,{href:`https://github.com/anonalabs/Anona-Memory-SDK/blob/main/examples/drop_in_proxy.py`,children:_jsx(_components.code,{children:`drop_in_proxy.py`})}),`,\n`,_jsx(_components.a,{href:`https://github.com/anonalabs/Anona-Memory-SDK/blob/main/examples/memory_basics.py`,children:_jsx(_components.code,{children:`memory_basics.py`})}),`.`]})]})}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":"Cut the bill without cutting recall","description":"Cap what memory is allowed to spend of your prompt, and measure what the provider's cache gave back.","href":"/use-cases/cut-the-bill"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"The scenario","slug":"the-scenario","depth":2,"children":[]},{"title":"Step 1 — Put a hard ceiling on the block","slug":"step-1-—-put-a-hard-ceiling-on-the-block","depth":2,"children":[]},{"title":"Step 2 — Make the block cacheable","slug":"step-2-—-make-the-block-cacheable","depth":2,"children":[]},{"title":"Step 3 — Read what it actually cost","slug":"step-3-—-read-what-it-actually-cost","depth":2,"children":[]},{"title":"Evals","slug":"evals","depth":2,"children":[]},{"title":"Guardrails","slug":"guardrails","depth":2,"children":[]},{"title":"Built from","slug":"built-from","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/anonalabs/3087548d8b58fdad/apollo-tracker.js"],"subdomain":"anonalabs","siteName":"Anona Memory","title":"Cut the bill without cutting recall - Anona Memory","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-24T17:13:54.938Z","originalFileLocation":"use-cases/cut-the-bill.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=\"system\"}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=\"Cap what memory is allowed to spend of your prompt, and measure what the provider\u0026#x27;s cache gave back.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Anona Memory\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/anonalabs/8SAfjiD5iTDJmcr4/_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=\"/mintlify-assets/_mintlify/favicons/anonalabs/8SAfjiD5iTDJmcr4/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/anonalabs/8SAfjiD5iTDJmcr4/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/anonalabs/8SAfjiD5iTDJmcr4/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/anonalabs/8SAfjiD5iTDJmcr4/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/anonalabs/8SAfjiD5iTDJmcr4/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/anonalabs/8SAfjiD5iTDJmcr4/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/anonalabs/8SAfjiD5iTDJmcr4/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/anonalabs/8SAfjiD5iTDJmcr4/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Cut the bill without cutting recall - Anona Memory\">\u003cmeta data-mint-head property=\"og:description\" content=\"Cap what memory is allowed to spend of your prompt, and measure what the provider\u0026#x27;s cache gave back.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Anona Memory\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.anonalabs.com/use-cases/cut-the-bill\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://anonalabs.mintlify.app/_mintlify/api/og/v2?division=Governance\u0026amp;title=Cut+the+bill+without+cutting+recall\u0026amp;description=Cap+what+memory+is+allowed+to+spend+of+your+prompt%2C+and+measure+what+the+provider%27s+cache+gave+back.\u0026amp;theme=7715ad72d5e774c6ba1f3afa\u0026amp;signature=5701df73c058a55b6f9ab4623a79a049390596bbc1e3f44af87bc0ab2efe9180\">\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=\"Cut the bill without cutting recall - Anona Memory\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Cap what memory is allowed to spend of your prompt, and measure what the provider\u0026#x27;s cache gave back.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://anonalabs.mintlify.app/_mintlify/api/og/v2?division=Governance\u0026amp;title=Cut+the+bill+without+cutting+recall\u0026amp;description=Cap+what+memory+is+allowed+to+spend+of+your+prompt%2C+and+measure+what+the+provider%27s+cache+gave+back.\u0026amp;theme=7715ad72d5e774c6ba1f3afa\u0026amp;signature=5701df73c058a55b6f9ab4623a79a049390596bbc1e3f44af87bc0ab2efe9180\">\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=\"/mintlify-assets/_mintlify/favicons/anonalabs/8SAfjiD5iTDJmcr4/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Anona Memory\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#ce3430\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.anonalabs.com/use-cases/cut-the-bill\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/use-cases/cut-the-bill.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.anonalabs.com/#organization\",\"name\":\"Anona Memory\",\"url\":\"https://docs.anonalabs.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/anonalabs/EbHrb6Piz6HoXns-/logo/anona-lockup-light.svg?fit=max\u0026auto=format\u0026n=EbHrb6Piz6HoXns-\u0026q=85\u0026s=e071f027f34ec6b33984a7f58dad387f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.anonalabs.com#website\",\"name\":\"Anona Memory\",\"url\":\"https://docs.anonalabs.com\",\"publisher\":{\"@id\":\"https://docs.anonalabs.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.anonalabs.com/use-cases/cut-the-bill#webpage\",\"url\":\"https://docs.anonalabs.com/use-cases/cut-the-bill\",\"name\":\"Cut the bill without cutting recall\",\"description\":\"Cap what memory is allowed to spend of your prompt, and measure what the provider's cache gave back.\",\"dateModified\":\"2026-10-24T17:13:54.938Z\",\"isPartOf\":{\"@id\":\"https://docs.anonalabs.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.anonalabs.com/use-cases/cut-the-bill#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.anonalabs.com/use-cases/cut-the-bill#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Use Cases\",\"item\":\"https://docs.anonalabs.com/use-cases/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Governance\",\"item\":\"https://docs.anonalabs.com/use-cases/why-the-answer-used-what-it-used\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Cut the bill without cutting recall\",\"item\":\"https://docs.anonalabs.com/use-cases/cut-the-bill\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.anonalabs.com/use-cases/cut-the-bill#article\",\"headline\":\"Cut the bill without cutting recall\",\"name\":\"Cut the bill without cutting recall\",\"description\":\"Cap what memory is allowed to spend of your prompt, and measure what the provider's cache gave back.\",\"url\":\"https://docs.anonalabs.com/use-cases/cut-the-bill\",\"mainEntityOfPage\":{\"@id\":\"https://docs.anonalabs.com/use-cases/cut-the-bill#webpage\"},\"dateModified\":\"2026-10-24T17:13:54.938Z\",\"publisher\":{\"@id\":\"https://docs.anonalabs.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.anonalabs.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Anona Memory\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Anona Memory","nav":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/anonalabs/Anona-Memory-SDK"}]},"groups":[{"group":"Getting Started","pages":[{"title":"Anona Memory","sidebarTitle":"Introduction","href":"/introduction"},{"title":"Quickstart","href":"/quickstart"},{"title":"Core Concepts","href":"/concepts"},{"title":"Plans and billing","href":"/guides/plans-and-billing"}]},{"group":"For Agents","pages":[{"title":"Agent Self-Onboarding","sidebarTitle":"Self-Onboarding","href":"/agents/self-onboarding"},{"title":"Self-Onboarding Prompt","sidebarTitle":"Onboarding Prompt","href":"/agents/onboarding-prompt"},{"title":"Temporary profiles","sidebarTitle":"Temporary profiles","href":"/agents/temp-profiles"}]},{"group":"Anona CLI","pages":[{"title":"Anona CLI","sidebarTitle":"Overview \u0026 install","href":"/cli/overview"},{"title":"Sign in \u0026 credentials","sidebarTitle":"Sign in \u0026 credentials","href":"/cli/sign-in"},{"group":"Command reference","pages":[{"title":"record, retrieve, reason","sidebarTitle":"record, retrieve, reason","href":"/cli/memory"},{"title":"spaces","sidebarTitle":"spaces","href":"/cli/spaces"},{"title":"memories","sidebarTitle":"memories","href":"/cli/memories"},{"title":"documents","sidebarTitle":"documents","href":"/cli/documents"},{"title":"jobs","sidebarTitle":"jobs","href":"/cli/jobs"},{"title":"Space settings","sidebarTitle":"settings","href":"/cli/settings"},{"title":"llm-models and model","sidebarTitle":"models","href":"/cli/models"},{"title":"profile, user-profile, usage","sidebarTitle":"profile, user-profile, usage","href":"/cli/profiles-and-usage"},{"title":"Memory models, profile, rules, webhooks, routing","sidebarTitle":"space config","href":"/cli/space-config"},{"title":"Explore: graph, entities, receipts, chat","sidebarTitle":"explore","href":"/cli/explore"},{"title":"Account: org, keys, members, billing, exports","sidebarTitle":"account","href":"/cli/account"}]},{"title":"Scripting \u0026 automation","sidebarTitle":"Scripting \u0026 automation","href":"/cli/scripting"},{"title":"The CLI for AI agents","sidebarTitle":"For AI agents","href":"/cli/agents"},{"title":"Troubleshooting the CLI","sidebarTitle":"Troubleshooting","href":"/cli/troubleshooting"}]},{"group":"API Essentials","pages":[{"title":"API Overview","href":"/api-reference/overview"},{"title":"Authentication","href":"/api-reference/authentication"},{"title":"Errors","href":"/api-reference/errors"}]},{"group":"Memory (data plane)","pages":[{"title":"Memories","href":"/api-reference/memories"},{"title":"Documents","href":"/api-reference/documents"},{"title":"Retrieve","href":"/api-reference/retrieve"},{"title":"Context Receipts","href":"/api-reference/context-receipts"},{"title":"Reason","href":"/api-reference/reason"},{"title":"Model selection","href":"/api-reference/model-selection"},{"title":"User Profiles","href":"/api-reference/user-profiles"},{"title":"Memory models","href":"/api-reference/models"},{"title":"Graph","href":"/api-reference/graph"},{"title":"Draw","href":"/api-reference/draw"},{"title":"Artifacts","href":"/api-reference/artifacts"},{"title":"Extraction settings","href":"/api-reference/extraction-settings"},{"title":"Webhooks","href":"/api-reference/webhooks"}]},{"group":"LLM Proxy (drop-in)","pages":[{"title":"Chat","href":"/api-reference/chat"},{"title":"Responses","href":"/api-reference/responses"},{"title":"Messages","href":"/api-reference/messages"}]},{"group":"Account (control plane)","pages":[{"title":"Organization","href":"/api-reference/organization"},{"title":"Spaces","href":"/api-reference/spaces"},{"title":"API Keys","href":"/api-reference/api-keys"},{"title":"Usage","href":"/api-reference/usage"},{"title":"Billing","href":"/api-reference/billing"},{"title":"Feedback","href":"/api-reference/feedback"},{"title":"Sales enquiry","href":"/api-reference/sales-enquiry"}]},{"group":"SDKs \u0026 MCP","pages":[{"title":"Python SDK","href":"/sdk/python"},{"title":"TypeScript SDK","sidebarTitle":"TypeScript","href":"/sdk/javascript"},{"title":"MCP Integration","sidebarTitle":"MCP","href":"/mcp-integration"},{"title":"Slack","href":"/slack"},{"title":"GitHub","href":"/github"}]},{"group":"Integrations","pages":[{"title":"Integrations","href":"/integrations/overview"},{"title":"Agent Skills","sidebarTitle":"Agent Skills","href":"/integrations/skills"},{"title":"LangChain \u0026 LangGraph","href":"/integrations/langchain"},{"title":"CrewAI","href":"/integrations/crewai"},{"title":"LlamaIndex","href":"/integrations/llamaindex"},{"title":"Google ADK","href":"/integrations/google-adk"},{"title":"Microsoft Agent Framework","href":"/integrations/microsoft-agent-framework"},{"title":"AWS Strands","href":"/integrations/strands"},{"title":"Softmax","href":"/integrations/softmax"},{"title":"Examples","href":"/integrations/examples"}]},{"group":"Guides","pages":[{"title":"Charts, diagrams and artifacts","href":"/guides/charts-diagrams-artifacts"},{"title":"Scoping Memory by User, Agent, or Session","href":"/guides/scoping-multi-tenant"},{"title":"Automatic Space Routing","href":"/guides/automatic-routing"},{"title":"Searching Over Time","href":"/guides/temporal-search"},{"title":"Migrating to the Drop-in Proxy","href":"/guides/migrating-to-proxy"},{"title":"Bulk-Importing History with Webhooks","href":"/guides/bulk-import-webhooks"},{"title":"Tuning Recall Quality","href":"/guides/tuning-recall"},{"title":"Export Your Memory","href":"/guides/export"}]},{"group":"Use Cases","pages":[{"title":"Use Cases","href":"/use-cases/overview"},{"group":"Personal","pages":[{"title":"Remember the people you meet","href":"/use-cases/remember-people"},{"title":"Keep your own promises","href":"/use-cases/keep-your-promises"},{"title":"Think out loud, keep the thought","href":"/use-cases/think-out-loud"},{"title":"Stop re-solving the same bug","href":"/use-cases/stop-resolving-the-same-bug"}]},{"group":"Build","pages":[{"title":"The three calls you actually need","href":"/use-cases/the-three-calls"},{"title":"One line, keep your OpenAI SDK","href":"/use-cases/drop-in-proxy"},{"title":"Chat with your documents","href":"/use-cases/chat-with-your-documents"},{"title":"Turn a meeting recording into memory","href":"/use-cases/meeting-recording-to-memory"},{"title":"Backfill a year of history","href":"/use-cases/backfill-history"},{"title":"Know the moment ingestion finishes","href":"/use-cases/events-not-polling"},{"title":"Teach it your vocabulary","href":"/use-cases/teach-it-your-vocabulary"},{"title":"Browse what it knows","href":"/use-cases/browse-what-it-knows"},{"title":"One space or many?","href":"/use-cases/one-space-or-many"},{"title":"Stop a runaway import","href":"/use-cases/stop-a-runaway-import"}]},{"group":"Support","pages":[{"title":"Support agent that knows each customer","href":"/use-cases/support-agent-per-customer"},{"title":"Everything you know about one user","href":"/use-cases/one-user-profile"},{"title":"Support memory the whole team shares","href":"/use-cases/shared-team-support-memory"},{"title":"Tutor that remembers the learner","href":"/use-cases/tutor-that-remembers"}]},{"group":"Research","pages":[{"title":"Who your agent keeps meeting","href":"/use-cases/entity-graph"},{"title":"What was true back then","href":"/use-cases/what-was-true-back-then"},{"title":"Competitive intelligence that accumulates","href":"/use-cases/competitive-intelligence"},{"title":"Financial analyst across quarters","href":"/use-cases/financial-analyst"},{"title":"Contract and policy memory","href":"/use-cases/contract-and-policy-memory"},{"title":"A briefing that keeps itself current","href":"/use-cases/self-refreshing-briefing"},{"title":"Give the space a mission","href":"/use-cases/give-the-space-a-mission"},{"title":"A shelf of standing questions","href":"/use-cases/a-shelf-of-standing-questions"}]},{"group":"Team","pages":[{"title":"Two agents, one space","href":"/use-cases/two-agents-one-space"},{"title":"Memory for your coding agent","href":"/use-cases/memory-for-your-coding-agent"},{"title":"Onboarding agent for new hires","href":"/use-cases/onboarding-agent"},{"title":"Search across everything the company knows","href":"/use-cases/company-wide-search"},{"title":"Incident copilot that has read every postmortem","href":"/use-cases/incident-copilot"},{"title":"Account memory that outlives the rep","href":"/use-cases/account-memory"},{"title":"Candidate memory across interviewers","href":"/use-cases/candidate-memory"}]},{"group":"Governance","pages":[{"title":"Why the answer used what it used","href":"/use-cases/why-the-answer-used-what-it-used"},{"title":"Correct a memory without losing the record","href":"/use-cases/correct-a-memory"},{"title":"Delete a user's memories, provably","description":"A data-subject request answered end to end: find everything about one person, export it, remove it, show your work.","href":"/use-cases/delete-a-users-memories"},{"title":"Cut the bill without cutting recall","href":"/use-cases/cut-the-bill"},{"title":"Prove the memory is earning its place","description":"Run the same questions with memory on and off, and keep the number instead of the impression.","href":"/use-cases/prove-memory-helps"},{"title":"Choose the model a space thinks with","href":"/use-cases/choose-the-model"},{"title":"Take everything with you","href":"/use-cases/take-everything-with-you"}]}]},{"group":"Legal","pages":[{"title":"Subprocessors","href":"/legal/subprocessors"}]},{"group":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},"title":"Cut the bill without cutting recall - Anona Memory","buildId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","deploymentId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","dynamics":[],"chunks":[]}