[{"data":1,"prerenderedAt":10629},["ShallowReactive",2],{"guides-/guides/ai-memory":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"navigation":10,"body":11,"_type":10624,"_id":10625,"_source":9358,"_file":10626,"_stem":10627,"_extension":10628},"/guides/ai-memory","guides",false,"","AI Memory","Give your AI agents persistent, per-user memory — conversations, distilled facts, and prompt-ready working context",{"title":8},{"type":12,"children":13,"toc":10556},"root",[14,23,38,51,65,72,77,132,137,143,155,288,307,336,342,347,356,368,379,398,410,415,421,426,450,1685,1690,1758,1769,1773,1778,1798,1805,1932,1943,1949,1977,2278,2284,2289,2306,2534,2552,2747,2752,2758,2872,2878,2891,2982,3001,3004,3010,3015,3021,3033,3096,3101,3263,3276,3281,3335,3491,3612,3624,3630,3641,3779,3784,3807,3812,3818,3830,3885,4038,4043,4076,4079,4085,4096,4106,4112,4379,4400,4406,4411,4482,4501,4507,4532,4722,4727,4733,4767,4772,4778,4783,4832,4837,4840,4846,4851,4863,4868,5001,5006,5016,5027,5032,5160,5169,5181,5186,5298,5308,5317,5323,5328,5732,5744,5747,5753,5764,5769,5995,6008,6014,6019,6027,6039,6045,6227,6233,6238,6241,6247,6266,6339,6351,6536,6563,6652,6665,6744,6749,6757,6760,6766,6779,6791,7235,7240,7287,7290,7296,7302,7307,7580,7585,7591,7596,7627,7633,7638,7774,7780,7798,7966,7972,7977,8150,8155,8158,8164,8170,8204,8210,8222,8228,8259,8265,8284,8297,8309,8315,8328,8331,8337,8342,8351,8683,8692,9193,9202,9252,9261,9337,9343,9361,9621,9630,9852,9861,10001,10010,10204,10213,10361,10367,10372,10408,10427,10503,10509,10550],{"type":15,"tag":16,"props":17,"children":19},"element","h1",{"id":18},"ai-memory-guide",[20],{"type":21,"value":22},"text","AI Memory Guide",{"type":15,"tag":24,"props":25,"children":26},"p",{},[27,29,36],{"type":21,"value":28},"You've used ",{"type":15,"tag":30,"props":31,"children":33},"a",{"href":32},"/guides/ai-agents",[34],{"type":21,"value":35},"AI Agents",{"type":21,"value":37}," to call an LLM from an Appivo action. The agent answers the question in front of it, then forgets everything. The next time the user shows up, the agent has no idea who they are, what they prefer, or what was decided yesterday.",{"type":15,"tag":24,"props":39,"children":40},{},[41,43,49],{"type":21,"value":42},"This guide is about turning that around. Appivo ships a memory subsystem that lets your AI features behave like they ",{"type":15,"tag":44,"props":45,"children":46},"strong",{},[47],{"type":21,"value":48},"remember",{"type":21,"value":50}," — picking up where the user left off, recalling preferences, knowing facts the user established days or weeks ago.",{"type":15,"tag":24,"props":52,"children":53},{},[54,56,63],{"type":21,"value":55},"It's all reachable through the ",{"type":15,"tag":57,"props":58,"children":60},"code",{"className":59},[],[61],{"type":21,"value":62},"context",{"type":21,"value":64}," object inside any action. Multi-tenant and per-user isolation are automatic; you do not have to think about them.",{"type":15,"tag":66,"props":67,"children":69},"h2",{"id":68},"when-to-use-this",[70],{"type":21,"value":71},"When To Use This",{"type":15,"tag":24,"props":73,"children":74},{},[75],{"type":21,"value":76},"Reach for the memory subsystem whenever your AI feature should:",{"type":15,"tag":78,"props":79,"children":80},"ul",{},[81,92,102,112,122],{"type":15,"tag":82,"props":83,"children":84},"li",{},[85,90],{"type":15,"tag":44,"props":86,"children":87},{},[88],{"type":21,"value":89},"Continue a conversation",{"type":21,"value":91}," the user started earlier — yesterday, last week, or a month ago.",{"type":15,"tag":82,"props":93,"children":94},{},[95,100],{"type":15,"tag":44,"props":96,"children":97},{},[98],{"type":21,"value":99},"Recall preferences and identity facts",{"type":21,"value":101}," (\"I'm vegetarian\", \"my role is CTO\", \"my deadline is Friday\") without re-asking.",{"type":15,"tag":82,"props":103,"children":104},{},[105,110],{"type":15,"tag":44,"props":106,"children":107},{},[108],{"type":21,"value":109},"Reason about change over time",{"type":21,"value":111}," — what did the user believe last month vs. now.",{"type":15,"tag":82,"props":113,"children":114},{},[115,120],{"type":15,"tag":44,"props":116,"children":117},{},[118],{"type":21,"value":119},"Build a prompt",{"type":21,"value":121}," that mixes recent chat, a rolling summary, and the most relevant remembered facts — automatically, within a token budget.",{"type":15,"tag":82,"props":123,"children":124},{},[125,130],{"type":15,"tag":44,"props":126,"children":127},{},[128],{"type":21,"value":129},"Satisfy GDPR",{"type":21,"value":131}," export and delete requests with a single call.",{"type":15,"tag":24,"props":133,"children":134},{},[135],{"type":21,"value":136},"If your AI feature is one-shot (\"translate this text\", \"clean this HTML\"), you don't need memory. Use it when continuity matters.",{"type":15,"tag":66,"props":138,"children":140},{"id":139},"what-you-get",[141],{"type":21,"value":142},"What You Get",{"type":15,"tag":24,"props":144,"children":145},{},[146,148,153],{"type":21,"value":147},"The platform gives you four cooperating capabilities, all accessible through the ",{"type":15,"tag":57,"props":149,"children":151},{"className":150},[],[152],{"type":21,"value":62},{"type":21,"value":154}," object inside any action.",{"type":15,"tag":156,"props":157,"children":158},"table",{},[159,183],{"type":15,"tag":160,"props":161,"children":162},"thead",{},[163],{"type":15,"tag":164,"props":165,"children":166},"tr",{},[167,173,178],{"type":15,"tag":168,"props":169,"children":170},"th",{},[171],{"type":21,"value":172},"Capability",{"type":15,"tag":168,"props":174,"children":175},{},[176],{"type":21,"value":177},"Accessor",{"type":15,"tag":168,"props":179,"children":180},{},[181],{"type":21,"value":182},"What it does",{"type":15,"tag":184,"props":185,"children":186},"tbody",{},[187,213,238,263],{"type":15,"tag":164,"props":188,"children":189},{},[190,199,208],{"type":15,"tag":191,"props":192,"children":193},"td",{},[194],{"type":15,"tag":44,"props":195,"children":196},{},[197],{"type":21,"value":198},"Conversations",{"type":15,"tag":191,"props":200,"children":201},{},[202],{"type":15,"tag":57,"props":203,"children":205},{"className":204},[],[206],{"type":21,"value":207},"context.getConversations()",{"type":15,"tag":191,"props":209,"children":210},{},[211],{"type":21,"value":212},"Persist user/assistant turns, scoped per user, replayable later.",{"type":15,"tag":164,"props":214,"children":215},{},[216,224,233],{"type":15,"tag":191,"props":217,"children":218},{},[219],{"type":15,"tag":44,"props":220,"children":221},{},[222],{"type":21,"value":223},"Memory",{"type":15,"tag":191,"props":225,"children":226},{},[227],{"type":15,"tag":57,"props":228,"children":230},{"className":229},[],[231],{"type":21,"value":232},"context.getMemory()",{"type":15,"tag":191,"props":234,"children":235},{},[236],{"type":21,"value":237},"Long-term storage of distilled facts (\"atoms\") plus the entities they refer to.",{"type":15,"tag":164,"props":239,"children":240},{},[241,249,258],{"type":15,"tag":191,"props":242,"children":243},{},[244],{"type":15,"tag":44,"props":245,"children":246},{},[247],{"type":21,"value":248},"Working Context",{"type":15,"tag":191,"props":250,"children":251},{},[252],{"type":15,"tag":57,"props":253,"children":255},{"className":254},[],[256],{"type":21,"value":257},"context.getWorkingContext()",{"type":15,"tag":191,"props":259,"children":260},{},[261],{"type":21,"value":262},"Compose a prompt-ready block from the conversation tail, the rolling summary, and recalled memories.",{"type":15,"tag":164,"props":264,"children":265},{},[266,274,283],{"type":15,"tag":191,"props":267,"children":268},{},[269],{"type":15,"tag":44,"props":270,"children":271},{},[272],{"type":21,"value":273},"Admin (GDPR)",{"type":15,"tag":191,"props":275,"children":276},{},[277],{"type":15,"tag":57,"props":278,"children":280},{"className":279},[],[281],{"type":21,"value":282},"context.getAIAdmin()",{"type":15,"tag":191,"props":284,"children":285},{},[286],{"type":21,"value":287},"Export or delete a user's full footprint — single call, every collection.",{"type":15,"tag":24,"props":289,"children":290},{},[291,293,298,300,305],{"type":21,"value":292},"Every capability is ",{"type":15,"tag":44,"props":294,"children":295},{},[296],{"type":21,"value":297},"multi-tenant",{"type":21,"value":299}," and ",{"type":15,"tag":44,"props":301,"children":302},{},[303],{"type":21,"value":304},"per-user",{"type":21,"value":306}," by default. Cross-user reads are impossible by construction; you don't write tenant checks.",{"type":15,"tag":24,"props":308,"children":309},{},[310,312,318,320,326,328,334],{"type":21,"value":311},"The same capabilities are available over REST at ",{"type":15,"tag":57,"props":313,"children":315},{"className":314},[],[316],{"type":21,"value":317},"/ai-conversations",{"type":21,"value":319},", ",{"type":15,"tag":57,"props":321,"children":323},{"className":322},[],[324],{"type":21,"value":325},"/ai-memory",{"type":21,"value":327},", and ",{"type":15,"tag":57,"props":329,"children":331},{"className":330},[],[332],{"type":21,"value":333},"/ai-working-context",{"type":21,"value":335}," for non-JS clients (mobile, third-party integrations). This guide focuses on the JavaScript surface — that's where Actions live.",{"type":15,"tag":66,"props":337,"children":339},{"id":338},"the-mental-model-in-one-picture",[340],{"type":21,"value":341},"The Mental Model In One Picture",{"type":15,"tag":24,"props":343,"children":344},{},[345],{"type":21,"value":346},"If you take away one thing from this guide, take this:",{"type":15,"tag":348,"props":349,"children":351},"pre",{"code":350},"       Conversation                     Memory\n       ──────────────                   ──────\n       (short-term,                     (long-term, bi-temporal,\n        verbatim, replayable)            distilled, recallable)\n\n   ┌──────────────────────┐         ┌──────────────────────┐\n   │  user: \"I prefer     │         │ atom: \"User prefers  │\n   │   meetings on        │   ───►  │   morning meetings.\" │\n   │   Tuesday mornings.\" │         │                      │\n   │                      │         │   importance: 4      │\n   │  ai:   \"Got it!\"     │         │   validFrom: 2026... │\n   │                      │         │   confidence: 0.95   │\n   └──────────────────────┘         └──────────────────────┘\n        ▲                                       │\n        │                                       │\n        │     extraction                        │  recall\n        │     (event-driven,                    │  (BY_TOPIC,\n        │      runs on close)                   │   BY_ENTITY,\n        │                                       │   TIMELINE)\n        │                                       ▼\n        │                            ┌──────────────────────┐\n        └────────────────────────────┤  Working Context     │\n                                     │   = summary          │\n                                     │   + relevant atoms   │\n                                     │   + recent turns     │\n                                     │   ──► next prompt    │\n                                     └──────────────────────┘\n",[352],{"type":15,"tag":57,"props":353,"children":354},{"__ignoreMap":7},[355],{"type":21,"value":350},{"type":15,"tag":24,"props":357,"children":358},{},[359,361,366],{"type":21,"value":360},"A ",{"type":15,"tag":44,"props":362,"children":363},{},[364],{"type":21,"value":365},"conversation",{"type":21,"value":367}," is an append-only stream of messages — the verbatim record of what was said. It is short-term: you may keep it forever, but you would not feed all of it back into the LLM every turn.",{"type":15,"tag":24,"props":369,"children":370},{},[371,372,377],{"type":21,"value":360},{"type":15,"tag":44,"props":373,"children":374},{},[375],{"type":21,"value":376},"memory atom",{"type":21,"value":378}," is a single, distilled fact extracted from a conversation (or written directly). It is structured: it has a category, an importance score, a validity window, and links back to the source messages. Atoms live forever and accumulate into the user's long-term memory.",{"type":15,"tag":24,"props":380,"children":381},{},[382,384,389,391,396],{"type":21,"value":383},"The bridge between them is ",{"type":15,"tag":44,"props":385,"children":386},{},[387],{"type":21,"value":388},"extraction",{"type":21,"value":390}," — when a conversation closes, the platform runs an LLM over its content, produces atoms, and writes them to memory. You don't write that code; the platform does it for you. You just configure a ",{"type":15,"tag":44,"props":392,"children":393},{},[394],{"type":21,"value":395},"binding",{"type":21,"value":397}," that says \"conversations in this namespace produce atoms in this memory space.\"",{"type":15,"tag":24,"props":399,"children":400},{},[401,403,408],{"type":21,"value":402},"When the user starts a new conversation, the ",{"type":15,"tag":44,"props":404,"children":405},{},[406],{"type":21,"value":407},"working context builder",{"type":21,"value":409}," assembles a prompt block: the rolling summary of past turns, the relevant atoms recalled by topic, and the recent message tail. You feed that into the LLM and the LLM behaves as if it remembers.",{"type":15,"tag":24,"props":411,"children":412},{},[413],{"type":21,"value":414},"That's the whole story. Everything below is mechanics.",{"type":15,"tag":66,"props":416,"children":418},{"id":417},"quick-start-a-chatbot-with-memory",[419],{"type":21,"value":420},"Quick Start: A Chatbot With Memory",{"type":15,"tag":24,"props":422,"children":423},{},[424],{"type":21,"value":425},"Let's build the simplest useful case end-to-end. We'll write an action that powers a daily check-in chatbot. It should:",{"type":15,"tag":427,"props":428,"children":429},"ol",{},[430,435,440,445],{"type":15,"tag":82,"props":431,"children":432},{},[433],{"type":21,"value":434},"Continue an existing conversation if there is one.",{"type":15,"tag":82,"props":436,"children":437},{},[438],{"type":21,"value":439},"Build a working context that pulls in the user's identity facts and goals.",{"type":15,"tag":82,"props":441,"children":442},{},[443],{"type":21,"value":444},"Run a turn (LLM call).",{"type":15,"tag":82,"props":446,"children":447},{},[448],{"type":21,"value":449},"Persist everything.",{"type":15,"tag":348,"props":451,"children":455},{"code":452,"language":453,"meta":7,"className":454,"style":7},"// Action: dailyCheckin\n// arguments: { userMessage }\n// returns: { reply }\nfunction dailyCheckin(arguments) {\n    var conv   = context.getConversations();\n    var memory = context.getMemory();\n    var wc     = context.getWorkingContext();\n\n    // 1. Find or create today's conversation\n    var existing = conv.listConversations({}).find(function(c) {\n        return c.namespace === \"daily-checkin\" && c.status === \"open\";\n    });\n    var conversation = existing || conv.createConversation({\n        namespace: \"daily-checkin\",\n        title:     \"Daily check-in\",\n        metadata:  { date: new Date().toISOString().slice(0, 10) }\n    });\n\n    // 2. Find or create the memory space we extract into\n    var space = memory.listMemorySpaces({}).find(function(s) {\n        return s.name === \"checkin\";\n    });\n    if (!space) {\n        space = memory.createMemorySpace({ name: \"checkin\" });\n    }\n\n    // 3. Assemble the working context: rolling summary +\n    //    semantic recall + recent turns\n    var ctx = wc.buildWorkingContext(conversation.id, {\n        memorySpaceId: space.id,\n        recallQuery:   arguments.userMessage,\n        recentTurns:   8,\n        recallLimit:   6,\n        alwaysOnCategoryNames: [\"identity\", \"preference\", \"goal\"]\n    });\n\n    // 4. Run the LLM — runTurn does the dance for you\n    var outcome = conv.runTurn(conversation.id, {\n        provider: \"anthropic\",\n        model:    \"claude-sonnet-4-5\",\n        userText: arguments.userMessage,\n        options:  { systemPrompt: ctx.contextBlock }\n    });\n\n    var reply = outcome.appendedMessages\n        .filter(function(m) { return m.role === \"assistant\"; })\n        .map(function(m) {\n            return m.content\n                .filter(function(b) { return b.type === \"text\"; })\n                .map(function(b) { return b.text; }).join(\"\");\n        })\n        .join(\"\\n\");\n\n    return { reply: reply };\n}\n","javascript","language-javascript shiki shiki-themes github-light github-dark",[456],{"type":15,"tag":57,"props":457,"children":458},{"__ignoreMap":7},[459,471,480,489,522,556,586,616,626,635,693,742,751,791,810,828,890,898,906,915,971,997,1005,1029,1066,1075,1083,1092,1101,1133,1142,1160,1178,1196,1233,1241,1249,1258,1288,1306,1324,1341,1350,1358,1366,1388,1448,1481,1495,1551,1611,1620,1654,1662,1676],{"type":15,"tag":460,"props":461,"children":464},"span",{"class":462,"line":463},"line",1,[465],{"type":15,"tag":460,"props":466,"children":468},{"style":467},"--shiki-default:#6A737D;--shiki-dark:#6A737D",[469],{"type":21,"value":470},"// Action: dailyCheckin\n",{"type":15,"tag":460,"props":472,"children":474},{"class":462,"line":473},2,[475],{"type":15,"tag":460,"props":476,"children":477},{"style":467},[478],{"type":21,"value":479},"// arguments: { userMessage }\n",{"type":15,"tag":460,"props":481,"children":483},{"class":462,"line":482},3,[484],{"type":15,"tag":460,"props":485,"children":486},{"style":467},[487],{"type":21,"value":488},"// returns: { reply }\n",{"type":15,"tag":460,"props":490,"children":492},{"class":462,"line":491},4,[493,499,505,511,517],{"type":15,"tag":460,"props":494,"children":496},{"style":495},"--shiki-default:#D73A49;--shiki-dark:#F97583",[497],{"type":21,"value":498},"function",{"type":15,"tag":460,"props":500,"children":502},{"style":501},"--shiki-default:#6F42C1;--shiki-dark:#B392F0",[503],{"type":21,"value":504}," dailyCheckin",{"type":15,"tag":460,"props":506,"children":508},{"style":507},"--shiki-default:#24292E;--shiki-dark:#E1E4E8",[509],{"type":21,"value":510},"(",{"type":15,"tag":460,"props":512,"children":514},{"style":513},"--shiki-default:#E36209;--shiki-dark:#FFAB70",[515],{"type":21,"value":516},"arguments",{"type":15,"tag":460,"props":518,"children":519},{"style":507},[520],{"type":21,"value":521},") {\n",{"type":15,"tag":460,"props":523,"children":525},{"class":462,"line":524},5,[526,531,536,541,546,551],{"type":15,"tag":460,"props":527,"children":528},{"style":495},[529],{"type":21,"value":530},"    var",{"type":15,"tag":460,"props":532,"children":533},{"style":507},[534],{"type":21,"value":535}," conv   ",{"type":15,"tag":460,"props":537,"children":538},{"style":495},[539],{"type":21,"value":540},"=",{"type":15,"tag":460,"props":542,"children":543},{"style":507},[544],{"type":21,"value":545}," context.",{"type":15,"tag":460,"props":547,"children":548},{"style":501},[549],{"type":21,"value":550},"getConversations",{"type":15,"tag":460,"props":552,"children":553},{"style":507},[554],{"type":21,"value":555},"();\n",{"type":15,"tag":460,"props":557,"children":559},{"class":462,"line":558},6,[560,564,569,573,577,582],{"type":15,"tag":460,"props":561,"children":562},{"style":495},[563],{"type":21,"value":530},{"type":15,"tag":460,"props":565,"children":566},{"style":507},[567],{"type":21,"value":568}," memory ",{"type":15,"tag":460,"props":570,"children":571},{"style":495},[572],{"type":21,"value":540},{"type":15,"tag":460,"props":574,"children":575},{"style":507},[576],{"type":21,"value":545},{"type":15,"tag":460,"props":578,"children":579},{"style":501},[580],{"type":21,"value":581},"getMemory",{"type":15,"tag":460,"props":583,"children":584},{"style":507},[585],{"type":21,"value":555},{"type":15,"tag":460,"props":587,"children":589},{"class":462,"line":588},7,[590,594,599,603,607,612],{"type":15,"tag":460,"props":591,"children":592},{"style":495},[593],{"type":21,"value":530},{"type":15,"tag":460,"props":595,"children":596},{"style":507},[597],{"type":21,"value":598}," wc     ",{"type":15,"tag":460,"props":600,"children":601},{"style":495},[602],{"type":21,"value":540},{"type":15,"tag":460,"props":604,"children":605},{"style":507},[606],{"type":21,"value":545},{"type":15,"tag":460,"props":608,"children":609},{"style":501},[610],{"type":21,"value":611},"getWorkingContext",{"type":15,"tag":460,"props":613,"children":614},{"style":507},[615],{"type":21,"value":555},{"type":15,"tag":460,"props":617,"children":619},{"class":462,"line":618},8,[620],{"type":15,"tag":460,"props":621,"children":623},{"emptyLinePlaceholder":622},true,[624],{"type":21,"value":625},"\n",{"type":15,"tag":460,"props":627,"children":629},{"class":462,"line":628},9,[630],{"type":15,"tag":460,"props":631,"children":632},{"style":467},[633],{"type":21,"value":634},"    // 1. Find or create today's conversation\n",{"type":15,"tag":460,"props":636,"children":638},{"class":462,"line":637},10,[639,643,648,652,657,662,667,672,676,680,684,689],{"type":15,"tag":460,"props":640,"children":641},{"style":495},[642],{"type":21,"value":530},{"type":15,"tag":460,"props":644,"children":645},{"style":507},[646],{"type":21,"value":647}," existing ",{"type":15,"tag":460,"props":649,"children":650},{"style":495},[651],{"type":21,"value":540},{"type":15,"tag":460,"props":653,"children":654},{"style":507},[655],{"type":21,"value":656}," conv.",{"type":15,"tag":460,"props":658,"children":659},{"style":501},[660],{"type":21,"value":661},"listConversations",{"type":15,"tag":460,"props":663,"children":664},{"style":507},[665],{"type":21,"value":666},"({}).",{"type":15,"tag":460,"props":668,"children":669},{"style":501},[670],{"type":21,"value":671},"find",{"type":15,"tag":460,"props":673,"children":674},{"style":507},[675],{"type":21,"value":510},{"type":15,"tag":460,"props":677,"children":678},{"style":495},[679],{"type":21,"value":498},{"type":15,"tag":460,"props":681,"children":682},{"style":507},[683],{"type":21,"value":510},{"type":15,"tag":460,"props":685,"children":686},{"style":513},[687],{"type":21,"value":688},"c",{"type":15,"tag":460,"props":690,"children":691},{"style":507},[692],{"type":21,"value":521},{"type":15,"tag":460,"props":694,"children":696},{"class":462,"line":695},11,[697,702,707,712,718,723,728,732,737],{"type":15,"tag":460,"props":698,"children":699},{"style":495},[700],{"type":21,"value":701},"        return",{"type":15,"tag":460,"props":703,"children":704},{"style":507},[705],{"type":21,"value":706}," c.namespace ",{"type":15,"tag":460,"props":708,"children":709},{"style":495},[710],{"type":21,"value":711},"===",{"type":15,"tag":460,"props":713,"children":715},{"style":714},"--shiki-default:#032F62;--shiki-dark:#9ECBFF",[716],{"type":21,"value":717}," \"daily-checkin\"",{"type":15,"tag":460,"props":719,"children":720},{"style":495},[721],{"type":21,"value":722}," &&",{"type":15,"tag":460,"props":724,"children":725},{"style":507},[726],{"type":21,"value":727}," c.status ",{"type":15,"tag":460,"props":729,"children":730},{"style":495},[731],{"type":21,"value":711},{"type":15,"tag":460,"props":733,"children":734},{"style":714},[735],{"type":21,"value":736}," \"open\"",{"type":15,"tag":460,"props":738,"children":739},{"style":507},[740],{"type":21,"value":741},";\n",{"type":15,"tag":460,"props":743,"children":745},{"class":462,"line":744},12,[746],{"type":15,"tag":460,"props":747,"children":748},{"style":507},[749],{"type":21,"value":750},"    });\n",{"type":15,"tag":460,"props":752,"children":754},{"class":462,"line":753},13,[755,759,764,768,772,777,781,786],{"type":15,"tag":460,"props":756,"children":757},{"style":495},[758],{"type":21,"value":530},{"type":15,"tag":460,"props":760,"children":761},{"style":507},[762],{"type":21,"value":763}," conversation ",{"type":15,"tag":460,"props":765,"children":766},{"style":495},[767],{"type":21,"value":540},{"type":15,"tag":460,"props":769,"children":770},{"style":507},[771],{"type":21,"value":647},{"type":15,"tag":460,"props":773,"children":774},{"style":495},[775],{"type":21,"value":776},"||",{"type":15,"tag":460,"props":778,"children":779},{"style":507},[780],{"type":21,"value":656},{"type":15,"tag":460,"props":782,"children":783},{"style":501},[784],{"type":21,"value":785},"createConversation",{"type":15,"tag":460,"props":787,"children":788},{"style":507},[789],{"type":21,"value":790},"({\n",{"type":15,"tag":460,"props":792,"children":794},{"class":462,"line":793},14,[795,800,805],{"type":15,"tag":460,"props":796,"children":797},{"style":507},[798],{"type":21,"value":799},"        namespace: ",{"type":15,"tag":460,"props":801,"children":802},{"style":714},[803],{"type":21,"value":804},"\"daily-checkin\"",{"type":15,"tag":460,"props":806,"children":807},{"style":507},[808],{"type":21,"value":809},",\n",{"type":15,"tag":460,"props":811,"children":813},{"class":462,"line":812},15,[814,819,824],{"type":15,"tag":460,"props":815,"children":816},{"style":507},[817],{"type":21,"value":818},"        title:     ",{"type":15,"tag":460,"props":820,"children":821},{"style":714},[822],{"type":21,"value":823},"\"Daily check-in\"",{"type":15,"tag":460,"props":825,"children":826},{"style":507},[827],{"type":21,"value":809},{"type":15,"tag":460,"props":829,"children":831},{"class":462,"line":830},16,[832,837,842,847,852,857,861,866,870,876,880,885],{"type":15,"tag":460,"props":833,"children":834},{"style":507},[835],{"type":21,"value":836},"        metadata:  { date: ",{"type":15,"tag":460,"props":838,"children":839},{"style":495},[840],{"type":21,"value":841},"new",{"type":15,"tag":460,"props":843,"children":844},{"style":501},[845],{"type":21,"value":846}," Date",{"type":15,"tag":460,"props":848,"children":849},{"style":507},[850],{"type":21,"value":851},"().",{"type":15,"tag":460,"props":853,"children":854},{"style":501},[855],{"type":21,"value":856},"toISOString",{"type":15,"tag":460,"props":858,"children":859},{"style":507},[860],{"type":21,"value":851},{"type":15,"tag":460,"props":862,"children":863},{"style":501},[864],{"type":21,"value":865},"slice",{"type":15,"tag":460,"props":867,"children":868},{"style":507},[869],{"type":21,"value":510},{"type":15,"tag":460,"props":871,"children":873},{"style":872},"--shiki-default:#005CC5;--shiki-dark:#79B8FF",[874],{"type":21,"value":875},"0",{"type":15,"tag":460,"props":877,"children":878},{"style":507},[879],{"type":21,"value":319},{"type":15,"tag":460,"props":881,"children":882},{"style":872},[883],{"type":21,"value":884},"10",{"type":15,"tag":460,"props":886,"children":887},{"style":507},[888],{"type":21,"value":889},") }\n",{"type":15,"tag":460,"props":891,"children":893},{"class":462,"line":892},17,[894],{"type":15,"tag":460,"props":895,"children":896},{"style":507},[897],{"type":21,"value":750},{"type":15,"tag":460,"props":899,"children":901},{"class":462,"line":900},18,[902],{"type":15,"tag":460,"props":903,"children":904},{"emptyLinePlaceholder":622},[905],{"type":21,"value":625},{"type":15,"tag":460,"props":907,"children":909},{"class":462,"line":908},19,[910],{"type":15,"tag":460,"props":911,"children":912},{"style":467},[913],{"type":21,"value":914},"    // 2. Find or create the memory space we extract into\n",{"type":15,"tag":460,"props":916,"children":918},{"class":462,"line":917},20,[919,923,928,932,937,942,946,950,954,958,962,967],{"type":15,"tag":460,"props":920,"children":921},{"style":495},[922],{"type":21,"value":530},{"type":15,"tag":460,"props":924,"children":925},{"style":507},[926],{"type":21,"value":927}," space ",{"type":15,"tag":460,"props":929,"children":930},{"style":495},[931],{"type":21,"value":540},{"type":15,"tag":460,"props":933,"children":934},{"style":507},[935],{"type":21,"value":936}," memory.",{"type":15,"tag":460,"props":938,"children":939},{"style":501},[940],{"type":21,"value":941},"listMemorySpaces",{"type":15,"tag":460,"props":943,"children":944},{"style":507},[945],{"type":21,"value":666},{"type":15,"tag":460,"props":947,"children":948},{"style":501},[949],{"type":21,"value":671},{"type":15,"tag":460,"props":951,"children":952},{"style":507},[953],{"type":21,"value":510},{"type":15,"tag":460,"props":955,"children":956},{"style":495},[957],{"type":21,"value":498},{"type":15,"tag":460,"props":959,"children":960},{"style":507},[961],{"type":21,"value":510},{"type":15,"tag":460,"props":963,"children":964},{"style":513},[965],{"type":21,"value":966},"s",{"type":15,"tag":460,"props":968,"children":969},{"style":507},[970],{"type":21,"value":521},{"type":15,"tag":460,"props":972,"children":974},{"class":462,"line":973},21,[975,979,984,988,993],{"type":15,"tag":460,"props":976,"children":977},{"style":495},[978],{"type":21,"value":701},{"type":15,"tag":460,"props":980,"children":981},{"style":507},[982],{"type":21,"value":983}," s.name ",{"type":15,"tag":460,"props":985,"children":986},{"style":495},[987],{"type":21,"value":711},{"type":15,"tag":460,"props":989,"children":990},{"style":714},[991],{"type":21,"value":992}," \"checkin\"",{"type":15,"tag":460,"props":994,"children":995},{"style":507},[996],{"type":21,"value":741},{"type":15,"tag":460,"props":998,"children":1000},{"class":462,"line":999},22,[1001],{"type":15,"tag":460,"props":1002,"children":1003},{"style":507},[1004],{"type":21,"value":750},{"type":15,"tag":460,"props":1006,"children":1008},{"class":462,"line":1007},23,[1009,1014,1019,1024],{"type":15,"tag":460,"props":1010,"children":1011},{"style":495},[1012],{"type":21,"value":1013},"    if",{"type":15,"tag":460,"props":1015,"children":1016},{"style":507},[1017],{"type":21,"value":1018}," (",{"type":15,"tag":460,"props":1020,"children":1021},{"style":495},[1022],{"type":21,"value":1023},"!",{"type":15,"tag":460,"props":1025,"children":1026},{"style":507},[1027],{"type":21,"value":1028},"space) {\n",{"type":15,"tag":460,"props":1030,"children":1032},{"class":462,"line":1031},24,[1033,1038,1042,1046,1051,1056,1061],{"type":15,"tag":460,"props":1034,"children":1035},{"style":507},[1036],{"type":21,"value":1037},"        space ",{"type":15,"tag":460,"props":1039,"children":1040},{"style":495},[1041],{"type":21,"value":540},{"type":15,"tag":460,"props":1043,"children":1044},{"style":507},[1045],{"type":21,"value":936},{"type":15,"tag":460,"props":1047,"children":1048},{"style":501},[1049],{"type":21,"value":1050},"createMemorySpace",{"type":15,"tag":460,"props":1052,"children":1053},{"style":507},[1054],{"type":21,"value":1055},"({ name: ",{"type":15,"tag":460,"props":1057,"children":1058},{"style":714},[1059],{"type":21,"value":1060},"\"checkin\"",{"type":15,"tag":460,"props":1062,"children":1063},{"style":507},[1064],{"type":21,"value":1065}," });\n",{"type":15,"tag":460,"props":1067,"children":1069},{"class":462,"line":1068},25,[1070],{"type":15,"tag":460,"props":1071,"children":1072},{"style":507},[1073],{"type":21,"value":1074},"    }\n",{"type":15,"tag":460,"props":1076,"children":1078},{"class":462,"line":1077},26,[1079],{"type":15,"tag":460,"props":1080,"children":1081},{"emptyLinePlaceholder":622},[1082],{"type":21,"value":625},{"type":15,"tag":460,"props":1084,"children":1086},{"class":462,"line":1085},27,[1087],{"type":15,"tag":460,"props":1088,"children":1089},{"style":467},[1090],{"type":21,"value":1091},"    // 3. Assemble the working context: rolling summary +\n",{"type":15,"tag":460,"props":1093,"children":1095},{"class":462,"line":1094},28,[1096],{"type":15,"tag":460,"props":1097,"children":1098},{"style":467},[1099],{"type":21,"value":1100},"    //    semantic recall + recent turns\n",{"type":15,"tag":460,"props":1102,"children":1104},{"class":462,"line":1103},29,[1105,1109,1114,1118,1123,1128],{"type":15,"tag":460,"props":1106,"children":1107},{"style":495},[1108],{"type":21,"value":530},{"type":15,"tag":460,"props":1110,"children":1111},{"style":507},[1112],{"type":21,"value":1113}," ctx ",{"type":15,"tag":460,"props":1115,"children":1116},{"style":495},[1117],{"type":21,"value":540},{"type":15,"tag":460,"props":1119,"children":1120},{"style":507},[1121],{"type":21,"value":1122}," wc.",{"type":15,"tag":460,"props":1124,"children":1125},{"style":501},[1126],{"type":21,"value":1127},"buildWorkingContext",{"type":15,"tag":460,"props":1129,"children":1130},{"style":507},[1131],{"type":21,"value":1132},"(conversation.id, {\n",{"type":15,"tag":460,"props":1134,"children":1136},{"class":462,"line":1135},30,[1137],{"type":15,"tag":460,"props":1138,"children":1139},{"style":507},[1140],{"type":21,"value":1141},"        memorySpaceId: space.id,\n",{"type":15,"tag":460,"props":1143,"children":1145},{"class":462,"line":1144},31,[1146,1151,1155],{"type":15,"tag":460,"props":1147,"children":1148},{"style":507},[1149],{"type":21,"value":1150},"        recallQuery:   ",{"type":15,"tag":460,"props":1152,"children":1153},{"style":872},[1154],{"type":21,"value":516},{"type":15,"tag":460,"props":1156,"children":1157},{"style":507},[1158],{"type":21,"value":1159},".userMessage,\n",{"type":15,"tag":460,"props":1161,"children":1163},{"class":462,"line":1162},32,[1164,1169,1174],{"type":15,"tag":460,"props":1165,"children":1166},{"style":507},[1167],{"type":21,"value":1168},"        recentTurns:   ",{"type":15,"tag":460,"props":1170,"children":1171},{"style":872},[1172],{"type":21,"value":1173},"8",{"type":15,"tag":460,"props":1175,"children":1176},{"style":507},[1177],{"type":21,"value":809},{"type":15,"tag":460,"props":1179,"children":1181},{"class":462,"line":1180},33,[1182,1187,1192],{"type":15,"tag":460,"props":1183,"children":1184},{"style":507},[1185],{"type":21,"value":1186},"        recallLimit:   ",{"type":15,"tag":460,"props":1188,"children":1189},{"style":872},[1190],{"type":21,"value":1191},"6",{"type":15,"tag":460,"props":1193,"children":1194},{"style":507},[1195],{"type":21,"value":809},{"type":15,"tag":460,"props":1197,"children":1199},{"class":462,"line":1198},34,[1200,1205,1210,1214,1219,1223,1228],{"type":15,"tag":460,"props":1201,"children":1202},{"style":507},[1203],{"type":21,"value":1204},"        alwaysOnCategoryNames: [",{"type":15,"tag":460,"props":1206,"children":1207},{"style":714},[1208],{"type":21,"value":1209},"\"identity\"",{"type":15,"tag":460,"props":1211,"children":1212},{"style":507},[1213],{"type":21,"value":319},{"type":15,"tag":460,"props":1215,"children":1216},{"style":714},[1217],{"type":21,"value":1218},"\"preference\"",{"type":15,"tag":460,"props":1220,"children":1221},{"style":507},[1222],{"type":21,"value":319},{"type":15,"tag":460,"props":1224,"children":1225},{"style":714},[1226],{"type":21,"value":1227},"\"goal\"",{"type":15,"tag":460,"props":1229,"children":1230},{"style":507},[1231],{"type":21,"value":1232},"]\n",{"type":15,"tag":460,"props":1234,"children":1236},{"class":462,"line":1235},35,[1237],{"type":15,"tag":460,"props":1238,"children":1239},{"style":507},[1240],{"type":21,"value":750},{"type":15,"tag":460,"props":1242,"children":1244},{"class":462,"line":1243},36,[1245],{"type":15,"tag":460,"props":1246,"children":1247},{"emptyLinePlaceholder":622},[1248],{"type":21,"value":625},{"type":15,"tag":460,"props":1250,"children":1252},{"class":462,"line":1251},37,[1253],{"type":15,"tag":460,"props":1254,"children":1255},{"style":467},[1256],{"type":21,"value":1257},"    // 4. Run the LLM — runTurn does the dance for you\n",{"type":15,"tag":460,"props":1259,"children":1261},{"class":462,"line":1260},38,[1262,1266,1271,1275,1279,1284],{"type":15,"tag":460,"props":1263,"children":1264},{"style":495},[1265],{"type":21,"value":530},{"type":15,"tag":460,"props":1267,"children":1268},{"style":507},[1269],{"type":21,"value":1270}," outcome ",{"type":15,"tag":460,"props":1272,"children":1273},{"style":495},[1274],{"type":21,"value":540},{"type":15,"tag":460,"props":1276,"children":1277},{"style":507},[1278],{"type":21,"value":656},{"type":15,"tag":460,"props":1280,"children":1281},{"style":501},[1282],{"type":21,"value":1283},"runTurn",{"type":15,"tag":460,"props":1285,"children":1286},{"style":507},[1287],{"type":21,"value":1132},{"type":15,"tag":460,"props":1289,"children":1291},{"class":462,"line":1290},39,[1292,1297,1302],{"type":15,"tag":460,"props":1293,"children":1294},{"style":507},[1295],{"type":21,"value":1296},"        provider: ",{"type":15,"tag":460,"props":1298,"children":1299},{"style":714},[1300],{"type":21,"value":1301},"\"anthropic\"",{"type":15,"tag":460,"props":1303,"children":1304},{"style":507},[1305],{"type":21,"value":809},{"type":15,"tag":460,"props":1307,"children":1309},{"class":462,"line":1308},40,[1310,1315,1320],{"type":15,"tag":460,"props":1311,"children":1312},{"style":507},[1313],{"type":21,"value":1314},"        model:    ",{"type":15,"tag":460,"props":1316,"children":1317},{"style":714},[1318],{"type":21,"value":1319},"\"claude-sonnet-4-5\"",{"type":15,"tag":460,"props":1321,"children":1322},{"style":507},[1323],{"type":21,"value":809},{"type":15,"tag":460,"props":1325,"children":1327},{"class":462,"line":1326},41,[1328,1333,1337],{"type":15,"tag":460,"props":1329,"children":1330},{"style":507},[1331],{"type":21,"value":1332},"        userText: ",{"type":15,"tag":460,"props":1334,"children":1335},{"style":872},[1336],{"type":21,"value":516},{"type":15,"tag":460,"props":1338,"children":1339},{"style":507},[1340],{"type":21,"value":1159},{"type":15,"tag":460,"props":1342,"children":1344},{"class":462,"line":1343},42,[1345],{"type":15,"tag":460,"props":1346,"children":1347},{"style":507},[1348],{"type":21,"value":1349},"        options:  { systemPrompt: ctx.contextBlock }\n",{"type":15,"tag":460,"props":1351,"children":1353},{"class":462,"line":1352},43,[1354],{"type":15,"tag":460,"props":1355,"children":1356},{"style":507},[1357],{"type":21,"value":750},{"type":15,"tag":460,"props":1359,"children":1361},{"class":462,"line":1360},44,[1362],{"type":15,"tag":460,"props":1363,"children":1364},{"emptyLinePlaceholder":622},[1365],{"type":21,"value":625},{"type":15,"tag":460,"props":1367,"children":1369},{"class":462,"line":1368},45,[1370,1374,1379,1383],{"type":15,"tag":460,"props":1371,"children":1372},{"style":495},[1373],{"type":21,"value":530},{"type":15,"tag":460,"props":1375,"children":1376},{"style":507},[1377],{"type":21,"value":1378}," reply ",{"type":15,"tag":460,"props":1380,"children":1381},{"style":495},[1382],{"type":21,"value":540},{"type":15,"tag":460,"props":1384,"children":1385},{"style":507},[1386],{"type":21,"value":1387}," outcome.appendedMessages\n",{"type":15,"tag":460,"props":1389,"children":1391},{"class":462,"line":1390},46,[1392,1397,1402,1406,1410,1414,1419,1424,1429,1434,1438,1443],{"type":15,"tag":460,"props":1393,"children":1394},{"style":507},[1395],{"type":21,"value":1396},"        .",{"type":15,"tag":460,"props":1398,"children":1399},{"style":501},[1400],{"type":21,"value":1401},"filter",{"type":15,"tag":460,"props":1403,"children":1404},{"style":507},[1405],{"type":21,"value":510},{"type":15,"tag":460,"props":1407,"children":1408},{"style":495},[1409],{"type":21,"value":498},{"type":15,"tag":460,"props":1411,"children":1412},{"style":507},[1413],{"type":21,"value":510},{"type":15,"tag":460,"props":1415,"children":1416},{"style":513},[1417],{"type":21,"value":1418},"m",{"type":15,"tag":460,"props":1420,"children":1421},{"style":507},[1422],{"type":21,"value":1423},") { ",{"type":15,"tag":460,"props":1425,"children":1426},{"style":495},[1427],{"type":21,"value":1428},"return",{"type":15,"tag":460,"props":1430,"children":1431},{"style":507},[1432],{"type":21,"value":1433}," m.role ",{"type":15,"tag":460,"props":1435,"children":1436},{"style":495},[1437],{"type":21,"value":711},{"type":15,"tag":460,"props":1439,"children":1440},{"style":714},[1441],{"type":21,"value":1442}," \"assistant\"",{"type":15,"tag":460,"props":1444,"children":1445},{"style":507},[1446],{"type":21,"value":1447},"; })\n",{"type":15,"tag":460,"props":1449,"children":1451},{"class":462,"line":1450},47,[1452,1456,1461,1465,1469,1473,1477],{"type":15,"tag":460,"props":1453,"children":1454},{"style":507},[1455],{"type":21,"value":1396},{"type":15,"tag":460,"props":1457,"children":1458},{"style":501},[1459],{"type":21,"value":1460},"map",{"type":15,"tag":460,"props":1462,"children":1463},{"style":507},[1464],{"type":21,"value":510},{"type":15,"tag":460,"props":1466,"children":1467},{"style":495},[1468],{"type":21,"value":498},{"type":15,"tag":460,"props":1470,"children":1471},{"style":507},[1472],{"type":21,"value":510},{"type":15,"tag":460,"props":1474,"children":1475},{"style":513},[1476],{"type":21,"value":1418},{"type":15,"tag":460,"props":1478,"children":1479},{"style":507},[1480],{"type":21,"value":521},{"type":15,"tag":460,"props":1482,"children":1484},{"class":462,"line":1483},48,[1485,1490],{"type":15,"tag":460,"props":1486,"children":1487},{"style":495},[1488],{"type":21,"value":1489},"            return",{"type":15,"tag":460,"props":1491,"children":1492},{"style":507},[1493],{"type":21,"value":1494}," m.content\n",{"type":15,"tag":460,"props":1496,"children":1498},{"class":462,"line":1497},49,[1499,1504,1508,1512,1516,1520,1525,1529,1533,1538,1542,1547],{"type":15,"tag":460,"props":1500,"children":1501},{"style":507},[1502],{"type":21,"value":1503},"                .",{"type":15,"tag":460,"props":1505,"children":1506},{"style":501},[1507],{"type":21,"value":1401},{"type":15,"tag":460,"props":1509,"children":1510},{"style":507},[1511],{"type":21,"value":510},{"type":15,"tag":460,"props":1513,"children":1514},{"style":495},[1515],{"type":21,"value":498},{"type":15,"tag":460,"props":1517,"children":1518},{"style":507},[1519],{"type":21,"value":510},{"type":15,"tag":460,"props":1521,"children":1522},{"style":513},[1523],{"type":21,"value":1524},"b",{"type":15,"tag":460,"props":1526,"children":1527},{"style":507},[1528],{"type":21,"value":1423},{"type":15,"tag":460,"props":1530,"children":1531},{"style":495},[1532],{"type":21,"value":1428},{"type":15,"tag":460,"props":1534,"children":1535},{"style":507},[1536],{"type":21,"value":1537}," b.type ",{"type":15,"tag":460,"props":1539,"children":1540},{"style":495},[1541],{"type":21,"value":711},{"type":15,"tag":460,"props":1543,"children":1544},{"style":714},[1545],{"type":21,"value":1546}," \"text\"",{"type":15,"tag":460,"props":1548,"children":1549},{"style":507},[1550],{"type":21,"value":1447},{"type":15,"tag":460,"props":1552,"children":1554},{"class":462,"line":1553},50,[1555,1559,1563,1567,1571,1575,1579,1583,1587,1592,1597,1601,1606],{"type":15,"tag":460,"props":1556,"children":1557},{"style":507},[1558],{"type":21,"value":1503},{"type":15,"tag":460,"props":1560,"children":1561},{"style":501},[1562],{"type":21,"value":1460},{"type":15,"tag":460,"props":1564,"children":1565},{"style":507},[1566],{"type":21,"value":510},{"type":15,"tag":460,"props":1568,"children":1569},{"style":495},[1570],{"type":21,"value":498},{"type":15,"tag":460,"props":1572,"children":1573},{"style":507},[1574],{"type":21,"value":510},{"type":15,"tag":460,"props":1576,"children":1577},{"style":513},[1578],{"type":21,"value":1524},{"type":15,"tag":460,"props":1580,"children":1581},{"style":507},[1582],{"type":21,"value":1423},{"type":15,"tag":460,"props":1584,"children":1585},{"style":495},[1586],{"type":21,"value":1428},{"type":15,"tag":460,"props":1588,"children":1589},{"style":507},[1590],{"type":21,"value":1591}," b.text; }).",{"type":15,"tag":460,"props":1593,"children":1594},{"style":501},[1595],{"type":21,"value":1596},"join",{"type":15,"tag":460,"props":1598,"children":1599},{"style":507},[1600],{"type":21,"value":510},{"type":15,"tag":460,"props":1602,"children":1603},{"style":714},[1604],{"type":21,"value":1605},"\"\"",{"type":15,"tag":460,"props":1607,"children":1608},{"style":507},[1609],{"type":21,"value":1610},");\n",{"type":15,"tag":460,"props":1612,"children":1614},{"class":462,"line":1613},51,[1615],{"type":15,"tag":460,"props":1616,"children":1617},{"style":507},[1618],{"type":21,"value":1619},"        })\n",{"type":15,"tag":460,"props":1621,"children":1623},{"class":462,"line":1622},52,[1624,1628,1632,1636,1641,1646,1650],{"type":15,"tag":460,"props":1625,"children":1626},{"style":507},[1627],{"type":21,"value":1396},{"type":15,"tag":460,"props":1629,"children":1630},{"style":501},[1631],{"type":21,"value":1596},{"type":15,"tag":460,"props":1633,"children":1634},{"style":507},[1635],{"type":21,"value":510},{"type":15,"tag":460,"props":1637,"children":1638},{"style":714},[1639],{"type":21,"value":1640},"\"",{"type":15,"tag":460,"props":1642,"children":1643},{"style":872},[1644],{"type":21,"value":1645},"\\n",{"type":15,"tag":460,"props":1647,"children":1648},{"style":714},[1649],{"type":21,"value":1640},{"type":15,"tag":460,"props":1651,"children":1652},{"style":507},[1653],{"type":21,"value":1610},{"type":15,"tag":460,"props":1655,"children":1657},{"class":462,"line":1656},53,[1658],{"type":15,"tag":460,"props":1659,"children":1660},{"emptyLinePlaceholder":622},[1661],{"type":21,"value":625},{"type":15,"tag":460,"props":1663,"children":1665},{"class":462,"line":1664},54,[1666,1671],{"type":15,"tag":460,"props":1667,"children":1668},{"style":495},[1669],{"type":21,"value":1670},"    return",{"type":15,"tag":460,"props":1672,"children":1673},{"style":507},[1674],{"type":21,"value":1675}," { reply: reply };\n",{"type":15,"tag":460,"props":1677,"children":1679},{"class":462,"line":1678},55,[1680],{"type":15,"tag":460,"props":1681,"children":1682},{"style":507},[1683],{"type":21,"value":1684},"}\n",{"type":15,"tag":24,"props":1686,"children":1687},{},[1688],{"type":21,"value":1689},"That's the whole app. A few things worth noticing:",{"type":15,"tag":78,"props":1691,"children":1692},{},[1693,1711,1753],{"type":15,"tag":82,"props":1694,"children":1695},{},[1696,1698,1702,1704,1709],{"type":21,"value":1697},"We never wrote anything to memory ourselves. When the conversation eventually closes (typically when the user finishes their session, or via a scheduled job that closes stale conversations), a ",{"type":15,"tag":44,"props":1699,"children":1700},{},[1701],{"type":21,"value":395},{"type":21,"value":1703}," will fire extraction automatically. The atoms it produces will be there the next time we call ",{"type":15,"tag":57,"props":1705,"children":1707},{"className":1706},[],[1708],{"type":21,"value":1127},{"type":21,"value":1710}," for this user.",{"type":15,"tag":82,"props":1712,"children":1713},{},[1714,1720,1722,1728,1729,1735,1737,1743,1745,1751],{"type":15,"tag":57,"props":1715,"children":1717},{"className":1716},[],[1718],{"type":21,"value":1719},"alwaysOnCategoryNames",{"type":21,"value":1721}," pulls in atoms tagged ",{"type":15,"tag":57,"props":1723,"children":1725},{"className":1724},[],[1726],{"type":21,"value":1727},"identity",{"type":21,"value":319},{"type":15,"tag":57,"props":1730,"children":1732},{"className":1731},[],[1733],{"type":21,"value":1734},"preference",{"type":21,"value":1736},", or ",{"type":15,"tag":57,"props":1738,"children":1740},{"className":1739},[],[1741],{"type":21,"value":1742},"goal",{"type":21,"value":1744}," regardless of the query — those are the facts you almost always want present. The ",{"type":15,"tag":57,"props":1746,"children":1748},{"className":1747},[],[1749],{"type":21,"value":1750},"recallQuery",{"type":21,"value":1752}," handles anything topic-specific.",{"type":15,"tag":82,"props":1754,"children":1755},{},[1756],{"type":21,"value":1757},"We did not pass any user id — the platform reads the active user from the action context. Multi-tenancy is automatic.",{"type":15,"tag":24,"props":1759,"children":1760},{},[1761,1763,1767],{"type":21,"value":1762},"The next sections explain each step in depth, plus the one-time ",{"type":15,"tag":44,"props":1764,"children":1765},{},[1766],{"type":21,"value":395},{"type":21,"value":1768}," setup you need before extraction will actually run.",{"type":15,"tag":1770,"props":1771,"children":1772},"hr",{},[],{"type":15,"tag":66,"props":1774,"children":1776},{"id":1775},"conversations",[1777],{"type":21,"value":198},{"type":15,"tag":24,"props":1779,"children":1780},{},[1781,1783,1788,1790,1796],{"type":21,"value":1782},"A conversation in Appivo is more than a chat window — it's a ",{"type":15,"tag":44,"props":1784,"children":1785},{},[1786],{"type":21,"value":1787},"scoped, append-only event stream",{"type":21,"value":1789},". Every message you append is permanent. Every change emits an event on the internal message bus. Every conversation is partitioned by the four-tuple ",{"type":15,"tag":57,"props":1791,"children":1793},{"className":1792},[],[1794],{"type":21,"value":1795},"(tenantId, appId, namespace, userId)",{"type":21,"value":1797},", so cross-tenant or cross-user reads cannot happen.",{"type":15,"tag":1799,"props":1800,"children":1802},"h3",{"id":1801},"the-four-tuple",[1803],{"type":21,"value":1804},"The Four-Tuple",{"type":15,"tag":156,"props":1806,"children":1807},{},[1808,1829],{"type":15,"tag":160,"props":1809,"children":1810},{},[1811],{"type":15,"tag":164,"props":1812,"children":1813},{},[1814,1819,1824],{"type":15,"tag":168,"props":1815,"children":1816},{},[1817],{"type":21,"value":1818},"Component",{"type":15,"tag":168,"props":1820,"children":1821},{},[1822],{"type":21,"value":1823},"Where it comes from",{"type":15,"tag":168,"props":1825,"children":1826},{},[1827],{"type":21,"value":1828},"What it controls",{"type":15,"tag":184,"props":1830,"children":1831},{},[1832,1854,1876,1910],{"type":15,"tag":164,"props":1833,"children":1834},{},[1835,1844,1849],{"type":15,"tag":191,"props":1836,"children":1837},{},[1838],{"type":15,"tag":57,"props":1839,"children":1841},{"className":1840},[],[1842],{"type":21,"value":1843},"tenantId",{"type":15,"tag":191,"props":1845,"children":1846},{},[1847],{"type":21,"value":1848},"Auth filter (thread-local)",{"type":15,"tag":191,"props":1850,"children":1851},{},[1852],{"type":21,"value":1853},"Tenant boundary — strict isolation",{"type":15,"tag":164,"props":1855,"children":1856},{},[1857,1866,1871],{"type":15,"tag":191,"props":1858,"children":1859},{},[1860],{"type":15,"tag":57,"props":1861,"children":1863},{"className":1862},[],[1864],{"type":21,"value":1865},"appId",{"type":15,"tag":191,"props":1867,"children":1868},{},[1869],{"type":21,"value":1870},"The active app schema",{"type":15,"tag":191,"props":1872,"children":1873},{},[1874],{"type":21,"value":1875},"Which Appivo app owns the conversation",{"type":15,"tag":164,"props":1877,"children":1878},{},[1879,1888,1893],{"type":15,"tag":191,"props":1880,"children":1881},{},[1882],{"type":15,"tag":57,"props":1883,"children":1885},{"className":1884},[],[1886],{"type":21,"value":1887},"namespace",{"type":15,"tag":191,"props":1889,"children":1890},{},[1891],{"type":21,"value":1892},"You choose, per call",{"type":15,"tag":191,"props":1894,"children":1895},{},[1896,1898,1903,1904],{"type":21,"value":1897},"App-internal partition, e.g. ",{"type":15,"tag":57,"props":1899,"children":1901},{"className":1900},[],[1902],{"type":21,"value":804},{"type":21,"value":319},{"type":15,"tag":57,"props":1905,"children":1907},{"className":1906},[],[1908],{"type":21,"value":1909},"\"support-chat\"",{"type":15,"tag":164,"props":1911,"children":1912},{},[1913,1922,1927],{"type":15,"tag":191,"props":1914,"children":1915},{},[1916],{"type":15,"tag":57,"props":1917,"children":1919},{"className":1918},[],[1920],{"type":21,"value":1921},"userId",{"type":15,"tag":191,"props":1923,"children":1924},{},[1925],{"type":21,"value":1926},"The current user",{"type":15,"tag":191,"props":1928,"children":1929},{},[1930],{"type":21,"value":1931},"Conversation owner",{"type":15,"tag":24,"props":1933,"children":1934},{},[1935,1937,1941],{"type":21,"value":1936},"The first three are derived for you. You only ever supply the ",{"type":15,"tag":44,"props":1938,"children":1939},{},[1940],{"type":21,"value":1887},{"type":21,"value":1942},". Pick a stable name per \"kind\" of conversation your app has — it's the seam at which bindings and recall hook in.",{"type":15,"tag":1799,"props":1944,"children":1946},{"id":1945},"lifecycle-open-closed",[1947],{"type":21,"value":1948},"Lifecycle: Open → Closed",{"type":15,"tag":24,"props":1950,"children":1951},{},[1952,1954,1960,1961,1967,1969,1975],{"type":21,"value":1953},"Conversations have two lifecycle states: ",{"type":15,"tag":57,"props":1955,"children":1957},{"className":1956},[],[1958],{"type":21,"value":1959},"open",{"type":21,"value":299},{"type":15,"tag":57,"props":1962,"children":1964},{"className":1963},[],[1965],{"type":21,"value":1966},"closed",{"type":21,"value":1968},". You can append while open; you cannot append once closed. Closing emits a ",{"type":15,"tag":57,"props":1970,"children":1972},{"className":1971},[],[1973],{"type":21,"value":1974},"conversation.closed",{"type":21,"value":1976}," event, which is what triggers memory extraction.",{"type":15,"tag":348,"props":1978,"children":1980},{"code":1979,"language":453,"meta":7,"className":454,"style":7},"var conv = context.getConversations();\n\n// Create\nvar c = conv.createConversation({\n    namespace: \"support-chat\",\n    title:     \"Refund question\",\n    metadata:  { source: \"web\", priority: \"normal\" }\n});\n// c.id, c.status === \"open\", c.createdAt\n\n// Append\nconv.appendUserMessage(c.id, { content: \"Hi, where's my refund?\" });\nconv.appendAssistantTurn(c.id, {\n    content:    \"Looking it up now...\",\n    stopReason: \"end_turn\",\n    model:      \"claude-sonnet-4-5\"\n});\n\n// Close — idempotent; re-closing is a no-op and fires no second event\nconv.closeConversation(c.id);\n",[1981],{"type":15,"tag":57,"props":1982,"children":1983},{"__ignoreMap":7},[1984,2013,2020,2028,2056,2072,2089,2117,2125,2133,2140,2148,2175,2192,2209,2226,2239,2246,2253,2261],{"type":15,"tag":460,"props":1985,"children":1986},{"class":462,"line":463},[1987,1992,1997,2001,2005,2009],{"type":15,"tag":460,"props":1988,"children":1989},{"style":495},[1990],{"type":21,"value":1991},"var",{"type":15,"tag":460,"props":1993,"children":1994},{"style":507},[1995],{"type":21,"value":1996}," conv ",{"type":15,"tag":460,"props":1998,"children":1999},{"style":495},[2000],{"type":21,"value":540},{"type":15,"tag":460,"props":2002,"children":2003},{"style":507},[2004],{"type":21,"value":545},{"type":15,"tag":460,"props":2006,"children":2007},{"style":501},[2008],{"type":21,"value":550},{"type":15,"tag":460,"props":2010,"children":2011},{"style":507},[2012],{"type":21,"value":555},{"type":15,"tag":460,"props":2014,"children":2015},{"class":462,"line":473},[2016],{"type":15,"tag":460,"props":2017,"children":2018},{"emptyLinePlaceholder":622},[2019],{"type":21,"value":625},{"type":15,"tag":460,"props":2021,"children":2022},{"class":462,"line":482},[2023],{"type":15,"tag":460,"props":2024,"children":2025},{"style":467},[2026],{"type":21,"value":2027},"// Create\n",{"type":15,"tag":460,"props":2029,"children":2030},{"class":462,"line":491},[2031,2035,2040,2044,2048,2052],{"type":15,"tag":460,"props":2032,"children":2033},{"style":495},[2034],{"type":21,"value":1991},{"type":15,"tag":460,"props":2036,"children":2037},{"style":507},[2038],{"type":21,"value":2039}," c ",{"type":15,"tag":460,"props":2041,"children":2042},{"style":495},[2043],{"type":21,"value":540},{"type":15,"tag":460,"props":2045,"children":2046},{"style":507},[2047],{"type":21,"value":656},{"type":15,"tag":460,"props":2049,"children":2050},{"style":501},[2051],{"type":21,"value":785},{"type":15,"tag":460,"props":2053,"children":2054},{"style":507},[2055],{"type":21,"value":790},{"type":15,"tag":460,"props":2057,"children":2058},{"class":462,"line":524},[2059,2064,2068],{"type":15,"tag":460,"props":2060,"children":2061},{"style":507},[2062],{"type":21,"value":2063},"    namespace: ",{"type":15,"tag":460,"props":2065,"children":2066},{"style":714},[2067],{"type":21,"value":1909},{"type":15,"tag":460,"props":2069,"children":2070},{"style":507},[2071],{"type":21,"value":809},{"type":15,"tag":460,"props":2073,"children":2074},{"class":462,"line":558},[2075,2080,2085],{"type":15,"tag":460,"props":2076,"children":2077},{"style":507},[2078],{"type":21,"value":2079},"    title:     ",{"type":15,"tag":460,"props":2081,"children":2082},{"style":714},[2083],{"type":21,"value":2084},"\"Refund question\"",{"type":15,"tag":460,"props":2086,"children":2087},{"style":507},[2088],{"type":21,"value":809},{"type":15,"tag":460,"props":2090,"children":2091},{"class":462,"line":588},[2092,2097,2102,2107,2112],{"type":15,"tag":460,"props":2093,"children":2094},{"style":507},[2095],{"type":21,"value":2096},"    metadata:  { source: ",{"type":15,"tag":460,"props":2098,"children":2099},{"style":714},[2100],{"type":21,"value":2101},"\"web\"",{"type":15,"tag":460,"props":2103,"children":2104},{"style":507},[2105],{"type":21,"value":2106},", priority: ",{"type":15,"tag":460,"props":2108,"children":2109},{"style":714},[2110],{"type":21,"value":2111},"\"normal\"",{"type":15,"tag":460,"props":2113,"children":2114},{"style":507},[2115],{"type":21,"value":2116}," }\n",{"type":15,"tag":460,"props":2118,"children":2119},{"class":462,"line":618},[2120],{"type":15,"tag":460,"props":2121,"children":2122},{"style":507},[2123],{"type":21,"value":2124},"});\n",{"type":15,"tag":460,"props":2126,"children":2127},{"class":462,"line":628},[2128],{"type":15,"tag":460,"props":2129,"children":2130},{"style":467},[2131],{"type":21,"value":2132},"// c.id, c.status === \"open\", c.createdAt\n",{"type":15,"tag":460,"props":2134,"children":2135},{"class":462,"line":637},[2136],{"type":15,"tag":460,"props":2137,"children":2138},{"emptyLinePlaceholder":622},[2139],{"type":21,"value":625},{"type":15,"tag":460,"props":2141,"children":2142},{"class":462,"line":695},[2143],{"type":15,"tag":460,"props":2144,"children":2145},{"style":467},[2146],{"type":21,"value":2147},"// Append\n",{"type":15,"tag":460,"props":2149,"children":2150},{"class":462,"line":744},[2151,2156,2161,2166,2171],{"type":15,"tag":460,"props":2152,"children":2153},{"style":507},[2154],{"type":21,"value":2155},"conv.",{"type":15,"tag":460,"props":2157,"children":2158},{"style":501},[2159],{"type":21,"value":2160},"appendUserMessage",{"type":15,"tag":460,"props":2162,"children":2163},{"style":507},[2164],{"type":21,"value":2165},"(c.id, { content: ",{"type":15,"tag":460,"props":2167,"children":2168},{"style":714},[2169],{"type":21,"value":2170},"\"Hi, where's my refund?\"",{"type":15,"tag":460,"props":2172,"children":2173},{"style":507},[2174],{"type":21,"value":1065},{"type":15,"tag":460,"props":2176,"children":2177},{"class":462,"line":753},[2178,2182,2187],{"type":15,"tag":460,"props":2179,"children":2180},{"style":507},[2181],{"type":21,"value":2155},{"type":15,"tag":460,"props":2183,"children":2184},{"style":501},[2185],{"type":21,"value":2186},"appendAssistantTurn",{"type":15,"tag":460,"props":2188,"children":2189},{"style":507},[2190],{"type":21,"value":2191},"(c.id, {\n",{"type":15,"tag":460,"props":2193,"children":2194},{"class":462,"line":793},[2195,2200,2205],{"type":15,"tag":460,"props":2196,"children":2197},{"style":507},[2198],{"type":21,"value":2199},"    content:    ",{"type":15,"tag":460,"props":2201,"children":2202},{"style":714},[2203],{"type":21,"value":2204},"\"Looking it up now...\"",{"type":15,"tag":460,"props":2206,"children":2207},{"style":507},[2208],{"type":21,"value":809},{"type":15,"tag":460,"props":2210,"children":2211},{"class":462,"line":812},[2212,2217,2222],{"type":15,"tag":460,"props":2213,"children":2214},{"style":507},[2215],{"type":21,"value":2216},"    stopReason: ",{"type":15,"tag":460,"props":2218,"children":2219},{"style":714},[2220],{"type":21,"value":2221},"\"end_turn\"",{"type":15,"tag":460,"props":2223,"children":2224},{"style":507},[2225],{"type":21,"value":809},{"type":15,"tag":460,"props":2227,"children":2228},{"class":462,"line":830},[2229,2234],{"type":15,"tag":460,"props":2230,"children":2231},{"style":507},[2232],{"type":21,"value":2233},"    model:      ",{"type":15,"tag":460,"props":2235,"children":2236},{"style":714},[2237],{"type":21,"value":2238},"\"claude-sonnet-4-5\"\n",{"type":15,"tag":460,"props":2240,"children":2241},{"class":462,"line":892},[2242],{"type":15,"tag":460,"props":2243,"children":2244},{"style":507},[2245],{"type":21,"value":2124},{"type":15,"tag":460,"props":2247,"children":2248},{"class":462,"line":900},[2249],{"type":15,"tag":460,"props":2250,"children":2251},{"emptyLinePlaceholder":622},[2252],{"type":21,"value":625},{"type":15,"tag":460,"props":2254,"children":2255},{"class":462,"line":908},[2256],{"type":15,"tag":460,"props":2257,"children":2258},{"style":467},[2259],{"type":21,"value":2260},"// Close — idempotent; re-closing is a no-op and fires no second event\n",{"type":15,"tag":460,"props":2262,"children":2263},{"class":462,"line":917},[2264,2268,2273],{"type":15,"tag":460,"props":2265,"children":2266},{"style":507},[2267],{"type":21,"value":2155},{"type":15,"tag":460,"props":2269,"children":2270},{"style":501},[2271],{"type":21,"value":2272},"closeConversation",{"type":15,"tag":460,"props":2274,"children":2275},{"style":507},[2276],{"type":21,"value":2277},"(c.id);\n",{"type":15,"tag":1799,"props":2279,"children":2281},{"id":2280},"two-ways-to-record-a-turn",[2282],{"type":21,"value":2283},"Two Ways To Record A Turn",{"type":15,"tag":24,"props":2285,"children":2286},{},[2287],{"type":21,"value":2288},"You have two patterns for recording a turn.",{"type":15,"tag":24,"props":2290,"children":2291},{},[2292,2304],{"type":15,"tag":44,"props":2293,"children":2294},{},[2295,2297,2302],{"type":21,"value":2296},"Pattern A — ",{"type":15,"tag":57,"props":2298,"children":2300},{"className":2299},[],[2301],{"type":21,"value":1283},{"type":21,"value":2303}," does it for you.",{"type":21,"value":2305}," Preferred when you let the platform call the LLM:",{"type":15,"tag":348,"props":2307,"children":2309},{"code":2308,"language":453,"meta":7,"className":454,"style":7},"conv.runTurn(c.id, {\n    provider: \"anthropic\",\n    model:    \"claude-sonnet-4-5\",\n    userText: \"What's my refund status?\",\n    tools:    [ /* ... */ ],\n    toolHandler: function(toolName, args) {\n        if (toolName === \"lookupRefund\") {\n            return JSON.stringify(myLookup(args.orderId));\n        }\n    }\n});\n// User message + assistant response (+ any tool turns) all persisted\n// with a shared turnId. Sequence numbers allocated atomically.\n",[2310],{"type":15,"tag":57,"props":2311,"children":2312},{"__ignoreMap":7},[2313,2328,2344,2360,2377,2395,2434,2460,2496,2504,2511,2518,2526],{"type":15,"tag":460,"props":2314,"children":2315},{"class":462,"line":463},[2316,2320,2324],{"type":15,"tag":460,"props":2317,"children":2318},{"style":507},[2319],{"type":21,"value":2155},{"type":15,"tag":460,"props":2321,"children":2322},{"style":501},[2323],{"type":21,"value":1283},{"type":15,"tag":460,"props":2325,"children":2326},{"style":507},[2327],{"type":21,"value":2191},{"type":15,"tag":460,"props":2329,"children":2330},{"class":462,"line":473},[2331,2336,2340],{"type":15,"tag":460,"props":2332,"children":2333},{"style":507},[2334],{"type":21,"value":2335},"    provider: ",{"type":15,"tag":460,"props":2337,"children":2338},{"style":714},[2339],{"type":21,"value":1301},{"type":15,"tag":460,"props":2341,"children":2342},{"style":507},[2343],{"type":21,"value":809},{"type":15,"tag":460,"props":2345,"children":2346},{"class":462,"line":482},[2347,2352,2356],{"type":15,"tag":460,"props":2348,"children":2349},{"style":507},[2350],{"type":21,"value":2351},"    model:    ",{"type":15,"tag":460,"props":2353,"children":2354},{"style":714},[2355],{"type":21,"value":1319},{"type":15,"tag":460,"props":2357,"children":2358},{"style":507},[2359],{"type":21,"value":809},{"type":15,"tag":460,"props":2361,"children":2362},{"class":462,"line":491},[2363,2368,2373],{"type":15,"tag":460,"props":2364,"children":2365},{"style":507},[2366],{"type":21,"value":2367},"    userText: ",{"type":15,"tag":460,"props":2369,"children":2370},{"style":714},[2371],{"type":21,"value":2372},"\"What's my refund status?\"",{"type":15,"tag":460,"props":2374,"children":2375},{"style":507},[2376],{"type":21,"value":809},{"type":15,"tag":460,"props":2378,"children":2379},{"class":462,"line":524},[2380,2385,2390],{"type":15,"tag":460,"props":2381,"children":2382},{"style":507},[2383],{"type":21,"value":2384},"    tools:    [ ",{"type":15,"tag":460,"props":2386,"children":2387},{"style":467},[2388],{"type":21,"value":2389},"/* ... */",{"type":15,"tag":460,"props":2391,"children":2392},{"style":507},[2393],{"type":21,"value":2394}," ],\n",{"type":15,"tag":460,"props":2396,"children":2397},{"class":462,"line":558},[2398,2403,2408,2412,2416,2421,2425,2430],{"type":15,"tag":460,"props":2399,"children":2400},{"style":501},[2401],{"type":21,"value":2402},"    toolHandler",{"type":15,"tag":460,"props":2404,"children":2405},{"style":507},[2406],{"type":21,"value":2407},": ",{"type":15,"tag":460,"props":2409,"children":2410},{"style":495},[2411],{"type":21,"value":498},{"type":15,"tag":460,"props":2413,"children":2414},{"style":507},[2415],{"type":21,"value":510},{"type":15,"tag":460,"props":2417,"children":2418},{"style":513},[2419],{"type":21,"value":2420},"toolName",{"type":15,"tag":460,"props":2422,"children":2423},{"style":507},[2424],{"type":21,"value":319},{"type":15,"tag":460,"props":2426,"children":2427},{"style":513},[2428],{"type":21,"value":2429},"args",{"type":15,"tag":460,"props":2431,"children":2432},{"style":507},[2433],{"type":21,"value":521},{"type":15,"tag":460,"props":2435,"children":2436},{"class":462,"line":588},[2437,2442,2447,2451,2456],{"type":15,"tag":460,"props":2438,"children":2439},{"style":495},[2440],{"type":21,"value":2441},"        if",{"type":15,"tag":460,"props":2443,"children":2444},{"style":507},[2445],{"type":21,"value":2446}," (toolName ",{"type":15,"tag":460,"props":2448,"children":2449},{"style":495},[2450],{"type":21,"value":711},{"type":15,"tag":460,"props":2452,"children":2453},{"style":714},[2454],{"type":21,"value":2455}," \"lookupRefund\"",{"type":15,"tag":460,"props":2457,"children":2458},{"style":507},[2459],{"type":21,"value":521},{"type":15,"tag":460,"props":2461,"children":2462},{"class":462,"line":618},[2463,2467,2472,2477,2482,2486,2491],{"type":15,"tag":460,"props":2464,"children":2465},{"style":495},[2466],{"type":21,"value":1489},{"type":15,"tag":460,"props":2468,"children":2469},{"style":872},[2470],{"type":21,"value":2471}," JSON",{"type":15,"tag":460,"props":2473,"children":2474},{"style":507},[2475],{"type":21,"value":2476},".",{"type":15,"tag":460,"props":2478,"children":2479},{"style":501},[2480],{"type":21,"value":2481},"stringify",{"type":15,"tag":460,"props":2483,"children":2484},{"style":507},[2485],{"type":21,"value":510},{"type":15,"tag":460,"props":2487,"children":2488},{"style":501},[2489],{"type":21,"value":2490},"myLookup",{"type":15,"tag":460,"props":2492,"children":2493},{"style":507},[2494],{"type":21,"value":2495},"(args.orderId));\n",{"type":15,"tag":460,"props":2497,"children":2498},{"class":462,"line":628},[2499],{"type":15,"tag":460,"props":2500,"children":2501},{"style":507},[2502],{"type":21,"value":2503},"        }\n",{"type":15,"tag":460,"props":2505,"children":2506},{"class":462,"line":637},[2507],{"type":15,"tag":460,"props":2508,"children":2509},{"style":507},[2510],{"type":21,"value":1074},{"type":15,"tag":460,"props":2512,"children":2513},{"class":462,"line":695},[2514],{"type":15,"tag":460,"props":2515,"children":2516},{"style":507},[2517],{"type":21,"value":2124},{"type":15,"tag":460,"props":2519,"children":2520},{"class":462,"line":744},[2521],{"type":15,"tag":460,"props":2522,"children":2523},{"style":467},[2524],{"type":21,"value":2525},"// User message + assistant response (+ any tool turns) all persisted\n",{"type":15,"tag":460,"props":2527,"children":2528},{"class":462,"line":753},[2529],{"type":15,"tag":460,"props":2530,"children":2531},{"style":467},[2532],{"type":21,"value":2533},"// with a shared turnId. Sequence numbers allocated atomically.\n",{"type":15,"tag":24,"props":2535,"children":2536},{},[2537,2550],{"type":15,"tag":44,"props":2538,"children":2539},{},[2540,2542,2548],{"type":21,"value":2541},"Pattern B — ",{"type":15,"tag":57,"props":2543,"children":2545},{"className":2544},[],[2546],{"type":21,"value":2547},"appendTurn",{"type":21,"value":2549}," after your own LLM call.",{"type":21,"value":2551}," Preferred when you call the LLM yourself and want the platform to persist the result:",{"type":15,"tag":348,"props":2553,"children":2555},{"code":2554,"language":453,"meta":7,"className":454,"style":7},"var llmResult = callMyOwnLLM(buildMyOwnPrompt(/* ... */));\nconv.appendTurn(c.id, {\n    userContent: arguments.userMessage,\n    assistant: {\n        content:    llmResult.text,\n        stopReason: llmResult.stopReason,\n        model:      \"claude-sonnet-4-5\",\n        usage:      { inputTokens: 1234, outputTokens: 567, latencyMs: 800 }\n    },\n    idempotencyKey: arguments.turnId   // safe retries\n});\n",[2556],{"type":15,"tag":57,"props":2557,"children":2558},{"__ignoreMap":7},[2559,2602,2617,2633,2641,2649,2657,2673,2710,2718,2740],{"type":15,"tag":460,"props":2560,"children":2561},{"class":462,"line":463},[2562,2566,2571,2575,2580,2584,2589,2593,2597],{"type":15,"tag":460,"props":2563,"children":2564},{"style":495},[2565],{"type":21,"value":1991},{"type":15,"tag":460,"props":2567,"children":2568},{"style":507},[2569],{"type":21,"value":2570}," llmResult ",{"type":15,"tag":460,"props":2572,"children":2573},{"style":495},[2574],{"type":21,"value":540},{"type":15,"tag":460,"props":2576,"children":2577},{"style":501},[2578],{"type":21,"value":2579}," callMyOwnLLM",{"type":15,"tag":460,"props":2581,"children":2582},{"style":507},[2583],{"type":21,"value":510},{"type":15,"tag":460,"props":2585,"children":2586},{"style":501},[2587],{"type":21,"value":2588},"buildMyOwnPrompt",{"type":15,"tag":460,"props":2590,"children":2591},{"style":507},[2592],{"type":21,"value":510},{"type":15,"tag":460,"props":2594,"children":2595},{"style":467},[2596],{"type":21,"value":2389},{"type":15,"tag":460,"props":2598,"children":2599},{"style":507},[2600],{"type":21,"value":2601},"));\n",{"type":15,"tag":460,"props":2603,"children":2604},{"class":462,"line":473},[2605,2609,2613],{"type":15,"tag":460,"props":2606,"children":2607},{"style":507},[2608],{"type":21,"value":2155},{"type":15,"tag":460,"props":2610,"children":2611},{"style":501},[2612],{"type":21,"value":2547},{"type":15,"tag":460,"props":2614,"children":2615},{"style":507},[2616],{"type":21,"value":2191},{"type":15,"tag":460,"props":2618,"children":2619},{"class":462,"line":482},[2620,2625,2629],{"type":15,"tag":460,"props":2621,"children":2622},{"style":507},[2623],{"type":21,"value":2624},"    userContent: ",{"type":15,"tag":460,"props":2626,"children":2627},{"style":872},[2628],{"type":21,"value":516},{"type":15,"tag":460,"props":2630,"children":2631},{"style":507},[2632],{"type":21,"value":1159},{"type":15,"tag":460,"props":2634,"children":2635},{"class":462,"line":491},[2636],{"type":15,"tag":460,"props":2637,"children":2638},{"style":507},[2639],{"type":21,"value":2640},"    assistant: {\n",{"type":15,"tag":460,"props":2642,"children":2643},{"class":462,"line":524},[2644],{"type":15,"tag":460,"props":2645,"children":2646},{"style":507},[2647],{"type":21,"value":2648},"        content:    llmResult.text,\n",{"type":15,"tag":460,"props":2650,"children":2651},{"class":462,"line":558},[2652],{"type":15,"tag":460,"props":2653,"children":2654},{"style":507},[2655],{"type":21,"value":2656},"        stopReason: llmResult.stopReason,\n",{"type":15,"tag":460,"props":2658,"children":2659},{"class":462,"line":588},[2660,2665,2669],{"type":15,"tag":460,"props":2661,"children":2662},{"style":507},[2663],{"type":21,"value":2664},"        model:      ",{"type":15,"tag":460,"props":2666,"children":2667},{"style":714},[2668],{"type":21,"value":1319},{"type":15,"tag":460,"props":2670,"children":2671},{"style":507},[2672],{"type":21,"value":809},{"type":15,"tag":460,"props":2674,"children":2675},{"class":462,"line":618},[2676,2681,2686,2691,2696,2701,2706],{"type":15,"tag":460,"props":2677,"children":2678},{"style":507},[2679],{"type":21,"value":2680},"        usage:      { inputTokens: ",{"type":15,"tag":460,"props":2682,"children":2683},{"style":872},[2684],{"type":21,"value":2685},"1234",{"type":15,"tag":460,"props":2687,"children":2688},{"style":507},[2689],{"type":21,"value":2690},", outputTokens: ",{"type":15,"tag":460,"props":2692,"children":2693},{"style":872},[2694],{"type":21,"value":2695},"567",{"type":15,"tag":460,"props":2697,"children":2698},{"style":507},[2699],{"type":21,"value":2700},", latencyMs: ",{"type":15,"tag":460,"props":2702,"children":2703},{"style":872},[2704],{"type":21,"value":2705},"800",{"type":15,"tag":460,"props":2707,"children":2708},{"style":507},[2709],{"type":21,"value":2116},{"type":15,"tag":460,"props":2711,"children":2712},{"class":462,"line":628},[2713],{"type":15,"tag":460,"props":2714,"children":2715},{"style":507},[2716],{"type":21,"value":2717},"    },\n",{"type":15,"tag":460,"props":2719,"children":2720},{"class":462,"line":637},[2721,2726,2730,2735],{"type":15,"tag":460,"props":2722,"children":2723},{"style":507},[2724],{"type":21,"value":2725},"    idempotencyKey: ",{"type":15,"tag":460,"props":2727,"children":2728},{"style":872},[2729],{"type":21,"value":516},{"type":15,"tag":460,"props":2731,"children":2732},{"style":507},[2733],{"type":21,"value":2734},".turnId   ",{"type":15,"tag":460,"props":2736,"children":2737},{"style":467},[2738],{"type":21,"value":2739},"// safe retries\n",{"type":15,"tag":460,"props":2741,"children":2742},{"class":462,"line":695},[2743],{"type":15,"tag":460,"props":2744,"children":2745},{"style":507},[2746],{"type":21,"value":2124},{"type":15,"tag":24,"props":2748,"children":2749},{},[2750],{"type":21,"value":2751},"Both patterns produce the same persistent shape, fire the same events, and feed the same downstream extraction and recall. Pick whichever fits your call site.",{"type":15,"tag":1799,"props":2753,"children":2755},{"id":2754},"reading-messages",[2756],{"type":21,"value":2757},"Reading Messages",{"type":15,"tag":348,"props":2759,"children":2761},{"code":2760,"language":453,"meta":7,"className":454,"style":7},"// Last 50 user-visible messages — what a chat UI should render.\nvar visible = conv.getMessages(c.id, { limit: 50 });\n\n// Same range but include internal messages — for replay,\n// debugging, or feeding the LLM.\nvar raw = conv.getRawTurns(c.id, { limit: 50 });\n",[2762],{"type":15,"tag":57,"props":2763,"children":2764},{"__ignoreMap":7},[2765,2773,2812,2819,2827,2835],{"type":15,"tag":460,"props":2766,"children":2767},{"class":462,"line":463},[2768],{"type":15,"tag":460,"props":2769,"children":2770},{"style":467},[2771],{"type":21,"value":2772},"// Last 50 user-visible messages — what a chat UI should render.\n",{"type":15,"tag":460,"props":2774,"children":2775},{"class":462,"line":473},[2776,2780,2785,2789,2793,2798,2803,2808],{"type":15,"tag":460,"props":2777,"children":2778},{"style":495},[2779],{"type":21,"value":1991},{"type":15,"tag":460,"props":2781,"children":2782},{"style":507},[2783],{"type":21,"value":2784}," visible ",{"type":15,"tag":460,"props":2786,"children":2787},{"style":495},[2788],{"type":21,"value":540},{"type":15,"tag":460,"props":2790,"children":2791},{"style":507},[2792],{"type":21,"value":656},{"type":15,"tag":460,"props":2794,"children":2795},{"style":501},[2796],{"type":21,"value":2797},"getMessages",{"type":15,"tag":460,"props":2799,"children":2800},{"style":507},[2801],{"type":21,"value":2802},"(c.id, { limit: ",{"type":15,"tag":460,"props":2804,"children":2805},{"style":872},[2806],{"type":21,"value":2807},"50",{"type":15,"tag":460,"props":2809,"children":2810},{"style":507},[2811],{"type":21,"value":1065},{"type":15,"tag":460,"props":2813,"children":2814},{"class":462,"line":482},[2815],{"type":15,"tag":460,"props":2816,"children":2817},{"emptyLinePlaceholder":622},[2818],{"type":21,"value":625},{"type":15,"tag":460,"props":2820,"children":2821},{"class":462,"line":491},[2822],{"type":15,"tag":460,"props":2823,"children":2824},{"style":467},[2825],{"type":21,"value":2826},"// Same range but include internal messages — for replay,\n",{"type":15,"tag":460,"props":2828,"children":2829},{"class":462,"line":524},[2830],{"type":15,"tag":460,"props":2831,"children":2832},{"style":467},[2833],{"type":21,"value":2834},"// debugging, or feeding the LLM.\n",{"type":15,"tag":460,"props":2836,"children":2837},{"class":462,"line":558},[2838,2842,2847,2851,2855,2860,2864,2868],{"type":15,"tag":460,"props":2839,"children":2840},{"style":495},[2841],{"type":21,"value":1991},{"type":15,"tag":460,"props":2843,"children":2844},{"style":507},[2845],{"type":21,"value":2846}," raw ",{"type":15,"tag":460,"props":2848,"children":2849},{"style":495},[2850],{"type":21,"value":540},{"type":15,"tag":460,"props":2852,"children":2853},{"style":507},[2854],{"type":21,"value":656},{"type":15,"tag":460,"props":2856,"children":2857},{"style":501},[2858],{"type":21,"value":2859},"getRawTurns",{"type":15,"tag":460,"props":2861,"children":2862},{"style":507},[2863],{"type":21,"value":2802},{"type":15,"tag":460,"props":2865,"children":2866},{"style":872},[2867],{"type":21,"value":2807},{"type":15,"tag":460,"props":2869,"children":2870},{"style":507},[2871],{"type":21,"value":1065},{"type":15,"tag":1799,"props":2873,"children":2875},{"id":2874},"message-visibility",[2876],{"type":21,"value":2877},"Message Visibility",{"type":15,"tag":24,"props":2879,"children":2880},{},[2881,2883,2889],{"type":21,"value":2882},"Every message has a ",{"type":15,"tag":57,"props":2884,"children":2886},{"className":2885},[],[2887],{"type":21,"value":2888},"visibility",{"type":21,"value":2890}," field with three valid values:",{"type":15,"tag":156,"props":2892,"children":2893},{},[2894,2915],{"type":15,"tag":160,"props":2895,"children":2896},{},[2897],{"type":15,"tag":164,"props":2898,"children":2899},{},[2900,2905,2910],{"type":15,"tag":168,"props":2901,"children":2902},{},[2903],{"type":21,"value":2904},"Value",{"type":15,"tag":168,"props":2906,"children":2907},{},[2908],{"type":21,"value":2909},"User sees it",{"type":15,"tag":168,"props":2911,"children":2912},{},[2913],{"type":21,"value":2914},"LLM sees it",{"type":15,"tag":184,"props":2916,"children":2917},{},[2918,2941,2962],{"type":15,"tag":164,"props":2919,"children":2920},{},[2921,2932,2937],{"type":15,"tag":191,"props":2922,"children":2923},{},[2924,2930],{"type":15,"tag":57,"props":2925,"children":2927},{"className":2926},[],[2928],{"type":21,"value":2929},"\"user\"",{"type":21,"value":2931}," (default)",{"type":15,"tag":191,"props":2933,"children":2934},{},[2935],{"type":21,"value":2936},"Yes",{"type":15,"tag":191,"props":2938,"children":2939},{},[2940],{"type":21,"value":2936},{"type":15,"tag":164,"props":2942,"children":2943},{},[2944,2953,2958],{"type":15,"tag":191,"props":2945,"children":2946},{},[2947],{"type":15,"tag":57,"props":2948,"children":2950},{"className":2949},[],[2951],{"type":21,"value":2952},"\"internal\"",{"type":15,"tag":191,"props":2954,"children":2955},{},[2956],{"type":21,"value":2957},"No",{"type":15,"tag":191,"props":2959,"children":2960},{},[2961],{"type":21,"value":2936},{"type":15,"tag":164,"props":2963,"children":2964},{},[2965,2974,2978],{"type":15,"tag":191,"props":2966,"children":2967},{},[2968],{"type":15,"tag":57,"props":2969,"children":2971},{"className":2970},[],[2972],{"type":21,"value":2973},"\"hidden\"",{"type":15,"tag":191,"props":2975,"children":2976},{},[2977],{"type":21,"value":2957},{"type":15,"tag":191,"props":2979,"children":2980},{},[2981],{"type":21,"value":2957},{"type":15,"tag":24,"props":2983,"children":2984},{},[2985,2987,2992,2994,2999],{"type":21,"value":2986},"Use ",{"type":15,"tag":57,"props":2988,"children":2990},{"className":2989},[],[2991],{"type":21,"value":2952},{"type":21,"value":2993}," for system messages, framework-injected context, or pre-/post-processing artifacts the user shouldn't see but the LLM should. Use ",{"type":15,"tag":57,"props":2995,"children":2997},{"className":2996},[],[2998],{"type":21,"value":2973},{"type":21,"value":3000}," for messages you persisted for audit but don't want any downstream LLM call to see.",{"type":15,"tag":1770,"props":3002,"children":3003},{},[],{"type":15,"tag":66,"props":3005,"children":3007},{"id":3006},"how-memories-are-stored",[3008],{"type":21,"value":3009},"How Memories Are Stored",{"type":15,"tag":24,"props":3011,"children":3012},{},[3013],{"type":21,"value":3014},"The memory store has three primitive types. Once you have the mental model for them, the recall API and the extraction pipeline are straightforward.",{"type":15,"tag":1799,"props":3016,"children":3018},{"id":3017},"atoms-the-unit-of-memory",[3019],{"type":21,"value":3020},"Atoms — The Unit Of Memory",{"type":15,"tag":24,"props":3022,"children":3023},{},[3024,3026,3031],{"type":21,"value":3025},"An ",{"type":15,"tag":44,"props":3027,"children":3028},{},[3029],{"type":21,"value":3030},"atom",{"type":21,"value":3032}," is a single, self-contained, absolute-timestamped fact. Three rules govern atoms:",{"type":15,"tag":427,"props":3034,"children":3035},{},[3036,3061,3071],{"type":15,"tag":82,"props":3037,"children":3038},{},[3039,3044,3046,3052,3054,3059],{"type":15,"tag":44,"props":3040,"children":3041},{},[3042],{"type":21,"value":3043},"Self-contained",{"type":21,"value":3045}," — the text reads correctly without any surrounding context. ",{"type":15,"tag":3047,"props":3048,"children":3049},"em",{},[3050],{"type":21,"value":3051},"\"User prefers morning meetings\"",{"type":21,"value":3053}," is an atom; ",{"type":15,"tag":3047,"props":3055,"children":3056},{},[3057],{"type":21,"value":3058},"\"Yes\"",{"type":21,"value":3060}," is not.",{"type":15,"tag":82,"props":3062,"children":3063},{},[3064,3069],{"type":15,"tag":44,"props":3065,"children":3066},{},[3067],{"type":21,"value":3068},"Append-mostly",{"type":21,"value":3070}," — when a fact changes, you don't update the old atom; you insert a new one and mark the old one superseded. The history is preserved forever.",{"type":15,"tag":82,"props":3072,"children":3073},{},[3074,3079,3081,3087,3088,3094],{"type":15,"tag":44,"props":3075,"children":3076},{},[3077],{"type":21,"value":3078},"Cited",{"type":21,"value":3080}," — every atom carries ",{"type":15,"tag":57,"props":3082,"children":3084},{"className":3083},[],[3085],{"type":21,"value":3086},"sourceConversationId",{"type":21,"value":299},{"type":15,"tag":57,"props":3089,"children":3091},{"className":3090},[],[3092],{"type":21,"value":3093},"sourceMessageIds",{"type":21,"value":3095},", so a recall result can be traced back to the originating turn.",{"type":15,"tag":24,"props":3097,"children":3098},{},[3099],{"type":21,"value":3100},"Each atom carries:",{"type":15,"tag":156,"props":3102,"children":3103},{},[3104,3120],{"type":15,"tag":160,"props":3105,"children":3106},{},[3107],{"type":15,"tag":164,"props":3108,"children":3109},{},[3110,3115],{"type":15,"tag":168,"props":3111,"children":3112},{},[3113],{"type":21,"value":3114},"Field",{"type":15,"tag":168,"props":3116,"children":3117},{},[3118],{"type":21,"value":3119},"Purpose",{"type":15,"tag":184,"props":3121,"children":3122},{},[3123,3139,3163,3180,3197,3229,3246],{"type":15,"tag":164,"props":3124,"children":3125},{},[3126,3134],{"type":15,"tag":191,"props":3127,"children":3128},{},[3129],{"type":15,"tag":57,"props":3130,"children":3132},{"className":3131},[],[3133],{"type":21,"value":21},{"type":15,"tag":191,"props":3135,"children":3136},{},[3137],{"type":21,"value":3138},"The fact itself, in natural language",{"type":15,"tag":164,"props":3140,"children":3141},{},[3142,3151],{"type":15,"tag":191,"props":3143,"children":3144},{},[3145],{"type":15,"tag":57,"props":3146,"children":3148},{"className":3147},[],[3149],{"type":21,"value":3150},"category",{"type":15,"tag":191,"props":3152,"children":3153},{},[3154,3155,3161],{"type":21,"value":360},{"type":15,"tag":57,"props":3156,"children":3158},{"className":3157},[],[3159],{"type":21,"value":3160},"(name, kind)",{"type":21,"value":3162}," tuple — see below",{"type":15,"tag":164,"props":3164,"children":3165},{},[3166,3175],{"type":15,"tag":191,"props":3167,"children":3168},{},[3169],{"type":15,"tag":57,"props":3170,"children":3172},{"className":3171},[],[3173],{"type":21,"value":3174},"importance",{"type":15,"tag":191,"props":3176,"children":3177},{},[3178],{"type":21,"value":3179},"1–5, used in recall ranking",{"type":15,"tag":164,"props":3181,"children":3182},{},[3183,3192],{"type":15,"tag":191,"props":3184,"children":3185},{},[3186],{"type":15,"tag":57,"props":3187,"children":3189},{"className":3188},[],[3190],{"type":21,"value":3191},"confidence",{"type":15,"tag":191,"props":3193,"children":3194},{},[3195],{"type":21,"value":3196},"0.0–1.0, extraction's certainty",{"type":15,"tag":164,"props":3198,"children":3199},{},[3200,3216],{"type":15,"tag":191,"props":3201,"children":3202},{},[3203,3209,3210],{"type":15,"tag":57,"props":3204,"children":3206},{"className":3205},[],[3207],{"type":21,"value":3208},"validFrom",{"type":21,"value":319},{"type":15,"tag":57,"props":3211,"children":3213},{"className":3212},[],[3214],{"type":21,"value":3215},"validTo",{"type":15,"tag":191,"props":3217,"children":3218},{},[3219,3221,3227],{"type":21,"value":3220},"Bi-temporal validity window (",{"type":15,"tag":57,"props":3222,"children":3224},{"className":3223},[],[3225],{"type":21,"value":3226},"validTo: null",{"type":21,"value":3228}," means currently valid)",{"type":15,"tag":164,"props":3230,"children":3231},{},[3232,3241],{"type":15,"tag":191,"props":3233,"children":3234},{},[3235],{"type":15,"tag":57,"props":3236,"children":3238},{"className":3237},[],[3239],{"type":21,"value":3240},"entityIds",{"type":15,"tag":191,"props":3242,"children":3243},{},[3244],{"type":21,"value":3245},"Links to the entities the atom is about",{"type":15,"tag":164,"props":3247,"children":3248},{},[3249,3258],{"type":15,"tag":191,"props":3250,"children":3251},{},[3252],{"type":15,"tag":57,"props":3253,"children":3255},{"className":3254},[],[3256],{"type":21,"value":3257},"embedding",{"type":15,"tag":191,"props":3259,"children":3260},{},[3261],{"type":21,"value":3262},"Vector for semantic recall (auto-computed)",{"type":15,"tag":1799,"props":3264,"children":3266},{"id":3265},"categories-a-name-kind-tuple",[3267,3269,3274],{"type":21,"value":3268},"Categories — A ",{"type":15,"tag":57,"props":3270,"children":3272},{"className":3271},[],[3273],{"type":21,"value":3160},{"type":21,"value":3275}," Tuple",{"type":15,"tag":24,"props":3277,"children":3278},{},[3279],{"type":21,"value":3280},"Categories let you classify atoms in app-specific ways while giving the platform enough structure to apply universal logic (decay rules, pattern-mining exclusions, etc.).",{"type":15,"tag":24,"props":3282,"children":3283},{},[3284,3286,3292,3294,3299,3300,3305,3306,3311,3312,3318,3319,3325,3327,3333],{"type":21,"value":3285},"The ",{"type":15,"tag":57,"props":3287,"children":3289},{"className":3288},[],[3290],{"type":21,"value":3291},"name",{"type":21,"value":3293}," is yours — ",{"type":15,"tag":57,"props":3295,"children":3297},{"className":3296},[],[3298],{"type":21,"value":1209},{"type":21,"value":319},{"type":15,"tag":57,"props":3301,"children":3303},{"className":3302},[],[3304],{"type":21,"value":1227},{"type":21,"value":319},{"type":15,"tag":57,"props":3307,"children":3309},{"className":3308},[],[3310],{"type":21,"value":1218},{"type":21,"value":319},{"type":15,"tag":57,"props":3313,"children":3315},{"className":3314},[],[3316],{"type":21,"value":3317},"\"contact\"",{"type":21,"value":319},{"type":15,"tag":57,"props":3320,"children":3322},{"className":3321},[],[3323],{"type":21,"value":3324},"\"medical-allergy\"",{"type":21,"value":3326},", whatever your domain needs. The ",{"type":15,"tag":57,"props":3328,"children":3330},{"className":3329},[],[3331],{"type":21,"value":3332},"kind",{"type":21,"value":3334}," is platform-defined and one of:",{"type":15,"tag":156,"props":3336,"children":3337},{},[3338,3359],{"type":15,"tag":160,"props":3339,"children":3340},{},[3341],{"type":15,"tag":164,"props":3342,"children":3343},{},[3344,3349,3354],{"type":15,"tag":168,"props":3345,"children":3346},{},[3347],{"type":21,"value":3348},"Kind",{"type":15,"tag":168,"props":3350,"children":3351},{},[3352],{"type":21,"value":3353},"Means",{"type":15,"tag":168,"props":3355,"children":3356},{},[3357],{"type":21,"value":3358},"Decay",{"type":15,"tag":184,"props":3360,"children":3361},{},[3362,3384,3405,3427,3449,3470],{"type":15,"tag":164,"props":3363,"children":3364},{},[3365,3374,3379],{"type":15,"tag":191,"props":3366,"children":3367},{},[3368],{"type":15,"tag":57,"props":3369,"children":3371},{"className":3370},[],[3372],{"type":21,"value":3373},"FACT",{"type":15,"tag":191,"props":3375,"children":3376},{},[3377],{"type":21,"value":3378},"A timeless attribute",{"type":15,"tag":191,"props":3380,"children":3381},{},[3382],{"type":21,"value":3383},"Slow",{"type":15,"tag":164,"props":3385,"children":3386},{},[3387,3396,3401],{"type":15,"tag":191,"props":3388,"children":3389},{},[3390],{"type":15,"tag":57,"props":3391,"children":3393},{"className":3392},[],[3394],{"type":21,"value":3395},"RULE",{"type":15,"tag":191,"props":3397,"children":3398},{},[3399],{"type":21,"value":3400},"A constraint or policy",{"type":15,"tag":191,"props":3402,"children":3403},{},[3404],{"type":21,"value":3383},{"type":15,"tag":164,"props":3406,"children":3407},{},[3408,3417,3422],{"type":15,"tag":191,"props":3409,"children":3410},{},[3411],{"type":15,"tag":57,"props":3412,"children":3414},{"className":3413},[],[3415],{"type":21,"value":3416},"INTENTION",{"type":15,"tag":191,"props":3418,"children":3419},{},[3420],{"type":21,"value":3421},"A planned action or goal",{"type":15,"tag":191,"props":3423,"children":3424},{},[3425],{"type":21,"value":3426},"Medium",{"type":15,"tag":164,"props":3428,"children":3429},{},[3430,3439,3444],{"type":15,"tag":191,"props":3431,"children":3432},{},[3433],{"type":15,"tag":57,"props":3434,"children":3436},{"className":3435},[],[3437],{"type":21,"value":3438},"EPISODE",{"type":15,"tag":191,"props":3440,"children":3441},{},[3442],{"type":21,"value":3443},"A recorded event",{"type":15,"tag":191,"props":3445,"children":3446},{},[3447],{"type":21,"value":3448},"Fast",{"type":15,"tag":164,"props":3450,"children":3451},{},[3452,3461,3466],{"type":15,"tag":191,"props":3453,"children":3454},{},[3455],{"type":15,"tag":57,"props":3456,"children":3458},{"className":3457},[],[3459],{"type":21,"value":3460},"PREFERENCE",{"type":15,"tag":191,"props":3462,"children":3463},{},[3464],{"type":21,"value":3465},"A taste or convention",{"type":15,"tag":191,"props":3467,"children":3468},{},[3469],{"type":21,"value":3383},{"type":15,"tag":164,"props":3471,"children":3472},{},[3473,3482,3487],{"type":15,"tag":191,"props":3474,"children":3475},{},[3476],{"type":15,"tag":57,"props":3477,"children":3479},{"className":3478},[],[3480],{"type":21,"value":3481},"PATTERN",{"type":15,"tag":191,"props":3483,"children":3484},{},[3485],{"type":21,"value":3486},"Mined from many episodes (platform-only)",{"type":15,"tag":191,"props":3488,"children":3489},{},[3490],{"type":21,"value":3383},{"type":15,"tag":348,"props":3492,"children":3494},{"code":3493,"language":453,"meta":7,"className":454,"style":7},"// Direct write — used for migrations and explicit \"remember this\" flows\ncontext.getMemory().addAtom(spaceId, {\n    text:       \"User prefers morning meetings\",\n    category:   { name: \"preference\", kind: \"PREFERENCE\" },\n    importance: 4,\n    confidence: 0.95\n});\n",[3495],{"type":15,"tag":57,"props":3496,"children":3497},{"__ignoreMap":7},[3498,3506,3532,3548,3575,3592,3605],{"type":15,"tag":460,"props":3499,"children":3500},{"class":462,"line":463},[3501],{"type":15,"tag":460,"props":3502,"children":3503},{"style":467},[3504],{"type":21,"value":3505},"// Direct write — used for migrations and explicit \"remember this\" flows\n",{"type":15,"tag":460,"props":3507,"children":3508},{"class":462,"line":473},[3509,3514,3518,3522,3527],{"type":15,"tag":460,"props":3510,"children":3511},{"style":507},[3512],{"type":21,"value":3513},"context.",{"type":15,"tag":460,"props":3515,"children":3516},{"style":501},[3517],{"type":21,"value":581},{"type":15,"tag":460,"props":3519,"children":3520},{"style":507},[3521],{"type":21,"value":851},{"type":15,"tag":460,"props":3523,"children":3524},{"style":501},[3525],{"type":21,"value":3526},"addAtom",{"type":15,"tag":460,"props":3528,"children":3529},{"style":507},[3530],{"type":21,"value":3531},"(spaceId, {\n",{"type":15,"tag":460,"props":3533,"children":3534},{"class":462,"line":482},[3535,3540,3544],{"type":15,"tag":460,"props":3536,"children":3537},{"style":507},[3538],{"type":21,"value":3539},"    text:       ",{"type":15,"tag":460,"props":3541,"children":3542},{"style":714},[3543],{"type":21,"value":3051},{"type":15,"tag":460,"props":3545,"children":3546},{"style":507},[3547],{"type":21,"value":809},{"type":15,"tag":460,"props":3549,"children":3550},{"class":462,"line":491},[3551,3556,3560,3565,3570],{"type":15,"tag":460,"props":3552,"children":3553},{"style":507},[3554],{"type":21,"value":3555},"    category:   { name: ",{"type":15,"tag":460,"props":3557,"children":3558},{"style":714},[3559],{"type":21,"value":1218},{"type":15,"tag":460,"props":3561,"children":3562},{"style":507},[3563],{"type":21,"value":3564},", kind: ",{"type":15,"tag":460,"props":3566,"children":3567},{"style":714},[3568],{"type":21,"value":3569},"\"PREFERENCE\"",{"type":15,"tag":460,"props":3571,"children":3572},{"style":507},[3573],{"type":21,"value":3574}," },\n",{"type":15,"tag":460,"props":3576,"children":3577},{"class":462,"line":524},[3578,3583,3588],{"type":15,"tag":460,"props":3579,"children":3580},{"style":507},[3581],{"type":21,"value":3582},"    importance: ",{"type":15,"tag":460,"props":3584,"children":3585},{"style":872},[3586],{"type":21,"value":3587},"4",{"type":15,"tag":460,"props":3589,"children":3590},{"style":507},[3591],{"type":21,"value":809},{"type":15,"tag":460,"props":3593,"children":3594},{"class":462,"line":558},[3595,3600],{"type":15,"tag":460,"props":3596,"children":3597},{"style":507},[3598],{"type":21,"value":3599},"    confidence: ",{"type":15,"tag":460,"props":3601,"children":3602},{"style":872},[3603],{"type":21,"value":3604},"0.95\n",{"type":15,"tag":460,"props":3606,"children":3607},{"class":462,"line":588},[3608],{"type":15,"tag":460,"props":3609,"children":3610},{"style":507},[3611],{"type":21,"value":2124},{"type":15,"tag":24,"props":3613,"children":3614},{},[3615,3617,3622],{"type":21,"value":3616},"You will almost never write atoms directly — ",{"type":15,"tag":44,"props":3618,"children":3619},{},[3620],{"type":21,"value":3621},"extraction handles it",{"type":21,"value":3623},". The API is there for migrations, admin imports, and explicit \"remember this\" flows in your UI.",{"type":15,"tag":1799,"props":3625,"children":3627},{"id":3626},"memory-spaces-the-container",[3628],{"type":21,"value":3629},"Memory Spaces — The Container",{"type":15,"tag":24,"props":3631,"children":3632},{},[3633,3634,3639],{"type":21,"value":360},{"type":15,"tag":44,"props":3635,"children":3636},{},[3637],{"type":21,"value":3638},"memory space",{"type":21,"value":3640}," is a named partition of atoms within a single user. You typically create one space per topic your app cares about:",{"type":15,"tag":348,"props":3642,"children":3644},{"code":3643,"language":453,"meta":7,"className":454,"style":7},"var memory = context.getMemory();\n\n// Personal goal-tracking memory\nvar goals = memory.createMemorySpace({ name: \"goals\" });\n\n// Customer-support context memory\nvar support = memory.createMemorySpace({ name: \"support\" });\n",[3645],{"type":15,"tag":57,"props":3646,"children":3647},{"__ignoreMap":7},[3648,3675,3682,3690,3727,3734,3742],{"type":15,"tag":460,"props":3649,"children":3650},{"class":462,"line":463},[3651,3655,3659,3663,3667,3671],{"type":15,"tag":460,"props":3652,"children":3653},{"style":495},[3654],{"type":21,"value":1991},{"type":15,"tag":460,"props":3656,"children":3657},{"style":507},[3658],{"type":21,"value":568},{"type":15,"tag":460,"props":3660,"children":3661},{"style":495},[3662],{"type":21,"value":540},{"type":15,"tag":460,"props":3664,"children":3665},{"style":507},[3666],{"type":21,"value":545},{"type":15,"tag":460,"props":3668,"children":3669},{"style":501},[3670],{"type":21,"value":581},{"type":15,"tag":460,"props":3672,"children":3673},{"style":507},[3674],{"type":21,"value":555},{"type":15,"tag":460,"props":3676,"children":3677},{"class":462,"line":473},[3678],{"type":15,"tag":460,"props":3679,"children":3680},{"emptyLinePlaceholder":622},[3681],{"type":21,"value":625},{"type":15,"tag":460,"props":3683,"children":3684},{"class":462,"line":482},[3685],{"type":15,"tag":460,"props":3686,"children":3687},{"style":467},[3688],{"type":21,"value":3689},"// Personal goal-tracking memory\n",{"type":15,"tag":460,"props":3691,"children":3692},{"class":462,"line":491},[3693,3697,3702,3706,3710,3714,3718,3723],{"type":15,"tag":460,"props":3694,"children":3695},{"style":495},[3696],{"type":21,"value":1991},{"type":15,"tag":460,"props":3698,"children":3699},{"style":507},[3700],{"type":21,"value":3701}," goals ",{"type":15,"tag":460,"props":3703,"children":3704},{"style":495},[3705],{"type":21,"value":540},{"type":15,"tag":460,"props":3707,"children":3708},{"style":507},[3709],{"type":21,"value":936},{"type":15,"tag":460,"props":3711,"children":3712},{"style":501},[3713],{"type":21,"value":1050},{"type":15,"tag":460,"props":3715,"children":3716},{"style":507},[3717],{"type":21,"value":1055},{"type":15,"tag":460,"props":3719,"children":3720},{"style":714},[3721],{"type":21,"value":3722},"\"goals\"",{"type":15,"tag":460,"props":3724,"children":3725},{"style":507},[3726],{"type":21,"value":1065},{"type":15,"tag":460,"props":3728,"children":3729},{"class":462,"line":524},[3730],{"type":15,"tag":460,"props":3731,"children":3732},{"emptyLinePlaceholder":622},[3733],{"type":21,"value":625},{"type":15,"tag":460,"props":3735,"children":3736},{"class":462,"line":558},[3737],{"type":15,"tag":460,"props":3738,"children":3739},{"style":467},[3740],{"type":21,"value":3741},"// Customer-support context memory\n",{"type":15,"tag":460,"props":3743,"children":3744},{"class":462,"line":588},[3745,3749,3754,3758,3762,3766,3770,3775],{"type":15,"tag":460,"props":3746,"children":3747},{"style":495},[3748],{"type":21,"value":1991},{"type":15,"tag":460,"props":3750,"children":3751},{"style":507},[3752],{"type":21,"value":3753}," support ",{"type":15,"tag":460,"props":3755,"children":3756},{"style":495},[3757],{"type":21,"value":540},{"type":15,"tag":460,"props":3759,"children":3760},{"style":507},[3761],{"type":21,"value":936},{"type":15,"tag":460,"props":3763,"children":3764},{"style":501},[3765],{"type":21,"value":1050},{"type":15,"tag":460,"props":3767,"children":3768},{"style":507},[3769],{"type":21,"value":1055},{"type":15,"tag":460,"props":3771,"children":3772},{"style":714},[3773],{"type":21,"value":3774},"\"support\"",{"type":15,"tag":460,"props":3776,"children":3777},{"style":507},[3778],{"type":21,"value":1065},{"type":15,"tag":24,"props":3780,"children":3781},{},[3782],{"type":21,"value":3783},"Why bother with spaces? Two reasons:",{"type":15,"tag":427,"props":3785,"children":3786},{},[3787,3797],{"type":15,"tag":82,"props":3788,"children":3789},{},[3790,3795],{"type":15,"tag":44,"props":3791,"children":3792},{},[3793],{"type":21,"value":3794},"Recall stays focused",{"type":21,"value":3796}," — searching the goals space doesn't return support-ticket memories.",{"type":15,"tag":82,"props":3798,"children":3799},{},[3800,3805],{"type":15,"tag":44,"props":3801,"children":3802},{},[3803],{"type":21,"value":3804},"Bindings target spaces",{"type":21,"value":3806}," — different conversation namespaces extract into different spaces.",{"type":15,"tag":24,"props":3808,"children":3809},{},[3810],{"type":21,"value":3811},"A simple app might have one space per user. A complex app might have several. Use as many as you have natural topic boundaries.",{"type":15,"tag":1799,"props":3813,"children":3815},{"id":3814},"entities-people-places-and-things",[3816],{"type":21,"value":3817},"Entities — People, Places, And Things",{"type":15,"tag":24,"props":3819,"children":3820},{},[3821,3823,3828],{"type":21,"value":3822},"When the extractor produces atoms, it also produces ",{"type":15,"tag":44,"props":3824,"children":3825},{},[3826],{"type":21,"value":3827},"entities",{"type":21,"value":3829},": the people, organisations, concepts, and events the atoms refer to. Every atom links to its entities; entity-based recall (\"everything about Acme Corp\") becomes possible without re-reading every atom.",{"type":15,"tag":24,"props":3831,"children":3832},{},[3833,3835,3841,3842,3848,3849,3855,3856,3862,3863,3869,3870,3876,3877,3883],{"type":21,"value":3834},"Entity types are platform-defined: ",{"type":15,"tag":57,"props":3836,"children":3838},{"className":3837},[],[3839],{"type":21,"value":3840},"PERSON",{"type":21,"value":319},{"type":15,"tag":57,"props":3843,"children":3845},{"className":3844},[],[3846],{"type":21,"value":3847},"ORGANIZATION",{"type":21,"value":319},{"type":15,"tag":57,"props":3850,"children":3852},{"className":3851},[],[3853],{"type":21,"value":3854},"PLACE",{"type":21,"value":319},{"type":15,"tag":57,"props":3857,"children":3859},{"className":3858},[],[3860],{"type":21,"value":3861},"OBJECT",{"type":21,"value":319},{"type":15,"tag":57,"props":3864,"children":3866},{"className":3865},[],[3867],{"type":21,"value":3868},"CONCEPT",{"type":21,"value":319},{"type":15,"tag":57,"props":3871,"children":3873},{"className":3872},[],[3874],{"type":21,"value":3875},"EVENT",{"type":21,"value":319},{"type":15,"tag":57,"props":3878,"children":3880},{"className":3879},[],[3881],{"type":21,"value":3882},"AGREEMENT",{"type":21,"value":3884},". The extractor classifies; you read.",{"type":15,"tag":348,"props":3886,"children":3888},{"code":3887,"language":453,"meta":7,"className":454,"style":7},"// Resolve an entity by name\nvar acme = memory.findEntityByName(spaceId, {\n    type: \"ORGANIZATION\",\n    name: \"Acme Corporation\"\n});\n\n// Get every memory atom that mentions Acme\nvar hits = memory.recallByEntity(spaceId, {\n    entityIdOrName: acme.id,\n    limit: 20\n});\n",[3889],{"type":15,"tag":57,"props":3890,"children":3891},{"__ignoreMap":7},[3892,3900,3929,3946,3959,3966,3973,3981,4010,4018,4031],{"type":15,"tag":460,"props":3893,"children":3894},{"class":462,"line":463},[3895],{"type":15,"tag":460,"props":3896,"children":3897},{"style":467},[3898],{"type":21,"value":3899},"// Resolve an entity by name\n",{"type":15,"tag":460,"props":3901,"children":3902},{"class":462,"line":473},[3903,3907,3912,3916,3920,3925],{"type":15,"tag":460,"props":3904,"children":3905},{"style":495},[3906],{"type":21,"value":1991},{"type":15,"tag":460,"props":3908,"children":3909},{"style":507},[3910],{"type":21,"value":3911}," acme ",{"type":15,"tag":460,"props":3913,"children":3914},{"style":495},[3915],{"type":21,"value":540},{"type":15,"tag":460,"props":3917,"children":3918},{"style":507},[3919],{"type":21,"value":936},{"type":15,"tag":460,"props":3921,"children":3922},{"style":501},[3923],{"type":21,"value":3924},"findEntityByName",{"type":15,"tag":460,"props":3926,"children":3927},{"style":507},[3928],{"type":21,"value":3531},{"type":15,"tag":460,"props":3930,"children":3931},{"class":462,"line":482},[3932,3937,3942],{"type":15,"tag":460,"props":3933,"children":3934},{"style":507},[3935],{"type":21,"value":3936},"    type: ",{"type":15,"tag":460,"props":3938,"children":3939},{"style":714},[3940],{"type":21,"value":3941},"\"ORGANIZATION\"",{"type":15,"tag":460,"props":3943,"children":3944},{"style":507},[3945],{"type":21,"value":809},{"type":15,"tag":460,"props":3947,"children":3948},{"class":462,"line":491},[3949,3954],{"type":15,"tag":460,"props":3950,"children":3951},{"style":507},[3952],{"type":21,"value":3953},"    name: ",{"type":15,"tag":460,"props":3955,"children":3956},{"style":714},[3957],{"type":21,"value":3958},"\"Acme Corporation\"\n",{"type":15,"tag":460,"props":3960,"children":3961},{"class":462,"line":524},[3962],{"type":15,"tag":460,"props":3963,"children":3964},{"style":507},[3965],{"type":21,"value":2124},{"type":15,"tag":460,"props":3967,"children":3968},{"class":462,"line":558},[3969],{"type":15,"tag":460,"props":3970,"children":3971},{"emptyLinePlaceholder":622},[3972],{"type":21,"value":625},{"type":15,"tag":460,"props":3974,"children":3975},{"class":462,"line":588},[3976],{"type":15,"tag":460,"props":3977,"children":3978},{"style":467},[3979],{"type":21,"value":3980},"// Get every memory atom that mentions Acme\n",{"type":15,"tag":460,"props":3982,"children":3983},{"class":462,"line":618},[3984,3988,3993,3997,4001,4006],{"type":15,"tag":460,"props":3985,"children":3986},{"style":495},[3987],{"type":21,"value":1991},{"type":15,"tag":460,"props":3989,"children":3990},{"style":507},[3991],{"type":21,"value":3992}," hits ",{"type":15,"tag":460,"props":3994,"children":3995},{"style":495},[3996],{"type":21,"value":540},{"type":15,"tag":460,"props":3998,"children":3999},{"style":507},[4000],{"type":21,"value":936},{"type":15,"tag":460,"props":4002,"children":4003},{"style":501},[4004],{"type":21,"value":4005},"recallByEntity",{"type":15,"tag":460,"props":4007,"children":4008},{"style":507},[4009],{"type":21,"value":3531},{"type":15,"tag":460,"props":4011,"children":4012},{"class":462,"line":628},[4013],{"type":15,"tag":460,"props":4014,"children":4015},{"style":507},[4016],{"type":21,"value":4017},"    entityIdOrName: acme.id,\n",{"type":15,"tag":460,"props":4019,"children":4020},{"class":462,"line":637},[4021,4026],{"type":15,"tag":460,"props":4022,"children":4023},{"style":507},[4024],{"type":21,"value":4025},"    limit: ",{"type":15,"tag":460,"props":4027,"children":4028},{"style":872},[4029],{"type":21,"value":4030},"20\n",{"type":15,"tag":460,"props":4032,"children":4033},{"class":462,"line":695},[4034],{"type":15,"tag":460,"props":4035,"children":4036},{"style":507},[4037],{"type":21,"value":2124},{"type":15,"tag":24,"props":4039,"children":4040},{},[4041],{"type":21,"value":4042},"You will rarely create entities by hand — the extractor does. If extraction produces two entities that should be one (\"Acme\" and \"Acme Corporation\"), fold the alias under the canonical:",{"type":15,"tag":348,"props":4044,"children":4046},{"code":4045,"language":453,"meta":7,"className":454,"style":7},"memory.mergeEntities(canonicalId, aliasId);\n// All atom references repointed; aliases preserved.\n",[4047],{"type":15,"tag":57,"props":4048,"children":4049},{"__ignoreMap":7},[4050,4068],{"type":15,"tag":460,"props":4051,"children":4052},{"class":462,"line":463},[4053,4058,4063],{"type":15,"tag":460,"props":4054,"children":4055},{"style":507},[4056],{"type":21,"value":4057},"memory.",{"type":15,"tag":460,"props":4059,"children":4060},{"style":501},[4061],{"type":21,"value":4062},"mergeEntities",{"type":15,"tag":460,"props":4064,"children":4065},{"style":507},[4066],{"type":21,"value":4067},"(canonicalId, aliasId);\n",{"type":15,"tag":460,"props":4069,"children":4070},{"class":462,"line":473},[4071],{"type":15,"tag":460,"props":4072,"children":4073},{"style":467},[4074],{"type":21,"value":4075},"// All atom references repointed; aliases preserved.\n",{"type":15,"tag":1770,"props":4077,"children":4078},{},[],{"type":15,"tag":66,"props":4080,"children":4082},{"id":4081},"bindings-where-conversations-become-memories",[4083],{"type":21,"value":4084},"Bindings: Where Conversations Become Memories",{"type":15,"tag":24,"props":4086,"children":4087},{},[4088,4090,4094],{"type":21,"value":4089},"So far we've talked about conversations on one side and memory on the other. The thing that connects them is a ",{"type":15,"tag":44,"props":4091,"children":4092},{},[4093],{"type":21,"value":395},{"type":21,"value":4095},": a small configuration record that tells the platform \"when conversations in namespace X close, extract atoms into memory space Y.\"",{"type":15,"tag":24,"props":4097,"children":4098},{},[4099,4104],{"type":15,"tag":44,"props":4100,"children":4101},{},[4102],{"type":21,"value":4103},"Without a binding, no extraction happens.",{"type":21,"value":4105}," Conversations accumulate but never get distilled.",{"type":15,"tag":1799,"props":4107,"children":4109},{"id":4108},"creating-a-binding",[4110],{"type":21,"value":4111},"Creating A Binding",{"type":15,"tag":348,"props":4113,"children":4115},{"code":4114,"language":453,"meta":7,"className":454,"style":7},"var memory = context.getMemory();\n\n// Find or create the destination space\nvar space = memory.createMemorySpace({ name: \"daily\" });\n\nmemory.createBinding({\n    conversationScope: {\n        namespace: \"daily-checkin\",\n        userId:    \"*\"   // every user\n    },\n    memorySpaceIds: [space.id],\n    extractionPolicy: {\n        extractionVersion:    \"v1\",   // which prompt version\n        onConversationClosed: true,   // extract on close\n        windowed:             false,  // also extract every N turns?\n        windowTurns:          0\n    }\n});\n",[4116],{"type":15,"tag":57,"props":4117,"children":4118},{"__ignoreMap":7},[4119,4146,4153,4161,4197,4204,4220,4228,4243,4261,4268,4276,4284,4307,4329,4352,4365,4372],{"type":15,"tag":460,"props":4120,"children":4121},{"class":462,"line":463},[4122,4126,4130,4134,4138,4142],{"type":15,"tag":460,"props":4123,"children":4124},{"style":495},[4125],{"type":21,"value":1991},{"type":15,"tag":460,"props":4127,"children":4128},{"style":507},[4129],{"type":21,"value":568},{"type":15,"tag":460,"props":4131,"children":4132},{"style":495},[4133],{"type":21,"value":540},{"type":15,"tag":460,"props":4135,"children":4136},{"style":507},[4137],{"type":21,"value":545},{"type":15,"tag":460,"props":4139,"children":4140},{"style":501},[4141],{"type":21,"value":581},{"type":15,"tag":460,"props":4143,"children":4144},{"style":507},[4145],{"type":21,"value":555},{"type":15,"tag":460,"props":4147,"children":4148},{"class":462,"line":473},[4149],{"type":15,"tag":460,"props":4150,"children":4151},{"emptyLinePlaceholder":622},[4152],{"type":21,"value":625},{"type":15,"tag":460,"props":4154,"children":4155},{"class":462,"line":482},[4156],{"type":15,"tag":460,"props":4157,"children":4158},{"style":467},[4159],{"type":21,"value":4160},"// Find or create the destination space\n",{"type":15,"tag":460,"props":4162,"children":4163},{"class":462,"line":491},[4164,4168,4172,4176,4180,4184,4188,4193],{"type":15,"tag":460,"props":4165,"children":4166},{"style":495},[4167],{"type":21,"value":1991},{"type":15,"tag":460,"props":4169,"children":4170},{"style":507},[4171],{"type":21,"value":927},{"type":15,"tag":460,"props":4173,"children":4174},{"style":495},[4175],{"type":21,"value":540},{"type":15,"tag":460,"props":4177,"children":4178},{"style":507},[4179],{"type":21,"value":936},{"type":15,"tag":460,"props":4181,"children":4182},{"style":501},[4183],{"type":21,"value":1050},{"type":15,"tag":460,"props":4185,"children":4186},{"style":507},[4187],{"type":21,"value":1055},{"type":15,"tag":460,"props":4189,"children":4190},{"style":714},[4191],{"type":21,"value":4192},"\"daily\"",{"type":15,"tag":460,"props":4194,"children":4195},{"style":507},[4196],{"type":21,"value":1065},{"type":15,"tag":460,"props":4198,"children":4199},{"class":462,"line":524},[4200],{"type":15,"tag":460,"props":4201,"children":4202},{"emptyLinePlaceholder":622},[4203],{"type":21,"value":625},{"type":15,"tag":460,"props":4205,"children":4206},{"class":462,"line":558},[4207,4211,4216],{"type":15,"tag":460,"props":4208,"children":4209},{"style":507},[4210],{"type":21,"value":4057},{"type":15,"tag":460,"props":4212,"children":4213},{"style":501},[4214],{"type":21,"value":4215},"createBinding",{"type":15,"tag":460,"props":4217,"children":4218},{"style":507},[4219],{"type":21,"value":790},{"type":15,"tag":460,"props":4221,"children":4222},{"class":462,"line":588},[4223],{"type":15,"tag":460,"props":4224,"children":4225},{"style":507},[4226],{"type":21,"value":4227},"    conversationScope: {\n",{"type":15,"tag":460,"props":4229,"children":4230},{"class":462,"line":618},[4231,4235,4239],{"type":15,"tag":460,"props":4232,"children":4233},{"style":507},[4234],{"type":21,"value":799},{"type":15,"tag":460,"props":4236,"children":4237},{"style":714},[4238],{"type":21,"value":804},{"type":15,"tag":460,"props":4240,"children":4241},{"style":507},[4242],{"type":21,"value":809},{"type":15,"tag":460,"props":4244,"children":4245},{"class":462,"line":628},[4246,4251,4256],{"type":15,"tag":460,"props":4247,"children":4248},{"style":507},[4249],{"type":21,"value":4250},"        userId:    ",{"type":15,"tag":460,"props":4252,"children":4253},{"style":714},[4254],{"type":21,"value":4255},"\"*\"",{"type":15,"tag":460,"props":4257,"children":4258},{"style":467},[4259],{"type":21,"value":4260},"   // every user\n",{"type":15,"tag":460,"props":4262,"children":4263},{"class":462,"line":637},[4264],{"type":15,"tag":460,"props":4265,"children":4266},{"style":507},[4267],{"type":21,"value":2717},{"type":15,"tag":460,"props":4269,"children":4270},{"class":462,"line":695},[4271],{"type":15,"tag":460,"props":4272,"children":4273},{"style":507},[4274],{"type":21,"value":4275},"    memorySpaceIds: [space.id],\n",{"type":15,"tag":460,"props":4277,"children":4278},{"class":462,"line":744},[4279],{"type":15,"tag":460,"props":4280,"children":4281},{"style":507},[4282],{"type":21,"value":4283},"    extractionPolicy: {\n",{"type":15,"tag":460,"props":4285,"children":4286},{"class":462,"line":753},[4287,4292,4297,4302],{"type":15,"tag":460,"props":4288,"children":4289},{"style":507},[4290],{"type":21,"value":4291},"        extractionVersion:    ",{"type":15,"tag":460,"props":4293,"children":4294},{"style":714},[4295],{"type":21,"value":4296},"\"v1\"",{"type":15,"tag":460,"props":4298,"children":4299},{"style":507},[4300],{"type":21,"value":4301},",   ",{"type":15,"tag":460,"props":4303,"children":4304},{"style":467},[4305],{"type":21,"value":4306},"// which prompt version\n",{"type":15,"tag":460,"props":4308,"children":4309},{"class":462,"line":793},[4310,4315,4320,4324],{"type":15,"tag":460,"props":4311,"children":4312},{"style":507},[4313],{"type":21,"value":4314},"        onConversationClosed: ",{"type":15,"tag":460,"props":4316,"children":4317},{"style":872},[4318],{"type":21,"value":4319},"true",{"type":15,"tag":460,"props":4321,"children":4322},{"style":507},[4323],{"type":21,"value":4301},{"type":15,"tag":460,"props":4325,"children":4326},{"style":467},[4327],{"type":21,"value":4328},"// extract on close\n",{"type":15,"tag":460,"props":4330,"children":4331},{"class":462,"line":812},[4332,4337,4342,4347],{"type":15,"tag":460,"props":4333,"children":4334},{"style":507},[4335],{"type":21,"value":4336},"        windowed:             ",{"type":15,"tag":460,"props":4338,"children":4339},{"style":872},[4340],{"type":21,"value":4341},"false",{"type":15,"tag":460,"props":4343,"children":4344},{"style":507},[4345],{"type":21,"value":4346},",  ",{"type":15,"tag":460,"props":4348,"children":4349},{"style":467},[4350],{"type":21,"value":4351},"// also extract every N turns?\n",{"type":15,"tag":460,"props":4353,"children":4354},{"class":462,"line":830},[4355,4360],{"type":15,"tag":460,"props":4356,"children":4357},{"style":507},[4358],{"type":21,"value":4359},"        windowTurns:          ",{"type":15,"tag":460,"props":4361,"children":4362},{"style":872},[4363],{"type":21,"value":4364},"0\n",{"type":15,"tag":460,"props":4366,"children":4367},{"class":462,"line":892},[4368],{"type":15,"tag":460,"props":4369,"children":4370},{"style":507},[4371],{"type":21,"value":1074},{"type":15,"tag":460,"props":4373,"children":4374},{"class":462,"line":900},[4375],{"type":15,"tag":460,"props":4376,"children":4377},{"style":507},[4378],{"type":21,"value":2124},{"type":15,"tag":24,"props":4380,"children":4381},{},[4382,4384,4390,4392,4398],{"type":21,"value":4383},"From this point forward, every time a conversation in ",{"type":15,"tag":57,"props":4385,"children":4387},{"className":4386},[],[4388],{"type":21,"value":4389},"daily-checkin",{"type":21,"value":4391}," closes for any user, the extractor runs and produces atoms in that user's ",{"type":15,"tag":57,"props":4393,"children":4395},{"className":4394},[],[4396],{"type":21,"value":4397},"daily",{"type":21,"value":4399}," space.",{"type":15,"tag":1799,"props":4401,"children":4403},{"id":4402},"trigger-modes",[4404],{"type":21,"value":4405},"Trigger Modes",{"type":15,"tag":24,"props":4407,"children":4408},{},[4409],{"type":21,"value":4410},"You can configure two trigger modes (and combine them):",{"type":15,"tag":156,"props":4412,"children":4413},{},[4414,4435],{"type":15,"tag":160,"props":4415,"children":4416},{},[4417],{"type":15,"tag":164,"props":4418,"children":4419},{},[4420,4425,4430],{"type":15,"tag":168,"props":4421,"children":4422},{},[4423],{"type":21,"value":4424},"Trigger",{"type":15,"tag":168,"props":4426,"children":4427},{},[4428],{"type":21,"value":4429},"When it fires",{"type":15,"tag":168,"props":4431,"children":4432},{},[4433],{"type":21,"value":4434},"Best for",{"type":15,"tag":184,"props":4436,"children":4437},{},[4438,4460],{"type":15,"tag":164,"props":4439,"children":4440},{},[4441,4450,4455],{"type":15,"tag":191,"props":4442,"children":4443},{},[4444],{"type":15,"tag":57,"props":4445,"children":4447},{"className":4446},[],[4448],{"type":21,"value":4449},"onConversationClosed: true",{"type":15,"tag":191,"props":4451,"children":4452},{},[4453],{"type":21,"value":4454},"Conversation transitions from open → closed",{"type":15,"tag":191,"props":4456,"children":4457},{},[4458],{"type":21,"value":4459},"Most apps. Cheapest, most accurate.",{"type":15,"tag":164,"props":4461,"children":4462},{},[4463,4472,4477],{"type":15,"tag":191,"props":4464,"children":4465},{},[4466],{"type":15,"tag":57,"props":4467,"children":4469},{"className":4468},[],[4470],{"type":21,"value":4471},"windowed: true, windowTurns: N",{"type":15,"tag":191,"props":4473,"children":4474},{},[4475],{"type":21,"value":4476},"Every N turns within an open conversation",{"type":15,"tag":191,"props":4478,"children":4479},{},[4480],{"type":21,"value":4481},"Long sessions where you want progressive memory before the user signs off.",{"type":15,"tag":24,"props":4483,"children":4484},{},[4485,4487,4492,4494,4499],{"type":21,"value":4486},"Most apps want ",{"type":15,"tag":57,"props":4488,"children":4490},{"className":4489},[],[4491],{"type":21,"value":4449},{"type":21,"value":4493}," only. Windowed extraction is for long-running sessions where the agent needs to recall this session's earlier turns ",{"type":15,"tag":3047,"props":4495,"children":4496},{},[4497],{"type":21,"value":4498},"before",{"type":21,"value":4500}," it ends.",{"type":15,"tag":1799,"props":4502,"children":4504},{"id":4503},"binding-scope",[4505],{"type":21,"value":4506},"Binding Scope",{"type":15,"tag":24,"props":4508,"children":4509},{},[4510,4511,4517,4519,4524,4525,4530],{"type":21,"value":3285},{"type":15,"tag":57,"props":4512,"children":4514},{"className":4513},[],[4515],{"type":21,"value":4516},"conversationScope",{"type":21,"value":4518}," tuple supports wildcards on ",{"type":15,"tag":57,"props":4520,"children":4522},{"className":4521},[],[4523],{"type":21,"value":1887},{"type":21,"value":299},{"type":15,"tag":57,"props":4526,"children":4528},{"className":4527},[],[4529],{"type":21,"value":1921},{"type":21,"value":4531},":",{"type":15,"tag":348,"props":4533,"children":4535},{"code":4534,"language":453,"meta":7,"className":454,"style":7},"// All daily-checkin conversations for any user (the typical case)\n{ namespace: \"daily-checkin\", userId: \"*\" }\n\n// All conversations of any namespace for one specific user\n{ namespace: \"*\", userId: \"user_42\" }\n\n// Multiple namespaces extracting into one space\n[\n    { namespace: \"morning-checkin\", userId: \"*\" },\n    { namespace: \"evening-checkin\", userId: \"*\" }\n]\n",[4536],{"type":15,"tag":57,"props":4537,"children":4538},{"__ignoreMap":7},[4539,4547,4587,4594,4602,4642,4649,4657,4665,4691,4715],{"type":15,"tag":460,"props":4540,"children":4541},{"class":462,"line":463},[4542],{"type":15,"tag":460,"props":4543,"children":4544},{"style":467},[4545],{"type":21,"value":4546},"// All daily-checkin conversations for any user (the typical case)\n",{"type":15,"tag":460,"props":4548,"children":4549},{"class":462,"line":473},[4550,4555,4559,4563,4567,4571,4575,4579,4583],{"type":15,"tag":460,"props":4551,"children":4552},{"style":507},[4553],{"type":21,"value":4554},"{ ",{"type":15,"tag":460,"props":4556,"children":4557},{"style":501},[4558],{"type":21,"value":1887},{"type":15,"tag":460,"props":4560,"children":4561},{"style":507},[4562],{"type":21,"value":2407},{"type":15,"tag":460,"props":4564,"children":4565},{"style":714},[4566],{"type":21,"value":804},{"type":15,"tag":460,"props":4568,"children":4569},{"style":507},[4570],{"type":21,"value":319},{"type":15,"tag":460,"props":4572,"children":4573},{"style":501},[4574],{"type":21,"value":1921},{"type":15,"tag":460,"props":4576,"children":4577},{"style":507},[4578],{"type":21,"value":2407},{"type":15,"tag":460,"props":4580,"children":4581},{"style":714},[4582],{"type":21,"value":4255},{"type":15,"tag":460,"props":4584,"children":4585},{"style":507},[4586],{"type":21,"value":2116},{"type":15,"tag":460,"props":4588,"children":4589},{"class":462,"line":482},[4590],{"type":15,"tag":460,"props":4591,"children":4592},{"emptyLinePlaceholder":622},[4593],{"type":21,"value":625},{"type":15,"tag":460,"props":4595,"children":4596},{"class":462,"line":491},[4597],{"type":15,"tag":460,"props":4598,"children":4599},{"style":467},[4600],{"type":21,"value":4601},"// All conversations of any namespace for one specific user\n",{"type":15,"tag":460,"props":4603,"children":4604},{"class":462,"line":524},[4605,4609,4613,4617,4621,4625,4629,4633,4638],{"type":15,"tag":460,"props":4606,"children":4607},{"style":507},[4608],{"type":21,"value":4554},{"type":15,"tag":460,"props":4610,"children":4611},{"style":501},[4612],{"type":21,"value":1887},{"type":15,"tag":460,"props":4614,"children":4615},{"style":507},[4616],{"type":21,"value":2407},{"type":15,"tag":460,"props":4618,"children":4619},{"style":714},[4620],{"type":21,"value":4255},{"type":15,"tag":460,"props":4622,"children":4623},{"style":507},[4624],{"type":21,"value":319},{"type":15,"tag":460,"props":4626,"children":4627},{"style":501},[4628],{"type":21,"value":1921},{"type":15,"tag":460,"props":4630,"children":4631},{"style":507},[4632],{"type":21,"value":2407},{"type":15,"tag":460,"props":4634,"children":4635},{"style":714},[4636],{"type":21,"value":4637},"\"user_42\"",{"type":15,"tag":460,"props":4639,"children":4640},{"style":507},[4641],{"type":21,"value":2116},{"type":15,"tag":460,"props":4643,"children":4644},{"class":462,"line":558},[4645],{"type":15,"tag":460,"props":4646,"children":4647},{"emptyLinePlaceholder":622},[4648],{"type":21,"value":625},{"type":15,"tag":460,"props":4650,"children":4651},{"class":462,"line":588},[4652],{"type":15,"tag":460,"props":4653,"children":4654},{"style":467},[4655],{"type":21,"value":4656},"// Multiple namespaces extracting into one space\n",{"type":15,"tag":460,"props":4658,"children":4659},{"class":462,"line":618},[4660],{"type":15,"tag":460,"props":4661,"children":4662},{"style":507},[4663],{"type":21,"value":4664},"[\n",{"type":15,"tag":460,"props":4666,"children":4667},{"class":462,"line":628},[4668,4673,4678,4683,4687],{"type":15,"tag":460,"props":4669,"children":4670},{"style":507},[4671],{"type":21,"value":4672},"    { namespace: ",{"type":15,"tag":460,"props":4674,"children":4675},{"style":714},[4676],{"type":21,"value":4677},"\"morning-checkin\"",{"type":15,"tag":460,"props":4679,"children":4680},{"style":507},[4681],{"type":21,"value":4682},", userId: ",{"type":15,"tag":460,"props":4684,"children":4685},{"style":714},[4686],{"type":21,"value":4255},{"type":15,"tag":460,"props":4688,"children":4689},{"style":507},[4690],{"type":21,"value":3574},{"type":15,"tag":460,"props":4692,"children":4693},{"class":462,"line":637},[4694,4698,4703,4707,4711],{"type":15,"tag":460,"props":4695,"children":4696},{"style":507},[4697],{"type":21,"value":4672},{"type":15,"tag":460,"props":4699,"children":4700},{"style":714},[4701],{"type":21,"value":4702},"\"evening-checkin\"",{"type":15,"tag":460,"props":4704,"children":4705},{"style":507},[4706],{"type":21,"value":4682},{"type":15,"tag":460,"props":4708,"children":4709},{"style":714},[4710],{"type":21,"value":4255},{"type":15,"tag":460,"props":4712,"children":4713},{"style":507},[4714],{"type":21,"value":2116},{"type":15,"tag":460,"props":4716,"children":4717},{"class":462,"line":695},[4718],{"type":15,"tag":460,"props":4719,"children":4720},{"style":507},[4721],{"type":21,"value":1232},{"type":15,"tag":24,"props":4723,"children":4724},{},[4725],{"type":21,"value":4726},"You can have multiple bindings; they all match independently. A conversation that matches three bindings produces three extraction jobs (one per binding × space).",{"type":15,"tag":1799,"props":4728,"children":4730},{"id":4729},"extraction-prompt-versioning",[4731],{"type":21,"value":4732},"Extraction Prompt Versioning",{"type":15,"tag":24,"props":4734,"children":4735},{},[4736,4737,4743,4745,4751,4752,4758,4760,4765],{"type":21,"value":3285},{"type":15,"tag":57,"props":4738,"children":4740},{"className":4739},[],[4741],{"type":21,"value":4742},"extractionVersion",{"type":21,"value":4744}," field pins which prompt the extractor uses (",{"type":15,"tag":57,"props":4746,"children":4748},{"className":4747},[],[4749],{"type":21,"value":4750},"extraction-v1.txt",{"type":21,"value":319},{"type":15,"tag":57,"props":4753,"children":4755},{"className":4754},[],[4756],{"type":21,"value":4757},"extraction-v2.txt",{"type":21,"value":4759},", …). Bumping the version is the ",{"type":15,"tag":44,"props":4761,"children":4762},{},[4763],{"type":21,"value":4764},"intentional re-extraction path",{"type":21,"value":4766},": change the prompt to add a new category, or improve the extraction quality, then run a replay over historical conversations to re-extract them.",{"type":15,"tag":24,"props":4768,"children":4769},{},[4770],{"type":21,"value":4771},"You won't typically write extraction prompts yourself — the platform ships sensible defaults — but you may bump the version when the platform team releases an improved prompt.",{"type":15,"tag":1799,"props":4773,"children":4775},{"id":4774},"manual-replay",[4776],{"type":21,"value":4777},"Manual Replay",{"type":15,"tag":24,"props":4779,"children":4780},{},[4781],{"type":21,"value":4782},"To re-run extraction for one conversation (e.g., to test a new prompt version):",{"type":15,"tag":348,"props":4784,"children":4786},{"code":4785,"language":453,"meta":7,"className":454,"style":7},"memory.runExtractionForConversation(conversationId, {\n    extractionVersion: \"v2\"   // optional override\n});\n",[4787],{"type":15,"tag":57,"props":4788,"children":4789},{"__ignoreMap":7},[4790,4807,4825],{"type":15,"tag":460,"props":4791,"children":4792},{"class":462,"line":463},[4793,4797,4802],{"type":15,"tag":460,"props":4794,"children":4795},{"style":507},[4796],{"type":21,"value":4057},{"type":15,"tag":460,"props":4798,"children":4799},{"style":501},[4800],{"type":21,"value":4801},"runExtractionForConversation",{"type":15,"tag":460,"props":4803,"children":4804},{"style":507},[4805],{"type":21,"value":4806},"(conversationId, {\n",{"type":15,"tag":460,"props":4808,"children":4809},{"class":462,"line":473},[4810,4815,4820],{"type":15,"tag":460,"props":4811,"children":4812},{"style":507},[4813],{"type":21,"value":4814},"    extractionVersion: ",{"type":15,"tag":460,"props":4816,"children":4817},{"style":714},[4818],{"type":21,"value":4819},"\"v2\"",{"type":15,"tag":460,"props":4821,"children":4822},{"style":467},[4823],{"type":21,"value":4824},"   // optional override\n",{"type":15,"tag":460,"props":4826,"children":4827},{"class":462,"line":482},[4828],{"type":15,"tag":460,"props":4829,"children":4830},{"style":507},[4831],{"type":21,"value":2124},{"type":15,"tag":24,"props":4833,"children":4834},{},[4835],{"type":21,"value":4836},"This produces a fresh extraction job that the worker pool picks up.",{"type":15,"tag":1770,"props":4838,"children":4839},{},[],{"type":15,"tag":66,"props":4841,"children":4843},{"id":4842},"recall-three-ways-to-find-memories",[4844],{"type":21,"value":4845},"Recall: Three Ways To Find Memories",{"type":15,"tag":24,"props":4847,"children":4848},{},[4849],{"type":21,"value":4850},"Recall is how memories make their way back into the LLM's context. The platform offers three modes — they exist because LLMs pick the right tool more reliably from a clear name + description than from a single tool with a discriminator argument.",{"type":15,"tag":1799,"props":4852,"children":4854},{"id":4853},"recallbytopic-semantic-search",[4855,4861],{"type":15,"tag":57,"props":4856,"children":4858},{"className":4857},[],[4859],{"type":21,"value":4860},"recallByTopic",{"type":21,"value":4862}," — Semantic Search",{"type":15,"tag":24,"props":4864,"children":4865},{},[4866],{"type":21,"value":4867},"The hot path. You provide a free-text query, and the platform returns the atoms most semantically relevant to it (ranked by embedding similarity, with decay and importance weighting applied).",{"type":15,"tag":348,"props":4869,"children":4871},{"code":4870,"language":453,"meta":7,"className":454,"style":7},"var hits = memory.recallByTopic(spaceId, {\n    query: \"the user's preferred meeting times\",\n    limit: 5\n});\n\n// hits.hits = [\n//   { atom: { text: \"User prefers Tuesday mornings\", ... },\n//     score: 0.91, decayWeight: 1.0, ... },\n//   { atom: { text: \"User dislikes meetings before 9am\", ... },\n//     score: 0.87, ... },\n//   ...\n// ]\n",[4872],{"type":15,"tag":57,"props":4873,"children":4874},{"__ignoreMap":7},[4875,4902,4919,4931,4938,4945,4953,4961,4969,4977,4985,4993],{"type":15,"tag":460,"props":4876,"children":4877},{"class":462,"line":463},[4878,4882,4886,4890,4894,4898],{"type":15,"tag":460,"props":4879,"children":4880},{"style":495},[4881],{"type":21,"value":1991},{"type":15,"tag":460,"props":4883,"children":4884},{"style":507},[4885],{"type":21,"value":3992},{"type":15,"tag":460,"props":4887,"children":4888},{"style":495},[4889],{"type":21,"value":540},{"type":15,"tag":460,"props":4891,"children":4892},{"style":507},[4893],{"type":21,"value":936},{"type":15,"tag":460,"props":4895,"children":4896},{"style":501},[4897],{"type":21,"value":4860},{"type":15,"tag":460,"props":4899,"children":4900},{"style":507},[4901],{"type":21,"value":3531},{"type":15,"tag":460,"props":4903,"children":4904},{"class":462,"line":473},[4905,4910,4915],{"type":15,"tag":460,"props":4906,"children":4907},{"style":507},[4908],{"type":21,"value":4909},"    query: ",{"type":15,"tag":460,"props":4911,"children":4912},{"style":714},[4913],{"type":21,"value":4914},"\"the user's preferred meeting times\"",{"type":15,"tag":460,"props":4916,"children":4917},{"style":507},[4918],{"type":21,"value":809},{"type":15,"tag":460,"props":4920,"children":4921},{"class":462,"line":482},[4922,4926],{"type":15,"tag":460,"props":4923,"children":4924},{"style":507},[4925],{"type":21,"value":4025},{"type":15,"tag":460,"props":4927,"children":4928},{"style":872},[4929],{"type":21,"value":4930},"5\n",{"type":15,"tag":460,"props":4932,"children":4933},{"class":462,"line":491},[4934],{"type":15,"tag":460,"props":4935,"children":4936},{"style":507},[4937],{"type":21,"value":2124},{"type":15,"tag":460,"props":4939,"children":4940},{"class":462,"line":524},[4941],{"type":15,"tag":460,"props":4942,"children":4943},{"emptyLinePlaceholder":622},[4944],{"type":21,"value":625},{"type":15,"tag":460,"props":4946,"children":4947},{"class":462,"line":558},[4948],{"type":15,"tag":460,"props":4949,"children":4950},{"style":467},[4951],{"type":21,"value":4952},"// hits.hits = [\n",{"type":15,"tag":460,"props":4954,"children":4955},{"class":462,"line":588},[4956],{"type":15,"tag":460,"props":4957,"children":4958},{"style":467},[4959],{"type":21,"value":4960},"//   { atom: { text: \"User prefers Tuesday mornings\", ... },\n",{"type":15,"tag":460,"props":4962,"children":4963},{"class":462,"line":618},[4964],{"type":15,"tag":460,"props":4965,"children":4966},{"style":467},[4967],{"type":21,"value":4968},"//     score: 0.91, decayWeight: 1.0, ... },\n",{"type":15,"tag":460,"props":4970,"children":4971},{"class":462,"line":628},[4972],{"type":15,"tag":460,"props":4973,"children":4974},{"style":467},[4975],{"type":21,"value":4976},"//   { atom: { text: \"User dislikes meetings before 9am\", ... },\n",{"type":15,"tag":460,"props":4978,"children":4979},{"class":462,"line":637},[4980],{"type":15,"tag":460,"props":4981,"children":4982},{"style":467},[4983],{"type":21,"value":4984},"//     score: 0.87, ... },\n",{"type":15,"tag":460,"props":4986,"children":4987},{"class":462,"line":695},[4988],{"type":15,"tag":460,"props":4989,"children":4990},{"style":467},[4991],{"type":21,"value":4992},"//   ...\n",{"type":15,"tag":460,"props":4994,"children":4995},{"class":462,"line":744},[4996],{"type":15,"tag":460,"props":4997,"children":4998},{"style":467},[4999],{"type":21,"value":5000},"// ]\n",{"type":15,"tag":24,"props":5002,"children":5003},{},[5004],{"type":21,"value":5005},"When Atlas Vector Search isn't available, the platform falls back to a token-overlap scoring function. Same return shape; slightly worse ranking. The seam is invisible to your code.",{"type":15,"tag":24,"props":5007,"children":5008},{},[5009,5014],{"type":15,"tag":44,"props":5010,"children":5011},{},[5012],{"type":21,"value":5013},"Use it when:",{"type":21,"value":5015}," most of the time. Working context uses this under the hood. Anywhere the agent needs to \"remember something about a topic.\"",{"type":15,"tag":1799,"props":5017,"children":5019},{"id":5018},"recallbyentity-everything-about-x",[5020,5025],{"type":15,"tag":57,"props":5021,"children":5023},{"className":5022},[],[5024],{"type":21,"value":4005},{"type":21,"value":5026}," — Everything About X",{"type":15,"tag":24,"props":5028,"children":5029},{},[5030],{"type":21,"value":5031},"Given an entity (a person, organisation, place, etc.), return every atom that mentions it. Newest first.",{"type":15,"tag":348,"props":5033,"children":5035},{"code":5034,"language":453,"meta":7,"className":454,"style":7},"var acme = memory.findEntityByName(spaceId, {\n    type: \"ORGANIZATION\",\n    name: \"Acme Corporation\"\n});\n\nvar history = memory.recallByEntity(spaceId, {\n    entityIdOrName: acme.id,\n    limit: 50\n});\n",[5036],{"type":15,"tag":57,"props":5037,"children":5038},{"__ignoreMap":7},[5039,5066,5081,5092,5099,5106,5134,5141,5153],{"type":15,"tag":460,"props":5040,"children":5041},{"class":462,"line":463},[5042,5046,5050,5054,5058,5062],{"type":15,"tag":460,"props":5043,"children":5044},{"style":495},[5045],{"type":21,"value":1991},{"type":15,"tag":460,"props":5047,"children":5048},{"style":507},[5049],{"type":21,"value":3911},{"type":15,"tag":460,"props":5051,"children":5052},{"style":495},[5053],{"type":21,"value":540},{"type":15,"tag":460,"props":5055,"children":5056},{"style":507},[5057],{"type":21,"value":936},{"type":15,"tag":460,"props":5059,"children":5060},{"style":501},[5061],{"type":21,"value":3924},{"type":15,"tag":460,"props":5063,"children":5064},{"style":507},[5065],{"type":21,"value":3531},{"type":15,"tag":460,"props":5067,"children":5068},{"class":462,"line":473},[5069,5073,5077],{"type":15,"tag":460,"props":5070,"children":5071},{"style":507},[5072],{"type":21,"value":3936},{"type":15,"tag":460,"props":5074,"children":5075},{"style":714},[5076],{"type":21,"value":3941},{"type":15,"tag":460,"props":5078,"children":5079},{"style":507},[5080],{"type":21,"value":809},{"type":15,"tag":460,"props":5082,"children":5083},{"class":462,"line":482},[5084,5088],{"type":15,"tag":460,"props":5085,"children":5086},{"style":507},[5087],{"type":21,"value":3953},{"type":15,"tag":460,"props":5089,"children":5090},{"style":714},[5091],{"type":21,"value":3958},{"type":15,"tag":460,"props":5093,"children":5094},{"class":462,"line":491},[5095],{"type":15,"tag":460,"props":5096,"children":5097},{"style":507},[5098],{"type":21,"value":2124},{"type":15,"tag":460,"props":5100,"children":5101},{"class":462,"line":524},[5102],{"type":15,"tag":460,"props":5103,"children":5104},{"emptyLinePlaceholder":622},[5105],{"type":21,"value":625},{"type":15,"tag":460,"props":5107,"children":5108},{"class":462,"line":558},[5109,5113,5118,5122,5126,5130],{"type":15,"tag":460,"props":5110,"children":5111},{"style":495},[5112],{"type":21,"value":1991},{"type":15,"tag":460,"props":5114,"children":5115},{"style":507},[5116],{"type":21,"value":5117}," history ",{"type":15,"tag":460,"props":5119,"children":5120},{"style":495},[5121],{"type":21,"value":540},{"type":15,"tag":460,"props":5123,"children":5124},{"style":507},[5125],{"type":21,"value":936},{"type":15,"tag":460,"props":5127,"children":5128},{"style":501},[5129],{"type":21,"value":4005},{"type":15,"tag":460,"props":5131,"children":5132},{"style":507},[5133],{"type":21,"value":3531},{"type":15,"tag":460,"props":5135,"children":5136},{"class":462,"line":588},[5137],{"type":15,"tag":460,"props":5138,"children":5139},{"style":507},[5140],{"type":21,"value":4017},{"type":15,"tag":460,"props":5142,"children":5143},{"class":462,"line":618},[5144,5148],{"type":15,"tag":460,"props":5145,"children":5146},{"style":507},[5147],{"type":21,"value":4025},{"type":15,"tag":460,"props":5149,"children":5150},{"style":872},[5151],{"type":21,"value":5152},"50\n",{"type":15,"tag":460,"props":5154,"children":5155},{"class":462,"line":628},[5156],{"type":15,"tag":460,"props":5157,"children":5158},{"style":507},[5159],{"type":21,"value":2124},{"type":15,"tag":24,"props":5161,"children":5162},{},[5163,5167],{"type":15,"tag":44,"props":5164,"children":5165},{},[5166],{"type":21,"value":5013},{"type":21,"value":5168}," profile-style summaries. Customer detail pages. \"Tell me everything about user X.\" Anywhere an entity is the lens, not a topic.",{"type":15,"tag":1799,"props":5170,"children":5172},{"id":5171},"recalltimeline-what-was-true-at-time-t",[5173,5179],{"type":15,"tag":57,"props":5174,"children":5176},{"className":5175},[],[5177],{"type":21,"value":5178},"recallTimeline",{"type":21,"value":5180}," — What Was True At Time T",{"type":15,"tag":24,"props":5182,"children":5183},{},[5184],{"type":21,"value":5185},"Bi-temporal queries: include superseded atoms, slice by validity window, see the history of changes.",{"type":15,"tag":348,"props":5187,"children":5189},{"code":5188,"language":453,"meta":7,"className":454,"style":7},"// What did we know about Acme between Jan 1 and April 30?\nvar window = memory.recallTimeline(spaceId, {\n    entityIdOrName: \"Acme Corporation\",\n    from: \"2026-01-01T00:00:00Z\",\n    to:   \"2026-04-30T23:59:59Z\",\n    limit: 20\n});\n",[5190],{"type":15,"tag":57,"props":5191,"children":5192},{"__ignoreMap":7},[5193,5201,5229,5246,5263,5280,5291],{"type":15,"tag":460,"props":5194,"children":5195},{"class":462,"line":463},[5196],{"type":15,"tag":460,"props":5197,"children":5198},{"style":467},[5199],{"type":21,"value":5200},"// What did we know about Acme between Jan 1 and April 30?\n",{"type":15,"tag":460,"props":5202,"children":5203},{"class":462,"line":473},[5204,5208,5213,5217,5221,5225],{"type":15,"tag":460,"props":5205,"children":5206},{"style":495},[5207],{"type":21,"value":1991},{"type":15,"tag":460,"props":5209,"children":5210},{"style":507},[5211],{"type":21,"value":5212}," window ",{"type":15,"tag":460,"props":5214,"children":5215},{"style":495},[5216],{"type":21,"value":540},{"type":15,"tag":460,"props":5218,"children":5219},{"style":507},[5220],{"type":21,"value":936},{"type":15,"tag":460,"props":5222,"children":5223},{"style":501},[5224],{"type":21,"value":5178},{"type":15,"tag":460,"props":5226,"children":5227},{"style":507},[5228],{"type":21,"value":3531},{"type":15,"tag":460,"props":5230,"children":5231},{"class":462,"line":482},[5232,5237,5242],{"type":15,"tag":460,"props":5233,"children":5234},{"style":507},[5235],{"type":21,"value":5236},"    entityIdOrName: ",{"type":15,"tag":460,"props":5238,"children":5239},{"style":714},[5240],{"type":21,"value":5241},"\"Acme Corporation\"",{"type":15,"tag":460,"props":5243,"children":5244},{"style":507},[5245],{"type":21,"value":809},{"type":15,"tag":460,"props":5247,"children":5248},{"class":462,"line":491},[5249,5254,5259],{"type":15,"tag":460,"props":5250,"children":5251},{"style":507},[5252],{"type":21,"value":5253},"    from: ",{"type":15,"tag":460,"props":5255,"children":5256},{"style":714},[5257],{"type":21,"value":5258},"\"2026-01-01T00:00:00Z\"",{"type":15,"tag":460,"props":5260,"children":5261},{"style":507},[5262],{"type":21,"value":809},{"type":15,"tag":460,"props":5264,"children":5265},{"class":462,"line":524},[5266,5271,5276],{"type":15,"tag":460,"props":5267,"children":5268},{"style":507},[5269],{"type":21,"value":5270},"    to:   ",{"type":15,"tag":460,"props":5272,"children":5273},{"style":714},[5274],{"type":21,"value":5275},"\"2026-04-30T23:59:59Z\"",{"type":15,"tag":460,"props":5277,"children":5278},{"style":507},[5279],{"type":21,"value":809},{"type":15,"tag":460,"props":5281,"children":5282},{"class":462,"line":558},[5283,5287],{"type":15,"tag":460,"props":5284,"children":5285},{"style":507},[5286],{"type":21,"value":4025},{"type":15,"tag":460,"props":5288,"children":5289},{"style":872},[5290],{"type":21,"value":4030},{"type":15,"tag":460,"props":5292,"children":5293},{"class":462,"line":588},[5294],{"type":15,"tag":460,"props":5295,"children":5296},{"style":507},[5297],{"type":21,"value":2124},{"type":15,"tag":24,"props":5299,"children":5300},{},[5301,5306],{"type":15,"tag":57,"props":5302,"children":5304},{"className":5303},[],[5305],{"type":21,"value":5178},{"type":21,"value":5307}," includes superseded atoms by default — that's the whole point. You see the change history.",{"type":15,"tag":24,"props":5309,"children":5310},{},[5311,5315],{"type":15,"tag":44,"props":5312,"children":5313},{},[5314],{"type":21,"value":5013},{"type":21,"value":5316}," audits, \"what did we know at the time we made this decision\", reasoning about change over time, compliance reports.",{"type":15,"tag":1799,"props":5318,"children":5320},{"id":5319},"recall-result-shape",[5321],{"type":21,"value":5322},"Recall Result Shape",{"type":15,"tag":24,"props":5324,"children":5325},{},[5326],{"type":21,"value":5327},"All three modes return the same shape:",{"type":15,"tag":348,"props":5329,"children":5331},{"code":5330,"language":453,"meta":7,"className":454,"style":7},"{\n    mode:            \"BY_TOPIC\",   // or BY_ENTITY / TIMELINE\n    totalCandidates: 47,           // candidates before limit\n    latencyMs:       12,\n    hits: [\n        {\n            atom: {\n                id:            \"atom_abc123\",\n                text:          \"User prefers morning meetings\",\n                category:      { name: \"preference\", kind: \"PREFERENCE\" },\n                importance:    4,\n                confidence:    0.95,\n                validFrom:     \"2026-04-30T...\",\n                validTo:       null,            // null = currently valid\n                sourceConversationId: \"conv_xyz\",\n                sourceMessageIds:     [\"msg_1\", \"msg_5\"],\n                entityIds:     [ ... ]\n            },\n            score:            0.91,             // post-fusion ranking\n            decayWeight:      1.0,\n            entityMatchBonus: 1.0\n        },\n        // ...\n    ]\n}\n",[5332],{"type":15,"tag":57,"props":5333,"children":5334},{"__ignoreMap":7},[5335,5343,5370,5397,5419,5432,5440,5448,5465,5481,5505,5521,5538,5555,5578,5595,5622,5640,5648,5671,5688,5701,5709,5717,5725],{"type":15,"tag":460,"props":5336,"children":5337},{"class":462,"line":463},[5338],{"type":15,"tag":460,"props":5339,"children":5340},{"style":507},[5341],{"type":21,"value":5342},"{\n",{"type":15,"tag":460,"props":5344,"children":5345},{"class":462,"line":473},[5346,5351,5356,5361,5365],{"type":15,"tag":460,"props":5347,"children":5348},{"style":501},[5349],{"type":21,"value":5350},"    mode",{"type":15,"tag":460,"props":5352,"children":5353},{"style":507},[5354],{"type":21,"value":5355},":            ",{"type":15,"tag":460,"props":5357,"children":5358},{"style":714},[5359],{"type":21,"value":5360},"\"BY_TOPIC\"",{"type":15,"tag":460,"props":5362,"children":5363},{"style":507},[5364],{"type":21,"value":4301},{"type":15,"tag":460,"props":5366,"children":5367},{"style":467},[5368],{"type":21,"value":5369},"// or BY_ENTITY / TIMELINE\n",{"type":15,"tag":460,"props":5371,"children":5372},{"class":462,"line":482},[5373,5378,5382,5387,5392],{"type":15,"tag":460,"props":5374,"children":5375},{"style":501},[5376],{"type":21,"value":5377},"    totalCandidates",{"type":15,"tag":460,"props":5379,"children":5380},{"style":507},[5381],{"type":21,"value":2407},{"type":15,"tag":460,"props":5383,"children":5384},{"style":872},[5385],{"type":21,"value":5386},"47",{"type":15,"tag":460,"props":5388,"children":5389},{"style":507},[5390],{"type":21,"value":5391},",           ",{"type":15,"tag":460,"props":5393,"children":5394},{"style":467},[5395],{"type":21,"value":5396},"// candidates before limit\n",{"type":15,"tag":460,"props":5398,"children":5399},{"class":462,"line":491},[5400,5405,5410,5415],{"type":15,"tag":460,"props":5401,"children":5402},{"style":501},[5403],{"type":21,"value":5404},"    latencyMs",{"type":15,"tag":460,"props":5406,"children":5407},{"style":507},[5408],{"type":21,"value":5409},":       ",{"type":15,"tag":460,"props":5411,"children":5412},{"style":872},[5413],{"type":21,"value":5414},"12",{"type":15,"tag":460,"props":5416,"children":5417},{"style":507},[5418],{"type":21,"value":809},{"type":15,"tag":460,"props":5420,"children":5421},{"class":462,"line":524},[5422,5427],{"type":15,"tag":460,"props":5423,"children":5424},{"style":501},[5425],{"type":21,"value":5426},"    hits",{"type":15,"tag":460,"props":5428,"children":5429},{"style":507},[5430],{"type":21,"value":5431},": [\n",{"type":15,"tag":460,"props":5433,"children":5434},{"class":462,"line":558},[5435],{"type":15,"tag":460,"props":5436,"children":5437},{"style":507},[5438],{"type":21,"value":5439},"        {\n",{"type":15,"tag":460,"props":5441,"children":5442},{"class":462,"line":588},[5443],{"type":15,"tag":460,"props":5444,"children":5445},{"style":507},[5446],{"type":21,"value":5447},"            atom: {\n",{"type":15,"tag":460,"props":5449,"children":5450},{"class":462,"line":618},[5451,5456,5461],{"type":15,"tag":460,"props":5452,"children":5453},{"style":507},[5454],{"type":21,"value":5455},"                id:            ",{"type":15,"tag":460,"props":5457,"children":5458},{"style":714},[5459],{"type":21,"value":5460},"\"atom_abc123\"",{"type":15,"tag":460,"props":5462,"children":5463},{"style":507},[5464],{"type":21,"value":809},{"type":15,"tag":460,"props":5466,"children":5467},{"class":462,"line":628},[5468,5473,5477],{"type":15,"tag":460,"props":5469,"children":5470},{"style":507},[5471],{"type":21,"value":5472},"                text:          ",{"type":15,"tag":460,"props":5474,"children":5475},{"style":714},[5476],{"type":21,"value":3051},{"type":15,"tag":460,"props":5478,"children":5479},{"style":507},[5480],{"type":21,"value":809},{"type":15,"tag":460,"props":5482,"children":5483},{"class":462,"line":637},[5484,5489,5493,5497,5501],{"type":15,"tag":460,"props":5485,"children":5486},{"style":507},[5487],{"type":21,"value":5488},"                category:      { name: ",{"type":15,"tag":460,"props":5490,"children":5491},{"style":714},[5492],{"type":21,"value":1218},{"type":15,"tag":460,"props":5494,"children":5495},{"style":507},[5496],{"type":21,"value":3564},{"type":15,"tag":460,"props":5498,"children":5499},{"style":714},[5500],{"type":21,"value":3569},{"type":15,"tag":460,"props":5502,"children":5503},{"style":507},[5504],{"type":21,"value":3574},{"type":15,"tag":460,"props":5506,"children":5507},{"class":462,"line":695},[5508,5513,5517],{"type":15,"tag":460,"props":5509,"children":5510},{"style":507},[5511],{"type":21,"value":5512},"                importance:    ",{"type":15,"tag":460,"props":5514,"children":5515},{"style":872},[5516],{"type":21,"value":3587},{"type":15,"tag":460,"props":5518,"children":5519},{"style":507},[5520],{"type":21,"value":809},{"type":15,"tag":460,"props":5522,"children":5523},{"class":462,"line":744},[5524,5529,5534],{"type":15,"tag":460,"props":5525,"children":5526},{"style":507},[5527],{"type":21,"value":5528},"                confidence:    ",{"type":15,"tag":460,"props":5530,"children":5531},{"style":872},[5532],{"type":21,"value":5533},"0.95",{"type":15,"tag":460,"props":5535,"children":5536},{"style":507},[5537],{"type":21,"value":809},{"type":15,"tag":460,"props":5539,"children":5540},{"class":462,"line":753},[5541,5546,5551],{"type":15,"tag":460,"props":5542,"children":5543},{"style":507},[5544],{"type":21,"value":5545},"                validFrom:     ",{"type":15,"tag":460,"props":5547,"children":5548},{"style":714},[5549],{"type":21,"value":5550},"\"2026-04-30T...\"",{"type":15,"tag":460,"props":5552,"children":5553},{"style":507},[5554],{"type":21,"value":809},{"type":15,"tag":460,"props":5556,"children":5557},{"class":462,"line":793},[5558,5563,5568,5573],{"type":15,"tag":460,"props":5559,"children":5560},{"style":507},[5561],{"type":21,"value":5562},"                validTo:       ",{"type":15,"tag":460,"props":5564,"children":5565},{"style":872},[5566],{"type":21,"value":5567},"null",{"type":15,"tag":460,"props":5569,"children":5570},{"style":507},[5571],{"type":21,"value":5572},",            ",{"type":15,"tag":460,"props":5574,"children":5575},{"style":467},[5576],{"type":21,"value":5577},"// null = currently valid\n",{"type":15,"tag":460,"props":5579,"children":5580},{"class":462,"line":812},[5581,5586,5591],{"type":15,"tag":460,"props":5582,"children":5583},{"style":507},[5584],{"type":21,"value":5585},"                sourceConversationId: ",{"type":15,"tag":460,"props":5587,"children":5588},{"style":714},[5589],{"type":21,"value":5590},"\"conv_xyz\"",{"type":15,"tag":460,"props":5592,"children":5593},{"style":507},[5594],{"type":21,"value":809},{"type":15,"tag":460,"props":5596,"children":5597},{"class":462,"line":830},[5598,5603,5608,5612,5617],{"type":15,"tag":460,"props":5599,"children":5600},{"style":507},[5601],{"type":21,"value":5602},"                sourceMessageIds:     [",{"type":15,"tag":460,"props":5604,"children":5605},{"style":714},[5606],{"type":21,"value":5607},"\"msg_1\"",{"type":15,"tag":460,"props":5609,"children":5610},{"style":507},[5611],{"type":21,"value":319},{"type":15,"tag":460,"props":5613,"children":5614},{"style":714},[5615],{"type":21,"value":5616},"\"msg_5\"",{"type":15,"tag":460,"props":5618,"children":5619},{"style":507},[5620],{"type":21,"value":5621},"],\n",{"type":15,"tag":460,"props":5623,"children":5624},{"class":462,"line":892},[5625,5630,5635],{"type":15,"tag":460,"props":5626,"children":5627},{"style":507},[5628],{"type":21,"value":5629},"                entityIds:     [ ",{"type":15,"tag":460,"props":5631,"children":5632},{"style":495},[5633],{"type":21,"value":5634},"...",{"type":15,"tag":460,"props":5636,"children":5637},{"style":507},[5638],{"type":21,"value":5639}," ]\n",{"type":15,"tag":460,"props":5641,"children":5642},{"class":462,"line":900},[5643],{"type":15,"tag":460,"props":5644,"children":5645},{"style":507},[5646],{"type":21,"value":5647},"            },\n",{"type":15,"tag":460,"props":5649,"children":5650},{"class":462,"line":908},[5651,5656,5661,5666],{"type":15,"tag":460,"props":5652,"children":5653},{"style":507},[5654],{"type":21,"value":5655},"            score:            ",{"type":15,"tag":460,"props":5657,"children":5658},{"style":872},[5659],{"type":21,"value":5660},"0.91",{"type":15,"tag":460,"props":5662,"children":5663},{"style":507},[5664],{"type":21,"value":5665},",             ",{"type":15,"tag":460,"props":5667,"children":5668},{"style":467},[5669],{"type":21,"value":5670},"// post-fusion ranking\n",{"type":15,"tag":460,"props":5672,"children":5673},{"class":462,"line":917},[5674,5679,5684],{"type":15,"tag":460,"props":5675,"children":5676},{"style":507},[5677],{"type":21,"value":5678},"            decayWeight:      ",{"type":15,"tag":460,"props":5680,"children":5681},{"style":872},[5682],{"type":21,"value":5683},"1.0",{"type":15,"tag":460,"props":5685,"children":5686},{"style":507},[5687],{"type":21,"value":809},{"type":15,"tag":460,"props":5689,"children":5690},{"class":462,"line":973},[5691,5696],{"type":15,"tag":460,"props":5692,"children":5693},{"style":507},[5694],{"type":21,"value":5695},"            entityMatchBonus: ",{"type":15,"tag":460,"props":5697,"children":5698},{"style":872},[5699],{"type":21,"value":5700},"1.0\n",{"type":15,"tag":460,"props":5702,"children":5703},{"class":462,"line":999},[5704],{"type":15,"tag":460,"props":5705,"children":5706},{"style":507},[5707],{"type":21,"value":5708},"        },\n",{"type":15,"tag":460,"props":5710,"children":5711},{"class":462,"line":1007},[5712],{"type":15,"tag":460,"props":5713,"children":5714},{"style":467},[5715],{"type":21,"value":5716},"        // ...\n",{"type":15,"tag":460,"props":5718,"children":5719},{"class":462,"line":1031},[5720],{"type":15,"tag":460,"props":5721,"children":5722},{"style":507},[5723],{"type":21,"value":5724},"    ]\n",{"type":15,"tag":460,"props":5726,"children":5727},{"class":462,"line":1068},[5728],{"type":15,"tag":460,"props":5729,"children":5730},{"style":507},[5731],{"type":21,"value":1684},{"type":15,"tag":24,"props":5733,"children":5734},{},[5735,5736,5742],{"type":21,"value":3285},{"type":15,"tag":57,"props":5737,"children":5739},{"className":5738},[],[5740],{"type":21,"value":5741},"score",{"type":21,"value":5743}," is the platform's final ranking — it already combines vector similarity, decay, and importance. Sort by it directly.",{"type":15,"tag":1770,"props":5745,"children":5746},{},[],{"type":15,"tag":66,"props":5748,"children":5750},{"id":5749},"working-context-a-prompt-that-remembers",[5751],{"type":21,"value":5752},"Working Context: A Prompt That \"Remembers\"",{"type":15,"tag":24,"props":5754,"children":5755},{},[5756,5758,5762],{"type":21,"value":5757},"Recall is a primitive. ",{"type":15,"tag":44,"props":5759,"children":5760},{},[5761],{"type":21,"value":248},{"type":21,"value":5763}," is the ready-to-feed-the-LLM block built from recall + the conversation tail + the rolling summary.",{"type":15,"tag":24,"props":5765,"children":5766},{},[5767],{"type":21,"value":5768},"Instead of writing 50 lines of code to build a prompt that pulls in identity facts + recent conversation summary + relevant memories + the recent message tail, you call one method:",{"type":15,"tag":348,"props":5770,"children":5772},{"code":5771,"language":453,"meta":7,"className":454,"style":7},"var ctx = context.getWorkingContext().buildWorkingContext(\n    conversationId,\n    {\n        memorySpaceId: space.id,\n        recallQuery:   \"the user's question right now\",\n        recentTurns:   10,\n        recallLimit:   8,\n        tokenBudget:   8000,\n        alwaysOnCategoryNames: [\"identity\", \"preference\"],\n        includeRollingSummary: true\n    }\n);\n\n// ctx is a Map with:\n//   contextBlock:    \"...assembled prompt...\"   (single string)\n//   messages:        [ ... ]                    (canonical message list)\n//   atomsUsed:       [ ... ]                    (the atoms that landed)\n//   tokensEstimated: 4321\n",[5773],{"type":15,"tag":57,"props":5774,"children":5775},{"__ignoreMap":7},[5776,5812,5820,5828,5835,5851,5866,5881,5898,5921,5934,5941,5948,5955,5963,5971,5979,5987],{"type":15,"tag":460,"props":5777,"children":5778},{"class":462,"line":463},[5779,5783,5787,5791,5795,5799,5803,5807],{"type":15,"tag":460,"props":5780,"children":5781},{"style":495},[5782],{"type":21,"value":1991},{"type":15,"tag":460,"props":5784,"children":5785},{"style":507},[5786],{"type":21,"value":1113},{"type":15,"tag":460,"props":5788,"children":5789},{"style":495},[5790],{"type":21,"value":540},{"type":15,"tag":460,"props":5792,"children":5793},{"style":507},[5794],{"type":21,"value":545},{"type":15,"tag":460,"props":5796,"children":5797},{"style":501},[5798],{"type":21,"value":611},{"type":15,"tag":460,"props":5800,"children":5801},{"style":507},[5802],{"type":21,"value":851},{"type":15,"tag":460,"props":5804,"children":5805},{"style":501},[5806],{"type":21,"value":1127},{"type":15,"tag":460,"props":5808,"children":5809},{"style":507},[5810],{"type":21,"value":5811},"(\n",{"type":15,"tag":460,"props":5813,"children":5814},{"class":462,"line":473},[5815],{"type":15,"tag":460,"props":5816,"children":5817},{"style":507},[5818],{"type":21,"value":5819},"    conversationId,\n",{"type":15,"tag":460,"props":5821,"children":5822},{"class":462,"line":482},[5823],{"type":15,"tag":460,"props":5824,"children":5825},{"style":507},[5826],{"type":21,"value":5827},"    {\n",{"type":15,"tag":460,"props":5829,"children":5830},{"class":462,"line":491},[5831],{"type":15,"tag":460,"props":5832,"children":5833},{"style":507},[5834],{"type":21,"value":1141},{"type":15,"tag":460,"props":5836,"children":5837},{"class":462,"line":524},[5838,5842,5847],{"type":15,"tag":460,"props":5839,"children":5840},{"style":507},[5841],{"type":21,"value":1150},{"type":15,"tag":460,"props":5843,"children":5844},{"style":714},[5845],{"type":21,"value":5846},"\"the user's question right now\"",{"type":15,"tag":460,"props":5848,"children":5849},{"style":507},[5850],{"type":21,"value":809},{"type":15,"tag":460,"props":5852,"children":5853},{"class":462,"line":558},[5854,5858,5862],{"type":15,"tag":460,"props":5855,"children":5856},{"style":507},[5857],{"type":21,"value":1168},{"type":15,"tag":460,"props":5859,"children":5860},{"style":872},[5861],{"type":21,"value":884},{"type":15,"tag":460,"props":5863,"children":5864},{"style":507},[5865],{"type":21,"value":809},{"type":15,"tag":460,"props":5867,"children":5868},{"class":462,"line":588},[5869,5873,5877],{"type":15,"tag":460,"props":5870,"children":5871},{"style":507},[5872],{"type":21,"value":1186},{"type":15,"tag":460,"props":5874,"children":5875},{"style":872},[5876],{"type":21,"value":1173},{"type":15,"tag":460,"props":5878,"children":5879},{"style":507},[5880],{"type":21,"value":809},{"type":15,"tag":460,"props":5882,"children":5883},{"class":462,"line":618},[5884,5889,5894],{"type":15,"tag":460,"props":5885,"children":5886},{"style":507},[5887],{"type":21,"value":5888},"        tokenBudget:   ",{"type":15,"tag":460,"props":5890,"children":5891},{"style":872},[5892],{"type":21,"value":5893},"8000",{"type":15,"tag":460,"props":5895,"children":5896},{"style":507},[5897],{"type":21,"value":809},{"type":15,"tag":460,"props":5899,"children":5900},{"class":462,"line":628},[5901,5905,5909,5913,5917],{"type":15,"tag":460,"props":5902,"children":5903},{"style":507},[5904],{"type":21,"value":1204},{"type":15,"tag":460,"props":5906,"children":5907},{"style":714},[5908],{"type":21,"value":1209},{"type":15,"tag":460,"props":5910,"children":5911},{"style":507},[5912],{"type":21,"value":319},{"type":15,"tag":460,"props":5914,"children":5915},{"style":714},[5916],{"type":21,"value":1218},{"type":15,"tag":460,"props":5918,"children":5919},{"style":507},[5920],{"type":21,"value":5621},{"type":15,"tag":460,"props":5922,"children":5923},{"class":462,"line":637},[5924,5929],{"type":15,"tag":460,"props":5925,"children":5926},{"style":507},[5927],{"type":21,"value":5928},"        includeRollingSummary: ",{"type":15,"tag":460,"props":5930,"children":5931},{"style":872},[5932],{"type":21,"value":5933},"true\n",{"type":15,"tag":460,"props":5935,"children":5936},{"class":462,"line":695},[5937],{"type":15,"tag":460,"props":5938,"children":5939},{"style":507},[5940],{"type":21,"value":1074},{"type":15,"tag":460,"props":5942,"children":5943},{"class":462,"line":744},[5944],{"type":15,"tag":460,"props":5945,"children":5946},{"style":507},[5947],{"type":21,"value":1610},{"type":15,"tag":460,"props":5949,"children":5950},{"class":462,"line":753},[5951],{"type":15,"tag":460,"props":5952,"children":5953},{"emptyLinePlaceholder":622},[5954],{"type":21,"value":625},{"type":15,"tag":460,"props":5956,"children":5957},{"class":462,"line":793},[5958],{"type":15,"tag":460,"props":5959,"children":5960},{"style":467},[5961],{"type":21,"value":5962},"// ctx is a Map with:\n",{"type":15,"tag":460,"props":5964,"children":5965},{"class":462,"line":812},[5966],{"type":15,"tag":460,"props":5967,"children":5968},{"style":467},[5969],{"type":21,"value":5970},"//   contextBlock:    \"...assembled prompt...\"   (single string)\n",{"type":15,"tag":460,"props":5972,"children":5973},{"class":462,"line":830},[5974],{"type":15,"tag":460,"props":5975,"children":5976},{"style":467},[5977],{"type":21,"value":5978},"//   messages:        [ ... ]                    (canonical message list)\n",{"type":15,"tag":460,"props":5980,"children":5981},{"class":462,"line":892},[5982],{"type":15,"tag":460,"props":5983,"children":5984},{"style":467},[5985],{"type":21,"value":5986},"//   atomsUsed:       [ ... ]                    (the atoms that landed)\n",{"type":15,"tag":460,"props":5988,"children":5989},{"class":462,"line":900},[5990],{"type":15,"tag":460,"props":5991,"children":5992},{"style":467},[5993],{"type":21,"value":5994},"//   tokensEstimated: 4321\n",{"type":15,"tag":24,"props":5996,"children":5997},{},[5998,6000,6006],{"type":21,"value":5999},"Feed ",{"type":15,"tag":57,"props":6001,"children":6003},{"className":6002},[],[6004],{"type":21,"value":6005},"ctx.contextBlock",{"type":21,"value":6007}," into your LLM call as the system prompt (or as the leading content of your user prompt — the template controls where it lands).",{"type":15,"tag":1799,"props":6009,"children":6011},{"id":6010},"what-gets-included",[6012],{"type":21,"value":6013},"What Gets Included",{"type":15,"tag":24,"props":6015,"children":6016},{},[6017],{"type":21,"value":6018},"By default, the working context block has four sections:",{"type":15,"tag":348,"props":6020,"children":6022},{"code":6021},"═══════════════════════════════════════════════════════════\n1. ROLLING SUMMARY (if includeRollingSummary)\n   \"Across previous turns, the user established that they\n    work in product management at Acme, prefer morning\n    meetings, and are working towards launching the Q3 release...\"\n\n2. ALWAYS-ON ATOMS (alwaysOnCategoryNames)\n   \"User name: Johan Eriksson\"\n   \"User role: CTO at Snubbas\"\n   \"User prefers concise answers\"\n\n3. RECALLED ATOMS (semantic, recallQuery → BY_TOPIC)\n   \"User cancelled their last 3 meetings on Tuesday afternoons\"\n   \"User mentioned a conflict with the Q2 review meeting\"\n\n4. RECENT TURNS (the conversation tail, recentTurns count)\n   user:      \"Can we move next week's status to morning?\"\n   assistant: \"Sure, which morning?\"\n   user:      \"Tuesday.\"\n═══════════════════════════════════════════════════════════\n",[6023],{"type":15,"tag":57,"props":6024,"children":6025},{"__ignoreMap":7},[6026],{"type":21,"value":6021},{"type":15,"tag":24,"props":6028,"children":6029},{},[6030,6032,6037],{"type":21,"value":6031},"The token budget is enforced top-to-bottom: rolling summary first (cheap, always in), then always-on atoms, then recall hits, then recent turns. If you exceed the budget, ",{"type":15,"tag":44,"props":6033,"children":6034},{},[6035],{"type":21,"value":6036},"recent turns get trimmed first",{"type":21,"value":6038},", then recall hits.",{"type":15,"tag":1799,"props":6040,"children":6042},{"id":6041},"tuning-knobs",[6043],{"type":21,"value":6044},"Tuning Knobs",{"type":15,"tag":156,"props":6046,"children":6047},{},[6048,6069],{"type":15,"tag":160,"props":6049,"children":6050},{},[6051],{"type":15,"tag":164,"props":6052,"children":6053},{},[6054,6059,6064],{"type":15,"tag":168,"props":6055,"children":6056},{},[6057],{"type":21,"value":6058},"Parameter",{"type":15,"tag":168,"props":6060,"children":6061},{},[6062],{"type":21,"value":6063},"Default",{"type":15,"tag":168,"props":6065,"children":6066},{},[6067],{"type":21,"value":6068},"When to change it",{"type":15,"tag":184,"props":6070,"children":6071},{},[6072,6093,6114,6135,6167,6206],{"type":15,"tag":164,"props":6073,"children":6074},{},[6075,6084,6088],{"type":15,"tag":191,"props":6076,"children":6077},{},[6078],{"type":15,"tag":57,"props":6079,"children":6081},{"className":6080},[],[6082],{"type":21,"value":6083},"recentTurns",{"type":15,"tag":191,"props":6085,"children":6086},{},[6087],{"type":21,"value":884},{"type":15,"tag":191,"props":6089,"children":6090},{},[6091],{"type":21,"value":6092},"Fewer for tighter token budgets; more for chat-heavy apps",{"type":15,"tag":164,"props":6094,"children":6095},{},[6096,6105,6109],{"type":15,"tag":191,"props":6097,"children":6098},{},[6099],{"type":15,"tag":57,"props":6100,"children":6102},{"className":6101},[],[6103],{"type":21,"value":6104},"recallLimit",{"type":15,"tag":191,"props":6106,"children":6107},{},[6108],{"type":21,"value":1173},{"type":15,"tag":191,"props":6110,"children":6111},{},[6112],{"type":21,"value":6113},"Lower (3–5) when the user message is short; higher (10–15) for complex queries",{"type":15,"tag":164,"props":6115,"children":6116},{},[6117,6126,6130],{"type":15,"tag":191,"props":6118,"children":6119},{},[6120],{"type":15,"tag":57,"props":6121,"children":6123},{"className":6122},[],[6124],{"type":21,"value":6125},"tokenBudget",{"type":15,"tag":191,"props":6127,"children":6128},{},[6129],{"type":21,"value":5893},{"type":15,"tag":191,"props":6131,"children":6132},{},[6133],{"type":21,"value":6134},"Match your model's context window minus output budget",{"type":15,"tag":164,"props":6136,"children":6137},{},[6138,6147,6155],{"type":15,"tag":191,"props":6139,"children":6140},{},[6141],{"type":15,"tag":57,"props":6142,"children":6144},{"className":6143},[],[6145],{"type":21,"value":6146},"includeRollingSummary",{"type":15,"tag":191,"props":6148,"children":6149},{},[6150],{"type":15,"tag":57,"props":6151,"children":6153},{"className":6152},[],[6154],{"type":21,"value":4319},{"type":15,"tag":191,"props":6156,"children":6157},{},[6158,6160,6165],{"type":21,"value":6159},"Set ",{"type":15,"tag":57,"props":6161,"children":6163},{"className":6162},[],[6164],{"type":21,"value":4341},{"type":21,"value":6166}," for very short / single-turn conversations",{"type":15,"tag":164,"props":6168,"children":6169},{},[6170,6178,6187],{"type":15,"tag":191,"props":6171,"children":6172},{},[6173],{"type":15,"tag":57,"props":6174,"children":6176},{"className":6175},[],[6177],{"type":21,"value":1719},{"type":15,"tag":191,"props":6179,"children":6180},{},[6181],{"type":15,"tag":57,"props":6182,"children":6184},{"className":6183},[],[6185],{"type":21,"value":6186},"[]",{"type":15,"tag":191,"props":6188,"children":6189},{},[6190,6192,6197,6199,6204],{"type":21,"value":6191},"Heavily app-dependent; ",{"type":15,"tag":57,"props":6193,"children":6195},{"className":6194},[],[6196],{"type":21,"value":1727},{"type":21,"value":6198}," + ",{"type":15,"tag":57,"props":6200,"children":6202},{"className":6201},[],[6203],{"type":21,"value":1734},{"type":21,"value":6205}," are common",{"type":15,"tag":164,"props":6207,"children":6208},{},[6209,6217,6222],{"type":15,"tag":191,"props":6210,"children":6211},{},[6212],{"type":15,"tag":57,"props":6213,"children":6215},{"className":6214},[],[6216],{"type":21,"value":1750},{"type":15,"tag":191,"props":6218,"children":6219},{},[6220],{"type":21,"value":6221},"(none)",{"type":15,"tag":191,"props":6223,"children":6224},{},[6225],{"type":21,"value":6226},"Usually the user's current message",{"type":15,"tag":1799,"props":6228,"children":6230},{"id":6229},"custom-templates",[6231],{"type":21,"value":6232},"Custom Templates",{"type":15,"tag":24,"props":6234,"children":6235},{},[6236],{"type":21,"value":6237},"The default template renders the four sections above. If you need a different layout (e.g., XML tags for Anthropic's prompt preferences, or a chat-message array instead of a single string), register a custom Mustache template via the platform startup hooks. For most apps the default is fine.",{"type":15,"tag":1770,"props":6239,"children":6240},{},[],{"type":15,"tag":66,"props":6242,"children":6244},{"id":6243},"letting-the-agent-recall-on-its-own",[6245],{"type":21,"value":6246},"Letting The Agent Recall On Its Own",{"type":15,"tag":24,"props":6248,"children":6249},{},[6250,6252,6257,6259,6264],{"type":21,"value":6251},"The patterns above assume ",{"type":15,"tag":3047,"props":6253,"children":6254},{},[6255],{"type":21,"value":6256},"you",{"type":21,"value":6258}," decide when to recall. The platform also ships native AITools the LLM can call ",{"type":15,"tag":44,"props":6260,"children":6261},{},[6262],{"type":21,"value":6263},"during",{"type":21,"value":6265}," a turn — three tools, one per recall mode:",{"type":15,"tag":156,"props":6267,"children":6268},{},[6269,6285],{"type":15,"tag":160,"props":6270,"children":6271},{},[6272],{"type":15,"tag":164,"props":6273,"children":6274},{},[6275,6280],{"type":15,"tag":168,"props":6276,"children":6277},{},[6278],{"type":21,"value":6279},"Tool",{"type":15,"tag":168,"props":6281,"children":6282},{},[6283],{"type":21,"value":6284},"When the LLM picks it",{"type":15,"tag":184,"props":6286,"children":6287},{},[6288,6305,6322],{"type":15,"tag":164,"props":6289,"children":6290},{},[6291,6300],{"type":15,"tag":191,"props":6292,"children":6293},{},[6294],{"type":15,"tag":57,"props":6295,"children":6297},{"className":6296},[],[6298],{"type":21,"value":6299},"RecallByTopic",{"type":15,"tag":191,"props":6301,"children":6302},{},[6303],{"type":21,"value":6304},"\"I should look up what the user said about X\"",{"type":15,"tag":164,"props":6306,"children":6307},{},[6308,6317],{"type":15,"tag":191,"props":6309,"children":6310},{},[6311],{"type":15,"tag":57,"props":6312,"children":6314},{"className":6313},[],[6315],{"type":21,"value":6316},"RecallByEntity",{"type":15,"tag":191,"props":6318,"children":6319},{},[6320],{"type":21,"value":6321},"\"I have an entity reference; let me see its history\"",{"type":15,"tag":164,"props":6323,"children":6324},{},[6325,6334],{"type":15,"tag":191,"props":6326,"children":6327},{},[6328],{"type":15,"tag":57,"props":6329,"children":6331},{"className":6330},[],[6332],{"type":21,"value":6333},"RecallTimeline",{"type":15,"tag":191,"props":6335,"children":6336},{},[6337],{"type":21,"value":6338},"\"I need to reason about how things changed over time\"",{"type":15,"tag":24,"props":6340,"children":6341},{},[6342,6344,6349],{"type":21,"value":6343},"Add them to your ",{"type":15,"tag":30,"props":6345,"children":6346},{"href":32},[6347],{"type":21,"value":6348},"AI Agent",{"type":21,"value":6350}," chain JSON:",{"type":15,"tag":348,"props":6352,"children":6356},{"code":6353,"language":6354,"meta":7,"className":6355,"style":7},"{\n  \"tools\": [\n    {\n      \"type\": \"RECALL_BY_TOPIC\",\n      \"name\": \"recallMemory\",\n      \"memorySpaceId\": \"$userMemorySpaceId\"\n    },\n    {\n      \"type\": \"RECALL_BY_ENTITY\",\n      \"name\": \"lookupEntity\",\n      \"memorySpaceId\": \"$userMemorySpaceId\"\n    }\n  ]\n}\n","json","language-json shiki shiki-themes github-light github-dark",[6357],{"type":15,"tag":57,"props":6358,"children":6359},{"__ignoreMap":7},[6360,6367,6379,6386,6407,6428,6445,6452,6459,6479,6499,6514,6521,6529],{"type":15,"tag":460,"props":6361,"children":6362},{"class":462,"line":463},[6363],{"type":15,"tag":460,"props":6364,"children":6365},{"style":507},[6366],{"type":21,"value":5342},{"type":15,"tag":460,"props":6368,"children":6369},{"class":462,"line":473},[6370,6375],{"type":15,"tag":460,"props":6371,"children":6372},{"style":872},[6373],{"type":21,"value":6374},"  \"tools\"",{"type":15,"tag":460,"props":6376,"children":6377},{"style":507},[6378],{"type":21,"value":5431},{"type":15,"tag":460,"props":6380,"children":6381},{"class":462,"line":482},[6382],{"type":15,"tag":460,"props":6383,"children":6384},{"style":507},[6385],{"type":21,"value":5827},{"type":15,"tag":460,"props":6387,"children":6388},{"class":462,"line":491},[6389,6394,6398,6403],{"type":15,"tag":460,"props":6390,"children":6391},{"style":872},[6392],{"type":21,"value":6393},"      \"type\"",{"type":15,"tag":460,"props":6395,"children":6396},{"style":507},[6397],{"type":21,"value":2407},{"type":15,"tag":460,"props":6399,"children":6400},{"style":714},[6401],{"type":21,"value":6402},"\"RECALL_BY_TOPIC\"",{"type":15,"tag":460,"props":6404,"children":6405},{"style":507},[6406],{"type":21,"value":809},{"type":15,"tag":460,"props":6408,"children":6409},{"class":462,"line":524},[6410,6415,6419,6424],{"type":15,"tag":460,"props":6411,"children":6412},{"style":872},[6413],{"type":21,"value":6414},"      \"name\"",{"type":15,"tag":460,"props":6416,"children":6417},{"style":507},[6418],{"type":21,"value":2407},{"type":15,"tag":460,"props":6420,"children":6421},{"style":714},[6422],{"type":21,"value":6423},"\"recallMemory\"",{"type":15,"tag":460,"props":6425,"children":6426},{"style":507},[6427],{"type":21,"value":809},{"type":15,"tag":460,"props":6429,"children":6430},{"class":462,"line":558},[6431,6436,6440],{"type":15,"tag":460,"props":6432,"children":6433},{"style":872},[6434],{"type":21,"value":6435},"      \"memorySpaceId\"",{"type":15,"tag":460,"props":6437,"children":6438},{"style":507},[6439],{"type":21,"value":2407},{"type":15,"tag":460,"props":6441,"children":6442},{"style":714},[6443],{"type":21,"value":6444},"\"$userMemorySpaceId\"\n",{"type":15,"tag":460,"props":6446,"children":6447},{"class":462,"line":588},[6448],{"type":15,"tag":460,"props":6449,"children":6450},{"style":507},[6451],{"type":21,"value":2717},{"type":15,"tag":460,"props":6453,"children":6454},{"class":462,"line":618},[6455],{"type":15,"tag":460,"props":6456,"children":6457},{"style":507},[6458],{"type":21,"value":5827},{"type":15,"tag":460,"props":6460,"children":6461},{"class":462,"line":628},[6462,6466,6470,6475],{"type":15,"tag":460,"props":6463,"children":6464},{"style":872},[6465],{"type":21,"value":6393},{"type":15,"tag":460,"props":6467,"children":6468},{"style":507},[6469],{"type":21,"value":2407},{"type":15,"tag":460,"props":6471,"children":6472},{"style":714},[6473],{"type":21,"value":6474},"\"RECALL_BY_ENTITY\"",{"type":15,"tag":460,"props":6476,"children":6477},{"style":507},[6478],{"type":21,"value":809},{"type":15,"tag":460,"props":6480,"children":6481},{"class":462,"line":637},[6482,6486,6490,6495],{"type":15,"tag":460,"props":6483,"children":6484},{"style":872},[6485],{"type":21,"value":6414},{"type":15,"tag":460,"props":6487,"children":6488},{"style":507},[6489],{"type":21,"value":2407},{"type":15,"tag":460,"props":6491,"children":6492},{"style":714},[6493],{"type":21,"value":6494},"\"lookupEntity\"",{"type":15,"tag":460,"props":6496,"children":6497},{"style":507},[6498],{"type":21,"value":809},{"type":15,"tag":460,"props":6500,"children":6501},{"class":462,"line":695},[6502,6506,6510],{"type":15,"tag":460,"props":6503,"children":6504},{"style":872},[6505],{"type":21,"value":6435},{"type":15,"tag":460,"props":6507,"children":6508},{"style":507},[6509],{"type":21,"value":2407},{"type":15,"tag":460,"props":6511,"children":6512},{"style":714},[6513],{"type":21,"value":6444},{"type":15,"tag":460,"props":6515,"children":6516},{"class":462,"line":744},[6517],{"type":15,"tag":460,"props":6518,"children":6519},{"style":507},[6520],{"type":21,"value":1074},{"type":15,"tag":460,"props":6522,"children":6523},{"class":462,"line":753},[6524],{"type":15,"tag":460,"props":6525,"children":6526},{"style":507},[6527],{"type":21,"value":6528},"  ]\n",{"type":15,"tag":460,"props":6530,"children":6531},{"class":462,"line":793},[6532],{"type":15,"tag":460,"props":6533,"children":6534},{"style":507},[6535],{"type":21,"value":1684},{"type":15,"tag":24,"props":6537,"children":6538},{},[6539,6540,6546,6548,6554,6556,6561],{"type":21,"value":3285},{"type":15,"tag":57,"props":6541,"children":6543},{"className":6542},[],[6544],{"type":21,"value":6545},"\"$userMemorySpaceId\"",{"type":21,"value":6547}," syntax is the platform's standard variable-binding convention. At chain-execution time the runtime reads ",{"type":15,"tag":57,"props":6549,"children":6551},{"className":6550},[],[6552],{"type":21,"value":6553},"userMemorySpaceId",{"type":21,"value":6555}," from the AIStep's input arguments. The practical consequence: ",{"type":15,"tag":44,"props":6557,"children":6558},{},[6559],{"type":21,"value":6560},"one agent JSON can serve every user",{"type":21,"value":6562},"; you just pass the user's memory space id when you invoke the agent.",{"type":15,"tag":348,"props":6564,"children":6566},{"code":6565,"language":453,"meta":7,"className":454,"style":7},"context.getAIFunctions().invokeAgent(\"supportAgent\", {\n    arguments: {\n        userMemorySpaceId: userSpace.id,\n        userMessage:       arguments.message\n    }\n});\n",[6567],{"type":15,"tag":57,"props":6568,"children":6569},{"__ignoreMap":7},[6570,6605,6613,6621,6638,6645],{"type":15,"tag":460,"props":6571,"children":6572},{"class":462,"line":463},[6573,6577,6582,6586,6591,6595,6600],{"type":15,"tag":460,"props":6574,"children":6575},{"style":507},[6576],{"type":21,"value":3513},{"type":15,"tag":460,"props":6578,"children":6579},{"style":501},[6580],{"type":21,"value":6581},"getAIFunctions",{"type":15,"tag":460,"props":6583,"children":6584},{"style":507},[6585],{"type":21,"value":851},{"type":15,"tag":460,"props":6587,"children":6588},{"style":501},[6589],{"type":21,"value":6590},"invokeAgent",{"type":15,"tag":460,"props":6592,"children":6593},{"style":507},[6594],{"type":21,"value":510},{"type":15,"tag":460,"props":6596,"children":6597},{"style":714},[6598],{"type":21,"value":6599},"\"supportAgent\"",{"type":15,"tag":460,"props":6601,"children":6602},{"style":507},[6603],{"type":21,"value":6604},", {\n",{"type":15,"tag":460,"props":6606,"children":6607},{"class":462,"line":473},[6608],{"type":15,"tag":460,"props":6609,"children":6610},{"style":507},[6611],{"type":21,"value":6612},"    arguments: {\n",{"type":15,"tag":460,"props":6614,"children":6615},{"class":462,"line":482},[6616],{"type":15,"tag":460,"props":6617,"children":6618},{"style":507},[6619],{"type":21,"value":6620},"        userMemorySpaceId: userSpace.id,\n",{"type":15,"tag":460,"props":6622,"children":6623},{"class":462,"line":491},[6624,6629,6633],{"type":15,"tag":460,"props":6625,"children":6626},{"style":507},[6627],{"type":21,"value":6628},"        userMessage:       ",{"type":15,"tag":460,"props":6630,"children":6631},{"style":872},[6632],{"type":21,"value":516},{"type":15,"tag":460,"props":6634,"children":6635},{"style":507},[6636],{"type":21,"value":6637},".message\n",{"type":15,"tag":460,"props":6639,"children":6640},{"class":462,"line":524},[6641],{"type":15,"tag":460,"props":6642,"children":6643},{"style":507},[6644],{"type":21,"value":1074},{"type":15,"tag":460,"props":6646,"children":6647},{"class":462,"line":558},[6648],{"type":15,"tag":460,"props":6649,"children":6650},{"style":507},[6651],{"type":21,"value":2124},{"type":15,"tag":24,"props":6653,"children":6654},{},[6655,6657,6663],{"type":21,"value":6656},"If your space is app-global (a shared knowledge base, not per-user), drop the ",{"type":15,"tag":57,"props":6658,"children":6660},{"className":6659},[],[6661],{"type":21,"value":6662},"$",{"type":21,"value":6664}," and use a literal id:",{"type":15,"tag":348,"props":6666,"children":6668},{"code":6667,"language":6354,"meta":7,"className":6355,"style":7},"{\n  \"type\": \"RECALL_BY_TOPIC\",\n  \"name\": \"recallHandbook\",\n  \"memorySpaceId\": \"ms_company_handbook\"\n}\n",[6669],{"type":15,"tag":57,"props":6670,"children":6671},{"__ignoreMap":7},[6672,6679,6699,6720,6737],{"type":15,"tag":460,"props":6673,"children":6674},{"class":462,"line":463},[6675],{"type":15,"tag":460,"props":6676,"children":6677},{"style":507},[6678],{"type":21,"value":5342},{"type":15,"tag":460,"props":6680,"children":6681},{"class":462,"line":473},[6682,6687,6691,6695],{"type":15,"tag":460,"props":6683,"children":6684},{"style":872},[6685],{"type":21,"value":6686},"  \"type\"",{"type":15,"tag":460,"props":6688,"children":6689},{"style":507},[6690],{"type":21,"value":2407},{"type":15,"tag":460,"props":6692,"children":6693},{"style":714},[6694],{"type":21,"value":6402},{"type":15,"tag":460,"props":6696,"children":6697},{"style":507},[6698],{"type":21,"value":809},{"type":15,"tag":460,"props":6700,"children":6701},{"class":462,"line":482},[6702,6707,6711,6716],{"type":15,"tag":460,"props":6703,"children":6704},{"style":872},[6705],{"type":21,"value":6706},"  \"name\"",{"type":15,"tag":460,"props":6708,"children":6709},{"style":507},[6710],{"type":21,"value":2407},{"type":15,"tag":460,"props":6712,"children":6713},{"style":714},[6714],{"type":21,"value":6715},"\"recallHandbook\"",{"type":15,"tag":460,"props":6717,"children":6718},{"style":507},[6719],{"type":21,"value":809},{"type":15,"tag":460,"props":6721,"children":6722},{"class":462,"line":491},[6723,6728,6732],{"type":15,"tag":460,"props":6724,"children":6725},{"style":872},[6726],{"type":21,"value":6727},"  \"memorySpaceId\"",{"type":15,"tag":460,"props":6729,"children":6730},{"style":507},[6731],{"type":21,"value":2407},{"type":15,"tag":460,"props":6733,"children":6734},{"style":714},[6735],{"type":21,"value":6736},"\"ms_company_handbook\"\n",{"type":15,"tag":460,"props":6738,"children":6739},{"class":462,"line":524},[6740],{"type":15,"tag":460,"props":6741,"children":6742},{"style":507},[6743],{"type":21,"value":1684},{"type":15,"tag":24,"props":6745,"children":6746},{},[6747],{"type":21,"value":6748},"The agent then calls these tools mid-turn:",{"type":15,"tag":348,"props":6750,"children":6752},{"code":6751},"User:      \"Did I tell you about my dietary restrictions?\"\nAssistant: [calls recallMemory with query \"user dietary restrictions\"]\nTool:      [returns: \"User is vegetarian; user has a peanut allergy\"]\nAssistant: \"Yes — you mentioned you're vegetarian and have a peanut allergy.\"\n",[6753],{"type":15,"tag":57,"props":6754,"children":6755},{"__ignoreMap":7},[6756],{"type":21,"value":6751},{"type":15,"tag":1770,"props":6758,"children":6759},{},[],{"type":15,"tag":66,"props":6761,"children":6763},{"id":6762},"apps-with-their-own-chat-history",[6764],{"type":21,"value":6765},"Apps With Their Own Chat History",{"type":15,"tag":24,"props":6767,"children":6768},{},[6769,6771,6777],{"type":21,"value":6770},"Some agents put much more than plain chat in the user prompt — they render their own (often richly-structured) history and don't use the platform's ",{"type":15,"tag":57,"props":6772,"children":6774},{"className":6773},[],[6775],{"type":21,"value":6776},"AIChatHistory",{"type":21,"value":6778}," at all. They still want conversation persistence so memory extraction, recall, and GDPR export work.",{"type":15,"tag":24,"props":6780,"children":6781},{},[6782,6784,6789],{"type":21,"value":6783},"The integration point is ",{"type":15,"tag":57,"props":6785,"children":6787},{"className":6786},[],[6788],{"type":21,"value":2547},{"type":21,"value":6790}," — one call per turn; both messages share a server-allocated turn id:",{"type":15,"tag":348,"props":6792,"children":6794},{"code":6793,"language":453,"meta":7,"className":454,"style":7},"function myCustomAgent(arguments) {\n    var conv = context.getConversations();\n\n    // 1. Get or create the conversation\n    var c = conv.createConversation({\n        namespace: \"custom-agent\",\n        title:     arguments.title\n    });\n\n    // 2. Build my own rich prompt from internal history + user input\n    var prompt = buildMyRichPrompt(arguments.myHistory, arguments.userInput);\n\n    // 3. Call my own LLM\n    var llmResult = callMyOwnLLM(prompt);\n\n    // 4. One call to persist user + assistant under one turn\n    var saved = conv.appendTurn(c.id, {\n        userContent: arguments.userInput,\n        assistant: {\n            content:    llmResult.text,\n            stopReason: llmResult.stopReason,\n            model:      llmResult.model,\n            provider:   \"anthropic\",\n            usage: {\n                inputTokens:  llmResult.inputTokens,\n                outputTokens: llmResult.outputTokens,\n                latencyMs:    llmResult.latencyMs\n            }\n        },\n        idempotencyKey: arguments.turnId   // safe retries\n    });\n\n    return { reply: llmResult.text, turnId: saved.turnId };\n}\n",[6795],{"type":15,"tag":57,"props":6796,"children":6797},{"__ignoreMap":7},[6798,6822,6849,6856,6864,6891,6907,6923,6930,6937,6945,6988,6995,7003,7027,7034,7042,7070,7087,7095,7103,7111,7119,7135,7143,7151,7159,7167,7175,7182,7202,7209,7216,7228],{"type":15,"tag":460,"props":6799,"children":6800},{"class":462,"line":463},[6801,6805,6810,6814,6818],{"type":15,"tag":460,"props":6802,"children":6803},{"style":495},[6804],{"type":21,"value":498},{"type":15,"tag":460,"props":6806,"children":6807},{"style":501},[6808],{"type":21,"value":6809}," myCustomAgent",{"type":15,"tag":460,"props":6811,"children":6812},{"style":507},[6813],{"type":21,"value":510},{"type":15,"tag":460,"props":6815,"children":6816},{"style":513},[6817],{"type":21,"value":516},{"type":15,"tag":460,"props":6819,"children":6820},{"style":507},[6821],{"type":21,"value":521},{"type":15,"tag":460,"props":6823,"children":6824},{"class":462,"line":473},[6825,6829,6833,6837,6841,6845],{"type":15,"tag":460,"props":6826,"children":6827},{"style":495},[6828],{"type":21,"value":530},{"type":15,"tag":460,"props":6830,"children":6831},{"style":507},[6832],{"type":21,"value":1996},{"type":15,"tag":460,"props":6834,"children":6835},{"style":495},[6836],{"type":21,"value":540},{"type":15,"tag":460,"props":6838,"children":6839},{"style":507},[6840],{"type":21,"value":545},{"type":15,"tag":460,"props":6842,"children":6843},{"style":501},[6844],{"type":21,"value":550},{"type":15,"tag":460,"props":6846,"children":6847},{"style":507},[6848],{"type":21,"value":555},{"type":15,"tag":460,"props":6850,"children":6851},{"class":462,"line":482},[6852],{"type":15,"tag":460,"props":6853,"children":6854},{"emptyLinePlaceholder":622},[6855],{"type":21,"value":625},{"type":15,"tag":460,"props":6857,"children":6858},{"class":462,"line":491},[6859],{"type":15,"tag":460,"props":6860,"children":6861},{"style":467},[6862],{"type":21,"value":6863},"    // 1. Get or create the conversation\n",{"type":15,"tag":460,"props":6865,"children":6866},{"class":462,"line":524},[6867,6871,6875,6879,6883,6887],{"type":15,"tag":460,"props":6868,"children":6869},{"style":495},[6870],{"type":21,"value":530},{"type":15,"tag":460,"props":6872,"children":6873},{"style":507},[6874],{"type":21,"value":2039},{"type":15,"tag":460,"props":6876,"children":6877},{"style":495},[6878],{"type":21,"value":540},{"type":15,"tag":460,"props":6880,"children":6881},{"style":507},[6882],{"type":21,"value":656},{"type":15,"tag":460,"props":6884,"children":6885},{"style":501},[6886],{"type":21,"value":785},{"type":15,"tag":460,"props":6888,"children":6889},{"style":507},[6890],{"type":21,"value":790},{"type":15,"tag":460,"props":6892,"children":6893},{"class":462,"line":558},[6894,6898,6903],{"type":15,"tag":460,"props":6895,"children":6896},{"style":507},[6897],{"type":21,"value":799},{"type":15,"tag":460,"props":6899,"children":6900},{"style":714},[6901],{"type":21,"value":6902},"\"custom-agent\"",{"type":15,"tag":460,"props":6904,"children":6905},{"style":507},[6906],{"type":21,"value":809},{"type":15,"tag":460,"props":6908,"children":6909},{"class":462,"line":588},[6910,6914,6918],{"type":15,"tag":460,"props":6911,"children":6912},{"style":507},[6913],{"type":21,"value":818},{"type":15,"tag":460,"props":6915,"children":6916},{"style":872},[6917],{"type":21,"value":516},{"type":15,"tag":460,"props":6919,"children":6920},{"style":507},[6921],{"type":21,"value":6922},".title\n",{"type":15,"tag":460,"props":6924,"children":6925},{"class":462,"line":618},[6926],{"type":15,"tag":460,"props":6927,"children":6928},{"style":507},[6929],{"type":21,"value":750},{"type":15,"tag":460,"props":6931,"children":6932},{"class":462,"line":628},[6933],{"type":15,"tag":460,"props":6934,"children":6935},{"emptyLinePlaceholder":622},[6936],{"type":21,"value":625},{"type":15,"tag":460,"props":6938,"children":6939},{"class":462,"line":637},[6940],{"type":15,"tag":460,"props":6941,"children":6942},{"style":467},[6943],{"type":21,"value":6944},"    // 2. Build my own rich prompt from internal history + user input\n",{"type":15,"tag":460,"props":6946,"children":6947},{"class":462,"line":695},[6948,6952,6957,6961,6966,6970,6974,6979,6983],{"type":15,"tag":460,"props":6949,"children":6950},{"style":495},[6951],{"type":21,"value":530},{"type":15,"tag":460,"props":6953,"children":6954},{"style":507},[6955],{"type":21,"value":6956}," prompt ",{"type":15,"tag":460,"props":6958,"children":6959},{"style":495},[6960],{"type":21,"value":540},{"type":15,"tag":460,"props":6962,"children":6963},{"style":501},[6964],{"type":21,"value":6965}," buildMyRichPrompt",{"type":15,"tag":460,"props":6967,"children":6968},{"style":507},[6969],{"type":21,"value":510},{"type":15,"tag":460,"props":6971,"children":6972},{"style":872},[6973],{"type":21,"value":516},{"type":15,"tag":460,"props":6975,"children":6976},{"style":507},[6977],{"type":21,"value":6978},".myHistory, ",{"type":15,"tag":460,"props":6980,"children":6981},{"style":872},[6982],{"type":21,"value":516},{"type":15,"tag":460,"props":6984,"children":6985},{"style":507},[6986],{"type":21,"value":6987},".userInput);\n",{"type":15,"tag":460,"props":6989,"children":6990},{"class":462,"line":744},[6991],{"type":15,"tag":460,"props":6992,"children":6993},{"emptyLinePlaceholder":622},[6994],{"type":21,"value":625},{"type":15,"tag":460,"props":6996,"children":6997},{"class":462,"line":753},[6998],{"type":15,"tag":460,"props":6999,"children":7000},{"style":467},[7001],{"type":21,"value":7002},"    // 3. Call my own LLM\n",{"type":15,"tag":460,"props":7004,"children":7005},{"class":462,"line":793},[7006,7010,7014,7018,7022],{"type":15,"tag":460,"props":7007,"children":7008},{"style":495},[7009],{"type":21,"value":530},{"type":15,"tag":460,"props":7011,"children":7012},{"style":507},[7013],{"type":21,"value":2570},{"type":15,"tag":460,"props":7015,"children":7016},{"style":495},[7017],{"type":21,"value":540},{"type":15,"tag":460,"props":7019,"children":7020},{"style":501},[7021],{"type":21,"value":2579},{"type":15,"tag":460,"props":7023,"children":7024},{"style":507},[7025],{"type":21,"value":7026},"(prompt);\n",{"type":15,"tag":460,"props":7028,"children":7029},{"class":462,"line":812},[7030],{"type":15,"tag":460,"props":7031,"children":7032},{"emptyLinePlaceholder":622},[7033],{"type":21,"value":625},{"type":15,"tag":460,"props":7035,"children":7036},{"class":462,"line":830},[7037],{"type":15,"tag":460,"props":7038,"children":7039},{"style":467},[7040],{"type":21,"value":7041},"    // 4. One call to persist user + assistant under one turn\n",{"type":15,"tag":460,"props":7043,"children":7044},{"class":462,"line":892},[7045,7049,7054,7058,7062,7066],{"type":15,"tag":460,"props":7046,"children":7047},{"style":495},[7048],{"type":21,"value":530},{"type":15,"tag":460,"props":7050,"children":7051},{"style":507},[7052],{"type":21,"value":7053}," saved ",{"type":15,"tag":460,"props":7055,"children":7056},{"style":495},[7057],{"type":21,"value":540},{"type":15,"tag":460,"props":7059,"children":7060},{"style":507},[7061],{"type":21,"value":656},{"type":15,"tag":460,"props":7063,"children":7064},{"style":501},[7065],{"type":21,"value":2547},{"type":15,"tag":460,"props":7067,"children":7068},{"style":507},[7069],{"type":21,"value":2191},{"type":15,"tag":460,"props":7071,"children":7072},{"class":462,"line":900},[7073,7078,7082],{"type":15,"tag":460,"props":7074,"children":7075},{"style":507},[7076],{"type":21,"value":7077},"        userContent: ",{"type":15,"tag":460,"props":7079,"children":7080},{"style":872},[7081],{"type":21,"value":516},{"type":15,"tag":460,"props":7083,"children":7084},{"style":507},[7085],{"type":21,"value":7086},".userInput,\n",{"type":15,"tag":460,"props":7088,"children":7089},{"class":462,"line":908},[7090],{"type":15,"tag":460,"props":7091,"children":7092},{"style":507},[7093],{"type":21,"value":7094},"        assistant: {\n",{"type":15,"tag":460,"props":7096,"children":7097},{"class":462,"line":917},[7098],{"type":15,"tag":460,"props":7099,"children":7100},{"style":507},[7101],{"type":21,"value":7102},"            content:    llmResult.text,\n",{"type":15,"tag":460,"props":7104,"children":7105},{"class":462,"line":973},[7106],{"type":15,"tag":460,"props":7107,"children":7108},{"style":507},[7109],{"type":21,"value":7110},"            stopReason: llmResult.stopReason,\n",{"type":15,"tag":460,"props":7112,"children":7113},{"class":462,"line":999},[7114],{"type":15,"tag":460,"props":7115,"children":7116},{"style":507},[7117],{"type":21,"value":7118},"            model:      llmResult.model,\n",{"type":15,"tag":460,"props":7120,"children":7121},{"class":462,"line":1007},[7122,7127,7131],{"type":15,"tag":460,"props":7123,"children":7124},{"style":507},[7125],{"type":21,"value":7126},"            provider:   ",{"type":15,"tag":460,"props":7128,"children":7129},{"style":714},[7130],{"type":21,"value":1301},{"type":15,"tag":460,"props":7132,"children":7133},{"style":507},[7134],{"type":21,"value":809},{"type":15,"tag":460,"props":7136,"children":7137},{"class":462,"line":1031},[7138],{"type":15,"tag":460,"props":7139,"children":7140},{"style":507},[7141],{"type":21,"value":7142},"            usage: {\n",{"type":15,"tag":460,"props":7144,"children":7145},{"class":462,"line":1068},[7146],{"type":15,"tag":460,"props":7147,"children":7148},{"style":507},[7149],{"type":21,"value":7150},"                inputTokens:  llmResult.inputTokens,\n",{"type":15,"tag":460,"props":7152,"children":7153},{"class":462,"line":1077},[7154],{"type":15,"tag":460,"props":7155,"children":7156},{"style":507},[7157],{"type":21,"value":7158},"                outputTokens: llmResult.outputTokens,\n",{"type":15,"tag":460,"props":7160,"children":7161},{"class":462,"line":1085},[7162],{"type":15,"tag":460,"props":7163,"children":7164},{"style":507},[7165],{"type":21,"value":7166},"                latencyMs:    llmResult.latencyMs\n",{"type":15,"tag":460,"props":7168,"children":7169},{"class":462,"line":1094},[7170],{"type":15,"tag":460,"props":7171,"children":7172},{"style":507},[7173],{"type":21,"value":7174},"            }\n",{"type":15,"tag":460,"props":7176,"children":7177},{"class":462,"line":1103},[7178],{"type":15,"tag":460,"props":7179,"children":7180},{"style":507},[7181],{"type":21,"value":5708},{"type":15,"tag":460,"props":7183,"children":7184},{"class":462,"line":1135},[7185,7190,7194,7198],{"type":15,"tag":460,"props":7186,"children":7187},{"style":507},[7188],{"type":21,"value":7189},"        idempotencyKey: ",{"type":15,"tag":460,"props":7191,"children":7192},{"style":872},[7193],{"type":21,"value":516},{"type":15,"tag":460,"props":7195,"children":7196},{"style":507},[7197],{"type":21,"value":2734},{"type":15,"tag":460,"props":7199,"children":7200},{"style":467},[7201],{"type":21,"value":2739},{"type":15,"tag":460,"props":7203,"children":7204},{"class":462,"line":1144},[7205],{"type":15,"tag":460,"props":7206,"children":7207},{"style":507},[7208],{"type":21,"value":750},{"type":15,"tag":460,"props":7210,"children":7211},{"class":462,"line":1162},[7212],{"type":15,"tag":460,"props":7213,"children":7214},{"emptyLinePlaceholder":622},[7215],{"type":21,"value":625},{"type":15,"tag":460,"props":7217,"children":7218},{"class":462,"line":1180},[7219,7223],{"type":15,"tag":460,"props":7220,"children":7221},{"style":495},[7222],{"type":21,"value":1670},{"type":15,"tag":460,"props":7224,"children":7225},{"style":507},[7226],{"type":21,"value":7227}," { reply: llmResult.text, turnId: saved.turnId };\n",{"type":15,"tag":460,"props":7229,"children":7230},{"class":462,"line":1198},[7231],{"type":15,"tag":460,"props":7232,"children":7233},{"style":507},[7234],{"type":21,"value":1684},{"type":15,"tag":24,"props":7236,"children":7237},{},[7238],{"type":21,"value":7239},"Three guarantees this gives you:",{"type":15,"tag":78,"props":7241,"children":7242},{},[7243,7259,7269],{"type":15,"tag":82,"props":7244,"children":7245},{},[7246,7257],{"type":15,"tag":44,"props":7247,"children":7248},{},[7249,7251],{"type":21,"value":7250},"Shared ",{"type":15,"tag":57,"props":7252,"children":7254},{"className":7253},[],[7255],{"type":21,"value":7256},"turnId",{"type":21,"value":7258}," on both messages — replay tooling groups them as one turn even though the LLM-protocol message array doesn't reflect that.",{"type":15,"tag":82,"props":7260,"children":7261},{},[7262,7267],{"type":15,"tag":44,"props":7263,"children":7264},{},[7265],{"type":21,"value":7266},"Atomic ordering",{"type":21,"value":7268}," — user at sequence N, assistant at N+1.",{"type":15,"tag":82,"props":7270,"children":7271},{},[7272,7277,7279,7285],{"type":15,"tag":44,"props":7273,"children":7274},{},[7275],{"type":21,"value":7276},"Idempotency on the user side",{"type":21,"value":7278}," — retries with the same ",{"type":15,"tag":57,"props":7280,"children":7282},{"className":7281},[],[7283],{"type":21,"value":7284},"idempotencyKey",{"type":21,"value":7286}," return the existing user message; the assistant always gets a fresh row (different LLM responses for the same logical turn must not collide on dedupe).",{"type":15,"tag":1770,"props":7288,"children":7289},{},[],{"type":15,"tag":66,"props":7291,"children":7293},{"id":7292},"common-patterns",[7294],{"type":21,"value":7295},"Common Patterns",{"type":15,"tag":1799,"props":7297,"children":7299},{"id":7298},"per-user-memory-space",[7300],{"type":21,"value":7301},"Per-User Memory Space",{"type":15,"tag":24,"props":7303,"children":7304},{},[7305],{"type":21,"value":7306},"Most apps have one memory space per user, named after the domain area:",{"type":15,"tag":348,"props":7308,"children":7310},{"code":7309,"language":453,"meta":7,"className":454,"style":7},"function getOrCreateUserSpace(name) {\n    var memory = context.getMemory();\n    var existing = memory.listMemorySpaces({})\n        .find(function(s) { return s.name === name; });\n    return existing || memory.createMemorySpace({ name: name });\n}\n\nvar goals     = getOrCreateUserSpace(\"goals\");\nvar prefs     = getOrCreateUserSpace(\"preferences\");\nvar support   = getOrCreateUserSpace(\"support\");\n",[7311],{"type":15,"tag":57,"props":7312,"children":7313},{"__ignoreMap":7},[7314,7338,7365,7393,7441,7469,7476,7483,7515,7548],{"type":15,"tag":460,"props":7315,"children":7316},{"class":462,"line":463},[7317,7321,7326,7330,7334],{"type":15,"tag":460,"props":7318,"children":7319},{"style":495},[7320],{"type":21,"value":498},{"type":15,"tag":460,"props":7322,"children":7323},{"style":501},[7324],{"type":21,"value":7325}," getOrCreateUserSpace",{"type":15,"tag":460,"props":7327,"children":7328},{"style":507},[7329],{"type":21,"value":510},{"type":15,"tag":460,"props":7331,"children":7332},{"style":513},[7333],{"type":21,"value":3291},{"type":15,"tag":460,"props":7335,"children":7336},{"style":507},[7337],{"type":21,"value":521},{"type":15,"tag":460,"props":7339,"children":7340},{"class":462,"line":473},[7341,7345,7349,7353,7357,7361],{"type":15,"tag":460,"props":7342,"children":7343},{"style":495},[7344],{"type":21,"value":530},{"type":15,"tag":460,"props":7346,"children":7347},{"style":507},[7348],{"type":21,"value":568},{"type":15,"tag":460,"props":7350,"children":7351},{"style":495},[7352],{"type":21,"value":540},{"type":15,"tag":460,"props":7354,"children":7355},{"style":507},[7356],{"type":21,"value":545},{"type":15,"tag":460,"props":7358,"children":7359},{"style":501},[7360],{"type":21,"value":581},{"type":15,"tag":460,"props":7362,"children":7363},{"style":507},[7364],{"type":21,"value":555},{"type":15,"tag":460,"props":7366,"children":7367},{"class":462,"line":482},[7368,7372,7376,7380,7384,7388],{"type":15,"tag":460,"props":7369,"children":7370},{"style":495},[7371],{"type":21,"value":530},{"type":15,"tag":460,"props":7373,"children":7374},{"style":507},[7375],{"type":21,"value":647},{"type":15,"tag":460,"props":7377,"children":7378},{"style":495},[7379],{"type":21,"value":540},{"type":15,"tag":460,"props":7381,"children":7382},{"style":507},[7383],{"type":21,"value":936},{"type":15,"tag":460,"props":7385,"children":7386},{"style":501},[7387],{"type":21,"value":941},{"type":15,"tag":460,"props":7389,"children":7390},{"style":507},[7391],{"type":21,"value":7392},"({})\n",{"type":15,"tag":460,"props":7394,"children":7395},{"class":462,"line":491},[7396,7400,7404,7408,7412,7416,7420,7424,7428,7432,7436],{"type":15,"tag":460,"props":7397,"children":7398},{"style":507},[7399],{"type":21,"value":1396},{"type":15,"tag":460,"props":7401,"children":7402},{"style":501},[7403],{"type":21,"value":671},{"type":15,"tag":460,"props":7405,"children":7406},{"style":507},[7407],{"type":21,"value":510},{"type":15,"tag":460,"props":7409,"children":7410},{"style":495},[7411],{"type":21,"value":498},{"type":15,"tag":460,"props":7413,"children":7414},{"style":507},[7415],{"type":21,"value":510},{"type":15,"tag":460,"props":7417,"children":7418},{"style":513},[7419],{"type":21,"value":966},{"type":15,"tag":460,"props":7421,"children":7422},{"style":507},[7423],{"type":21,"value":1423},{"type":15,"tag":460,"props":7425,"children":7426},{"style":495},[7427],{"type":21,"value":1428},{"type":15,"tag":460,"props":7429,"children":7430},{"style":507},[7431],{"type":21,"value":983},{"type":15,"tag":460,"props":7433,"children":7434},{"style":495},[7435],{"type":21,"value":711},{"type":15,"tag":460,"props":7437,"children":7438},{"style":507},[7439],{"type":21,"value":7440}," name; });\n",{"type":15,"tag":460,"props":7442,"children":7443},{"class":462,"line":524},[7444,7448,7452,7456,7460,7464],{"type":15,"tag":460,"props":7445,"children":7446},{"style":495},[7447],{"type":21,"value":1670},{"type":15,"tag":460,"props":7449,"children":7450},{"style":507},[7451],{"type":21,"value":647},{"type":15,"tag":460,"props":7453,"children":7454},{"style":495},[7455],{"type":21,"value":776},{"type":15,"tag":460,"props":7457,"children":7458},{"style":507},[7459],{"type":21,"value":936},{"type":15,"tag":460,"props":7461,"children":7462},{"style":501},[7463],{"type":21,"value":1050},{"type":15,"tag":460,"props":7465,"children":7466},{"style":507},[7467],{"type":21,"value":7468},"({ name: name });\n",{"type":15,"tag":460,"props":7470,"children":7471},{"class":462,"line":558},[7472],{"type":15,"tag":460,"props":7473,"children":7474},{"style":507},[7475],{"type":21,"value":1684},{"type":15,"tag":460,"props":7477,"children":7478},{"class":462,"line":588},[7479],{"type":15,"tag":460,"props":7480,"children":7481},{"emptyLinePlaceholder":622},[7482],{"type":21,"value":625},{"type":15,"tag":460,"props":7484,"children":7485},{"class":462,"line":618},[7486,7490,7495,7499,7503,7507,7511],{"type":15,"tag":460,"props":7487,"children":7488},{"style":495},[7489],{"type":21,"value":1991},{"type":15,"tag":460,"props":7491,"children":7492},{"style":507},[7493],{"type":21,"value":7494}," goals     ",{"type":15,"tag":460,"props":7496,"children":7497},{"style":495},[7498],{"type":21,"value":540},{"type":15,"tag":460,"props":7500,"children":7501},{"style":501},[7502],{"type":21,"value":7325},{"type":15,"tag":460,"props":7504,"children":7505},{"style":507},[7506],{"type":21,"value":510},{"type":15,"tag":460,"props":7508,"children":7509},{"style":714},[7510],{"type":21,"value":3722},{"type":15,"tag":460,"props":7512,"children":7513},{"style":507},[7514],{"type":21,"value":1610},{"type":15,"tag":460,"props":7516,"children":7517},{"class":462,"line":628},[7518,7522,7527,7531,7535,7539,7544],{"type":15,"tag":460,"props":7519,"children":7520},{"style":495},[7521],{"type":21,"value":1991},{"type":15,"tag":460,"props":7523,"children":7524},{"style":507},[7525],{"type":21,"value":7526}," prefs     ",{"type":15,"tag":460,"props":7528,"children":7529},{"style":495},[7530],{"type":21,"value":540},{"type":15,"tag":460,"props":7532,"children":7533},{"style":501},[7534],{"type":21,"value":7325},{"type":15,"tag":460,"props":7536,"children":7537},{"style":507},[7538],{"type":21,"value":510},{"type":15,"tag":460,"props":7540,"children":7541},{"style":714},[7542],{"type":21,"value":7543},"\"preferences\"",{"type":15,"tag":460,"props":7545,"children":7546},{"style":507},[7547],{"type":21,"value":1610},{"type":15,"tag":460,"props":7549,"children":7550},{"class":462,"line":637},[7551,7555,7560,7564,7568,7572,7576],{"type":15,"tag":460,"props":7552,"children":7553},{"style":495},[7554],{"type":21,"value":1991},{"type":15,"tag":460,"props":7556,"children":7557},{"style":507},[7558],{"type":21,"value":7559}," support   ",{"type":15,"tag":460,"props":7561,"children":7562},{"style":495},[7563],{"type":21,"value":540},{"type":15,"tag":460,"props":7565,"children":7566},{"style":501},[7567],{"type":21,"value":7325},{"type":15,"tag":460,"props":7569,"children":7570},{"style":507},[7571],{"type":21,"value":510},{"type":15,"tag":460,"props":7573,"children":7574},{"style":714},[7575],{"type":21,"value":3774},{"type":15,"tag":460,"props":7577,"children":7578},{"style":507},[7579],{"type":21,"value":1610},{"type":15,"tag":24,"props":7581,"children":7582},{},[7583],{"type":21,"value":7584},"Spaces are cheap. Use them as natural topic boundaries.",{"type":15,"tag":1799,"props":7586,"children":7588},{"id":7587},"shared-knowledge-base",[7589],{"type":21,"value":7590},"Shared Knowledge Base",{"type":15,"tag":24,"props":7592,"children":7593},{},[7594],{"type":21,"value":7595},"For app-global knowledge (handbooks, FAQs, company facts) you have two choices:",{"type":15,"tag":427,"props":7597,"children":7598},{},[7599,7609],{"type":15,"tag":82,"props":7600,"children":7601},{},[7602,7607],{"type":15,"tag":44,"props":7603,"children":7604},{},[7605],{"type":21,"value":7606},"Use a separate per-app system user",{"type":21,"value":7608}," that owns the shared memory space, and recall from that space in addition to the per-user space.",{"type":15,"tag":82,"props":7610,"children":7611},{},[7612,7617,7619,7625],{"type":15,"tag":44,"props":7613,"children":7614},{},[7615],{"type":21,"value":7616},"Bypass the memory subsystem",{"type":21,"value":7618}," and use a regular ",{"type":15,"tag":30,"props":7620,"children":7622},{"href":7621},"/guides/ai-agents#rag-with-searchindexes",[7623],{"type":21,"value":7624},"SearchIndex",{"type":21,"value":7626},". Memory is for personal, evolving facts — if your \"memory\" is actually a static document, document search will likely serve you better.",{"type":15,"tag":1799,"props":7628,"children":7630},{"id":7629},"remember-this-ui-flow",[7631],{"type":21,"value":7632},"\"Remember This\" UI Flow",{"type":15,"tag":24,"props":7634,"children":7635},{},[7636],{"type":21,"value":7637},"Sometimes the user explicitly asks the agent to remember something. Instead of waiting for extraction, write the atom directly:",{"type":15,"tag":348,"props":7639,"children":7641},{"code":7640,"language":453,"meta":7,"className":454,"style":7},"context.getMemory().addAtom(spaceId, {\n    text:       arguments.factText,\n    category:   { name: \"preference\", kind: \"PREFERENCE\" },\n    importance: 5,         // user-volunteered facts are high signal\n    confidence: 1.0,       // user-confirmed, max confidence\n    sourceConversationId: arguments.conversationId\n});\n",[7642],{"type":15,"tag":57,"props":7643,"children":7644},{"__ignoreMap":7},[7645,7668,7684,7707,7729,7750,7767],{"type":15,"tag":460,"props":7646,"children":7647},{"class":462,"line":463},[7648,7652,7656,7660,7664],{"type":15,"tag":460,"props":7649,"children":7650},{"style":507},[7651],{"type":21,"value":3513},{"type":15,"tag":460,"props":7653,"children":7654},{"style":501},[7655],{"type":21,"value":581},{"type":15,"tag":460,"props":7657,"children":7658},{"style":507},[7659],{"type":21,"value":851},{"type":15,"tag":460,"props":7661,"children":7662},{"style":501},[7663],{"type":21,"value":3526},{"type":15,"tag":460,"props":7665,"children":7666},{"style":507},[7667],{"type":21,"value":3531},{"type":15,"tag":460,"props":7669,"children":7670},{"class":462,"line":473},[7671,7675,7679],{"type":15,"tag":460,"props":7672,"children":7673},{"style":507},[7674],{"type":21,"value":3539},{"type":15,"tag":460,"props":7676,"children":7677},{"style":872},[7678],{"type":21,"value":516},{"type":15,"tag":460,"props":7680,"children":7681},{"style":507},[7682],{"type":21,"value":7683},".factText,\n",{"type":15,"tag":460,"props":7685,"children":7686},{"class":462,"line":482},[7687,7691,7695,7699,7703],{"type":15,"tag":460,"props":7688,"children":7689},{"style":507},[7690],{"type":21,"value":3555},{"type":15,"tag":460,"props":7692,"children":7693},{"style":714},[7694],{"type":21,"value":1218},{"type":15,"tag":460,"props":7696,"children":7697},{"style":507},[7698],{"type":21,"value":3564},{"type":15,"tag":460,"props":7700,"children":7701},{"style":714},[7702],{"type":21,"value":3569},{"type":15,"tag":460,"props":7704,"children":7705},{"style":507},[7706],{"type":21,"value":3574},{"type":15,"tag":460,"props":7708,"children":7709},{"class":462,"line":491},[7710,7714,7719,7724],{"type":15,"tag":460,"props":7711,"children":7712},{"style":507},[7713],{"type":21,"value":3582},{"type":15,"tag":460,"props":7715,"children":7716},{"style":872},[7717],{"type":21,"value":7718},"5",{"type":15,"tag":460,"props":7720,"children":7721},{"style":507},[7722],{"type":21,"value":7723},",         ",{"type":15,"tag":460,"props":7725,"children":7726},{"style":467},[7727],{"type":21,"value":7728},"// user-volunteered facts are high signal\n",{"type":15,"tag":460,"props":7730,"children":7731},{"class":462,"line":524},[7732,7736,7740,7745],{"type":15,"tag":460,"props":7733,"children":7734},{"style":507},[7735],{"type":21,"value":3599},{"type":15,"tag":460,"props":7737,"children":7738},{"style":872},[7739],{"type":21,"value":5683},{"type":15,"tag":460,"props":7741,"children":7742},{"style":507},[7743],{"type":21,"value":7744},",       ",{"type":15,"tag":460,"props":7746,"children":7747},{"style":467},[7748],{"type":21,"value":7749},"// user-confirmed, max confidence\n",{"type":15,"tag":460,"props":7751,"children":7752},{"class":462,"line":558},[7753,7758,7762],{"type":15,"tag":460,"props":7754,"children":7755},{"style":507},[7756],{"type":21,"value":7757},"    sourceConversationId: ",{"type":15,"tag":460,"props":7759,"children":7760},{"style":872},[7761],{"type":21,"value":516},{"type":15,"tag":460,"props":7763,"children":7764},{"style":507},[7765],{"type":21,"value":7766},".conversationId\n",{"type":15,"tag":460,"props":7768,"children":7769},{"class":462,"line":588},[7770],{"type":15,"tag":460,"props":7771,"children":7772},{"style":507},[7773],{"type":21,"value":2124},{"type":15,"tag":1799,"props":7775,"children":7777},{"id":7776},"cite-the-source-in-the-ui",[7778],{"type":21,"value":7779},"Cite The Source In The UI",{"type":15,"tag":24,"props":7781,"children":7782},{},[7783,7785,7790,7791,7796],{"type":21,"value":7784},"Atoms carry ",{"type":15,"tag":57,"props":7786,"children":7788},{"className":7787},[],[7789],{"type":21,"value":3086},{"type":21,"value":299},{"type":15,"tag":57,"props":7792,"children":7794},{"className":7793},[],[7795],{"type":21,"value":3093},{"type":21,"value":7797},". Render those as citations when the LLM uses recall:",{"type":15,"tag":348,"props":7799,"children":7801},{"code":7800,"language":453,"meta":7,"className":454,"style":7},"var hits = memory.recallByTopic(spaceId, { query: q, limit: 5 });\nhits.hits.forEach(function(h) {\n    var sourceDate = h.atom.validFrom.slice(0, 10);\n    var convLink   = \"/history/\" + h.atom.sourceConversationId;\n    // render \"Said on YYYY-MM-DD\" → conversation history view\n});\n",[7802],{"type":15,"tag":57,"props":7803,"children":7804},{"__ignoreMap":7},[7805,7841,7875,7920,7951,7959],{"type":15,"tag":460,"props":7806,"children":7807},{"class":462,"line":463},[7808,7812,7816,7820,7824,7828,7833,7837],{"type":15,"tag":460,"props":7809,"children":7810},{"style":495},[7811],{"type":21,"value":1991},{"type":15,"tag":460,"props":7813,"children":7814},{"style":507},[7815],{"type":21,"value":3992},{"type":15,"tag":460,"props":7817,"children":7818},{"style":495},[7819],{"type":21,"value":540},{"type":15,"tag":460,"props":7821,"children":7822},{"style":507},[7823],{"type":21,"value":936},{"type":15,"tag":460,"props":7825,"children":7826},{"style":501},[7827],{"type":21,"value":4860},{"type":15,"tag":460,"props":7829,"children":7830},{"style":507},[7831],{"type":21,"value":7832},"(spaceId, { query: q, limit: ",{"type":15,"tag":460,"props":7834,"children":7835},{"style":872},[7836],{"type":21,"value":7718},{"type":15,"tag":460,"props":7838,"children":7839},{"style":507},[7840],{"type":21,"value":1065},{"type":15,"tag":460,"props":7842,"children":7843},{"class":462,"line":473},[7844,7849,7854,7858,7862,7866,7871],{"type":15,"tag":460,"props":7845,"children":7846},{"style":507},[7847],{"type":21,"value":7848},"hits.hits.",{"type":15,"tag":460,"props":7850,"children":7851},{"style":501},[7852],{"type":21,"value":7853},"forEach",{"type":15,"tag":460,"props":7855,"children":7856},{"style":507},[7857],{"type":21,"value":510},{"type":15,"tag":460,"props":7859,"children":7860},{"style":495},[7861],{"type":21,"value":498},{"type":15,"tag":460,"props":7863,"children":7864},{"style":507},[7865],{"type":21,"value":510},{"type":15,"tag":460,"props":7867,"children":7868},{"style":513},[7869],{"type":21,"value":7870},"h",{"type":15,"tag":460,"props":7872,"children":7873},{"style":507},[7874],{"type":21,"value":521},{"type":15,"tag":460,"props":7876,"children":7877},{"class":462,"line":482},[7878,7882,7887,7891,7896,7900,7904,7908,7912,7916],{"type":15,"tag":460,"props":7879,"children":7880},{"style":495},[7881],{"type":21,"value":530},{"type":15,"tag":460,"props":7883,"children":7884},{"style":507},[7885],{"type":21,"value":7886}," sourceDate ",{"type":15,"tag":460,"props":7888,"children":7889},{"style":495},[7890],{"type":21,"value":540},{"type":15,"tag":460,"props":7892,"children":7893},{"style":507},[7894],{"type":21,"value":7895}," h.atom.validFrom.",{"type":15,"tag":460,"props":7897,"children":7898},{"style":501},[7899],{"type":21,"value":865},{"type":15,"tag":460,"props":7901,"children":7902},{"style":507},[7903],{"type":21,"value":510},{"type":15,"tag":460,"props":7905,"children":7906},{"style":872},[7907],{"type":21,"value":875},{"type":15,"tag":460,"props":7909,"children":7910},{"style":507},[7911],{"type":21,"value":319},{"type":15,"tag":460,"props":7913,"children":7914},{"style":872},[7915],{"type":21,"value":884},{"type":15,"tag":460,"props":7917,"children":7918},{"style":507},[7919],{"type":21,"value":1610},{"type":15,"tag":460,"props":7921,"children":7922},{"class":462,"line":491},[7923,7927,7932,7936,7941,7946],{"type":15,"tag":460,"props":7924,"children":7925},{"style":495},[7926],{"type":21,"value":530},{"type":15,"tag":460,"props":7928,"children":7929},{"style":507},[7930],{"type":21,"value":7931}," convLink   ",{"type":15,"tag":460,"props":7933,"children":7934},{"style":495},[7935],{"type":21,"value":540},{"type":15,"tag":460,"props":7937,"children":7938},{"style":714},[7939],{"type":21,"value":7940}," \"/history/\"",{"type":15,"tag":460,"props":7942,"children":7943},{"style":495},[7944],{"type":21,"value":7945}," +",{"type":15,"tag":460,"props":7947,"children":7948},{"style":507},[7949],{"type":21,"value":7950}," h.atom.sourceConversationId;\n",{"type":15,"tag":460,"props":7952,"children":7953},{"class":462,"line":524},[7954],{"type":15,"tag":460,"props":7955,"children":7956},{"style":467},[7957],{"type":21,"value":7958},"    // render \"Said on YYYY-MM-DD\" → conversation history view\n",{"type":15,"tag":460,"props":7960,"children":7961},{"class":462,"line":558},[7962],{"type":15,"tag":460,"props":7963,"children":7964},{"style":507},[7965],{"type":21,"value":2124},{"type":15,"tag":1799,"props":7967,"children":7969},{"id":7968},"gdpr-export-and-delete",[7970],{"type":21,"value":7971},"GDPR Export And Delete",{"type":15,"tag":24,"props":7973,"children":7974},{},[7975],{"type":21,"value":7976},"Single calls handle the GDPR right-to-export and right-to-erasure paths:",{"type":15,"tag":348,"props":7978,"children":7980},{"code":7979,"language":453,"meta":7,"className":454,"style":7},"// Export — typically wired to \"download my data\"\nvar dump = context.getAIAdmin().exportUserData({\n    userId: arguments.userId   // optional; defaults to current user\n});\n// dump = { conversations: [...], spaces: [...], atoms: [...],\n//          entities: [...], bindings: [...] }\n\n// Delete — wired to \"delete my data\"\ncontext.getAIAdmin().deleteUserData({\n    userId:  arguments.userId,\n    confirm: true\n});\n",[7981],{"type":15,"tag":57,"props":7982,"children":7983},{"__ignoreMap":7},[7984,7992,8030,8052,8059,8067,8075,8082,8090,8114,8131,8143],{"type":15,"tag":460,"props":7985,"children":7986},{"class":462,"line":463},[7987],{"type":15,"tag":460,"props":7988,"children":7989},{"style":467},[7990],{"type":21,"value":7991},"// Export — typically wired to \"download my data\"\n",{"type":15,"tag":460,"props":7993,"children":7994},{"class":462,"line":473},[7995,7999,8004,8008,8012,8017,8021,8026],{"type":15,"tag":460,"props":7996,"children":7997},{"style":495},[7998],{"type":21,"value":1991},{"type":15,"tag":460,"props":8000,"children":8001},{"style":507},[8002],{"type":21,"value":8003}," dump ",{"type":15,"tag":460,"props":8005,"children":8006},{"style":495},[8007],{"type":21,"value":540},{"type":15,"tag":460,"props":8009,"children":8010},{"style":507},[8011],{"type":21,"value":545},{"type":15,"tag":460,"props":8013,"children":8014},{"style":501},[8015],{"type":21,"value":8016},"getAIAdmin",{"type":15,"tag":460,"props":8018,"children":8019},{"style":507},[8020],{"type":21,"value":851},{"type":15,"tag":460,"props":8022,"children":8023},{"style":501},[8024],{"type":21,"value":8025},"exportUserData",{"type":15,"tag":460,"props":8027,"children":8028},{"style":507},[8029],{"type":21,"value":790},{"type":15,"tag":460,"props":8031,"children":8032},{"class":462,"line":482},[8033,8038,8042,8047],{"type":15,"tag":460,"props":8034,"children":8035},{"style":507},[8036],{"type":21,"value":8037},"    userId: ",{"type":15,"tag":460,"props":8039,"children":8040},{"style":872},[8041],{"type":21,"value":516},{"type":15,"tag":460,"props":8043,"children":8044},{"style":507},[8045],{"type":21,"value":8046},".userId   ",{"type":15,"tag":460,"props":8048,"children":8049},{"style":467},[8050],{"type":21,"value":8051},"// optional; defaults to current user\n",{"type":15,"tag":460,"props":8053,"children":8054},{"class":462,"line":491},[8055],{"type":15,"tag":460,"props":8056,"children":8057},{"style":507},[8058],{"type":21,"value":2124},{"type":15,"tag":460,"props":8060,"children":8061},{"class":462,"line":524},[8062],{"type":15,"tag":460,"props":8063,"children":8064},{"style":467},[8065],{"type":21,"value":8066},"// dump = { conversations: [...], spaces: [...], atoms: [...],\n",{"type":15,"tag":460,"props":8068,"children":8069},{"class":462,"line":558},[8070],{"type":15,"tag":460,"props":8071,"children":8072},{"style":467},[8073],{"type":21,"value":8074},"//          entities: [...], bindings: [...] }\n",{"type":15,"tag":460,"props":8076,"children":8077},{"class":462,"line":588},[8078],{"type":15,"tag":460,"props":8079,"children":8080},{"emptyLinePlaceholder":622},[8081],{"type":21,"value":625},{"type":15,"tag":460,"props":8083,"children":8084},{"class":462,"line":618},[8085],{"type":15,"tag":460,"props":8086,"children":8087},{"style":467},[8088],{"type":21,"value":8089},"// Delete — wired to \"delete my data\"\n",{"type":15,"tag":460,"props":8091,"children":8092},{"class":462,"line":628},[8093,8097,8101,8105,8110],{"type":15,"tag":460,"props":8094,"children":8095},{"style":507},[8096],{"type":21,"value":3513},{"type":15,"tag":460,"props":8098,"children":8099},{"style":501},[8100],{"type":21,"value":8016},{"type":15,"tag":460,"props":8102,"children":8103},{"style":507},[8104],{"type":21,"value":851},{"type":15,"tag":460,"props":8106,"children":8107},{"style":501},[8108],{"type":21,"value":8109},"deleteUserData",{"type":15,"tag":460,"props":8111,"children":8112},{"style":507},[8113],{"type":21,"value":790},{"type":15,"tag":460,"props":8115,"children":8116},{"class":462,"line":637},[8117,8122,8126],{"type":15,"tag":460,"props":8118,"children":8119},{"style":507},[8120],{"type":21,"value":8121},"    userId:  ",{"type":15,"tag":460,"props":8123,"children":8124},{"style":872},[8125],{"type":21,"value":516},{"type":15,"tag":460,"props":8127,"children":8128},{"style":507},[8129],{"type":21,"value":8130},".userId,\n",{"type":15,"tag":460,"props":8132,"children":8133},{"class":462,"line":695},[8134,8139],{"type":15,"tag":460,"props":8135,"children":8136},{"style":507},[8137],{"type":21,"value":8138},"    confirm: ",{"type":15,"tag":460,"props":8140,"children":8141},{"style":872},[8142],{"type":21,"value":5933},{"type":15,"tag":460,"props":8144,"children":8145},{"class":462,"line":744},[8146],{"type":15,"tag":460,"props":8147,"children":8148},{"style":507},[8149],{"type":21,"value":2124},{"type":15,"tag":24,"props":8151,"children":8152},{},[8153],{"type":21,"value":8154},"The delete is hard — it removes data from every collection. Idempotent.",{"type":15,"tag":1770,"props":8156,"children":8157},{},[],{"type":15,"tag":66,"props":8159,"children":8161},{"id":8160},"what-to-watch-out-for",[8162],{"type":21,"value":8163},"What To Watch Out For",{"type":15,"tag":1799,"props":8165,"children":8167},{"id":8166},"dont-mix-conversation-namespaces",[8168],{"type":21,"value":8169},"Don't Mix Conversation Namespaces",{"type":15,"tag":24,"props":8171,"children":8172},{},[8173,8175,8180,8181,8187,8188,8194,8196,8202],{"type":21,"value":8174},"A namespace is the seam at which extraction fires. If you mix unrelated topics in one namespace, the extractor produces a muddled set of atoms. Use namespaces generously — ",{"type":15,"tag":57,"props":8176,"children":8178},{"className":8177},[],[8179],{"type":21,"value":804},{"type":21,"value":319},{"type":15,"tag":57,"props":8182,"children":8184},{"className":8183},[],[8185],{"type":21,"value":8186},"\"goal-setting\"",{"type":21,"value":319},{"type":15,"tag":57,"props":8189,"children":8191},{"className":8190},[],[8192],{"type":21,"value":8193},"\"weekly-review\"",{"type":21,"value":8195}," — not a single ",{"type":15,"tag":57,"props":8197,"children":8199},{"className":8198},[],[8200],{"type":21,"value":8201},"\"chat\"",{"type":21,"value":8203}," for everything.",{"type":15,"tag":1799,"props":8205,"children":8207},{"id":8206},"dont-write-atoms-directly-when-extraction-will-handle-it",[8208],{"type":21,"value":8209},"Don't Write Atoms Directly When Extraction Will Handle It",{"type":15,"tag":24,"props":8211,"children":8212},{},[8213,8215,8220],{"type":21,"value":8214},"If a fact comes up naturally in conversation, the extractor will pick it up. Writing it directly ",{"type":15,"tag":3047,"props":8216,"children":8217},{},[8218],{"type":21,"value":8219},"in addition",{"type":21,"value":8221}," produces a duplicate that the reconciler may or may not merge. Reserve direct writes for migrations and explicit \"remember this\" flows.",{"type":15,"tag":1799,"props":8223,"children":8225},{"id":8224},"dont-conflate-visibility-levels",[8226],{"type":21,"value":8227},"Don't Conflate Visibility Levels",{"type":15,"tag":24,"props":8229,"children":8230},{},[8231,8236,8238,8243,8245,8250,8252,8257],{"type":15,"tag":57,"props":8232,"children":8234},{"className":8233},[],[8235],{"type":21,"value":2952},{"type":21,"value":8237}," is for messages the LLM sees but the user UI doesn't (system prompts, framework injections). ",{"type":15,"tag":57,"props":8239,"children":8241},{"className":8240},[],[8242],{"type":21,"value":2973},{"type":21,"value":8244}," hides from both. Defaulting to ",{"type":15,"tag":57,"props":8246,"children":8248},{"className":8247},[],[8249],{"type":21,"value":2952},{"type":21,"value":8251}," for system messages is correct; setting things to ",{"type":15,"tag":57,"props":8253,"children":8255},{"className":8254},[],[8256],{"type":21,"value":2973},{"type":21,"value":8258}," is rare.",{"type":15,"tag":1799,"props":8260,"children":8262},{"id":8261},"mind-the-token-budget",[8263],{"type":21,"value":8264},"Mind The Token Budget",{"type":15,"tag":24,"props":8266,"children":8267},{},[8268,8270,8275,8277,8282],{"type":21,"value":8269},"Working context trims ",{"type":15,"tag":44,"props":8271,"children":8272},{},[8273],{"type":21,"value":8274},"recent turns first",{"type":21,"value":8276},", then recall hits. If your ",{"type":15,"tag":57,"props":8278,"children":8280},{"className":8279},[],[8281],{"type":21,"value":6125},{"type":21,"value":8283}," is too tight you'll lose recent conversation context — usually the most useful part. Err on the high side.",{"type":15,"tag":1799,"props":8285,"children":8287},{"id":8286},"bumping-extractionversion-doesnt-auto-replay",[8288,8290,8295],{"type":21,"value":8289},"Bumping ",{"type":15,"tag":57,"props":8291,"children":8293},{"className":8292},[],[8294],{"type":21,"value":4742},{"type":21,"value":8296}," Doesn't Auto-Replay",{"type":15,"tag":24,"props":8298,"children":8299},{},[8300,8302,8307],{"type":21,"value":8301},"Existing atoms stay where they are; only NEW conversations close at the new version. To re-extract historical conversations, run ",{"type":15,"tag":57,"props":8303,"children":8305},{"className":8304},[],[8306],{"type":21,"value":4801},{"type":21,"value":8308}," for each one.",{"type":15,"tag":1799,"props":8310,"children":8312},{"id":8311},"bindings-are-cluster-wide",[8313],{"type":21,"value":8314},"Bindings Are Cluster-Wide",{"type":15,"tag":24,"props":8316,"children":8317},{},[8318,8320,8326],{"type":21,"value":8319},"A binding lives on the platform; every node sees it. If you delete a binding, extraction stops everywhere. Use ",{"type":15,"tag":57,"props":8321,"children":8323},{"className":8322},[],[8324],{"type":21,"value":8325},"enabled: false",{"type":21,"value":8327}," on the binding to pause without losing config.",{"type":15,"tag":1770,"props":8329,"children":8330},{},[],{"type":15,"tag":66,"props":8332,"children":8334},{"id":8333},"reference-cheat-sheet",[8335],{"type":21,"value":8336},"Reference Cheat Sheet",{"type":15,"tag":24,"props":8338,"children":8339},{},[8340],{"type":21,"value":8341},"Quick lookups for the methods and shapes you'll reach for most often.",{"type":15,"tag":1799,"props":8343,"children":8345},{"id":8344},"contextgetconversations",[8346],{"type":15,"tag":57,"props":8347,"children":8349},{"className":8348},[],[8350],{"type":21,"value":207},{"type":15,"tag":156,"props":8352,"children":8353},{},[8354,8375],{"type":15,"tag":160,"props":8355,"children":8356},{},[8357],{"type":15,"tag":164,"props":8358,"children":8359},{},[8360,8365,8370],{"type":15,"tag":168,"props":8361,"children":8362},{},[8363],{"type":21,"value":8364},"Method",{"type":15,"tag":168,"props":8366,"children":8367},{},[8368],{"type":21,"value":8369},"Returns",{"type":15,"tag":168,"props":8371,"children":8372},{},[8373],{"type":21,"value":8374},"Notes",{"type":15,"tag":184,"props":8376,"children":8377},{},[8378,8404,8426,8450,8471,8493,8512,8531,8557,8583,8607,8631,8657],{"type":15,"tag":164,"props":8379,"children":8380},{},[8381,8390,8394],{"type":15,"tag":191,"props":8382,"children":8383},{},[8384],{"type":15,"tag":57,"props":8385,"children":8387},{"className":8386},[],[8388],{"type":21,"value":8389},"createConversation({namespace, title?, sessionId?, metadata?})",{"type":15,"tag":191,"props":8391,"children":8392},{},[8393],{"type":21,"value":365},{"type":15,"tag":191,"props":8395,"children":8396},{},[8397,8402],{"type":15,"tag":57,"props":8398,"children":8400},{"className":8399},[],[8401],{"type":21,"value":1887},{"type":21,"value":8403}," required",{"type":15,"tag":164,"props":8405,"children":8406},{},[8407,8416,8421],{"type":15,"tag":191,"props":8408,"children":8409},{},[8410],{"type":15,"tag":57,"props":8411,"children":8413},{"className":8412},[],[8414],{"type":21,"value":8415},"getConversation(id)",{"type":15,"tag":191,"props":8417,"children":8418},{},[8419],{"type":21,"value":8420},"conversation | null",{"type":15,"tag":191,"props":8422,"children":8423},{},[8424],{"type":21,"value":8425},"scope-checked",{"type":15,"tag":164,"props":8427,"children":8428},{},[8429,8438,8445],{"type":15,"tag":191,"props":8430,"children":8431},{},[8432],{"type":15,"tag":57,"props":8433,"children":8435},{"className":8434},[],[8436],{"type":21,"value":8437},"listConversations({})",{"type":15,"tag":191,"props":8439,"children":8440},{},[8441,8442],{"type":21,"value":365},{"type":15,"tag":460,"props":8443,"children":8444},{},[],{"type":15,"tag":191,"props":8446,"children":8447},{},[8448],{"type":21,"value":8449},"for current user",{"type":15,"tag":164,"props":8451,"children":8452},{},[8453,8462,8466],{"type":15,"tag":191,"props":8454,"children":8455},{},[8456],{"type":15,"tag":57,"props":8457,"children":8459},{"className":8458},[],[8460],{"type":21,"value":8461},"closeConversation(id)",{"type":15,"tag":191,"props":8463,"children":8464},{},[8465],{"type":21,"value":365},{"type":15,"tag":191,"props":8467,"children":8468},{},[8469],{"type":21,"value":8470},"idempotent",{"type":15,"tag":164,"props":8472,"children":8473},{},[8474,8483,8488],{"type":15,"tag":191,"props":8475,"children":8476},{},[8477],{"type":15,"tag":57,"props":8478,"children":8480},{"className":8479},[],[8481],{"type":21,"value":8482},"appendUserMessage(id, {content, idempotencyKey?, traceId?})",{"type":15,"tag":191,"props":8484,"children":8485},{},[8486],{"type":21,"value":8487},"message",{"type":15,"tag":191,"props":8489,"children":8490},{},[8491],{"type":21,"value":8492},"string or content-block list",{"type":15,"tag":164,"props":8494,"children":8495},{},[8496,8505,8509],{"type":15,"tag":191,"props":8497,"children":8498},{},[8499],{"type":15,"tag":57,"props":8500,"children":8502},{"className":8501},[],[8503],{"type":21,"value":8504},"appendAssistantTurn(id, {content, stopReason?, model?, provider?, usage?, traceId?})",{"type":15,"tag":191,"props":8506,"children":8507},{},[8508],{"type":21,"value":8487},{"type":15,"tag":191,"props":8510,"children":8511},{},[],{"type":15,"tag":164,"props":8513,"children":8514},{},[8515,8524,8528],{"type":15,"tag":191,"props":8516,"children":8517},{},[8518],{"type":15,"tag":57,"props":8519,"children":8521},{"className":8520},[],[8522],{"type":21,"value":8523},"appendToolResult(id, {toolUseId, toolName?, content, isError?})",{"type":15,"tag":191,"props":8525,"children":8526},{},[8527],{"type":21,"value":8487},{"type":15,"tag":191,"props":8529,"children":8530},{},[],{"type":15,"tag":164,"props":8532,"children":8533},{},[8534,8543,8547],{"type":15,"tag":191,"props":8535,"children":8536},{},[8537],{"type":15,"tag":57,"props":8538,"children":8540},{"className":8539},[],[8541],{"type":21,"value":8542},"appendSystemMessage(id, {content, visibility?})",{"type":15,"tag":191,"props":8544,"children":8545},{},[8546],{"type":21,"value":8487},{"type":15,"tag":191,"props":8548,"children":8549},{},[8550,8552],{"type":21,"value":8551},"defaults to ",{"type":15,"tag":57,"props":8553,"children":8555},{"className":8554},[],[8556],{"type":21,"value":2952},{"type":15,"tag":164,"props":8558,"children":8559},{},[8560,8569,8578],{"type":15,"tag":191,"props":8561,"children":8562},{},[8563],{"type":15,"tag":57,"props":8564,"children":8566},{"className":8565},[],[8567],{"type":21,"value":8568},"appendTurn(id, {userContent, userVisibility?, assistant: {content, stopReason?, model?, provider?, usage?}, idempotencyKey?})",{"type":15,"tag":191,"props":8570,"children":8571},{},[8572],{"type":15,"tag":57,"props":8573,"children":8575},{"className":8574},[],[8576],{"type":21,"value":8577},"{turnId, userMessage, assistantMessage}",{"type":15,"tag":191,"props":8579,"children":8580},{},[8581],{"type":21,"value":8582},"one call, shared turn",{"type":15,"tag":164,"props":8584,"children":8585},{},[8586,8595,8602],{"type":15,"tag":191,"props":8587,"children":8588},{},[8589],{"type":15,"tag":57,"props":8590,"children":8592},{"className":8591},[],[8593],{"type":21,"value":8594},"getMessages(id, {limit?, includeInternal?})",{"type":15,"tag":191,"props":8596,"children":8597},{},[8598,8599],{"type":21,"value":8487},{"type":15,"tag":460,"props":8600,"children":8601},{},[],{"type":15,"tag":191,"props":8603,"children":8604},{},[8605],{"type":21,"value":8606},"excludes internal by default",{"type":15,"tag":164,"props":8608,"children":8609},{},[8610,8619,8626],{"type":15,"tag":191,"props":8611,"children":8612},{},[8613],{"type":15,"tag":57,"props":8614,"children":8616},{"className":8615},[],[8617],{"type":21,"value":8618},"getRawTurns(id, {limit?})",{"type":15,"tag":191,"props":8620,"children":8621},{},[8622,8623],{"type":21,"value":8487},{"type":15,"tag":460,"props":8624,"children":8625},{},[],{"type":15,"tag":191,"props":8627,"children":8628},{},[8629],{"type":21,"value":8630},"always includes internal",{"type":15,"tag":164,"props":8632,"children":8633},{},[8634,8643,8652],{"type":15,"tag":191,"props":8635,"children":8636},{},[8637],{"type":15,"tag":57,"props":8638,"children":8640},{"className":8639},[],[8641],{"type":21,"value":8642},"runTurn(id, {provider, model, userText? | content?, tools?, toolHandler?, options?, maxCycles?, tailLimit?, idempotencyKey?})",{"type":15,"tag":191,"props":8644,"children":8645},{},[8646],{"type":15,"tag":57,"props":8647,"children":8649},{"className":8648},[],[8650],{"type":21,"value":8651},"{status, appendedMessages, aggregateUsage, toolInvocations, totalLatencyMs}",{"type":15,"tag":191,"props":8653,"children":8654},{},[8655],{"type":21,"value":8656},"full LLM turn",{"type":15,"tag":164,"props":8658,"children":8659},{},[8660,8669,8678],{"type":15,"tag":191,"props":8661,"children":8662},{},[8663],{"type":15,"tag":57,"props":8664,"children":8666},{"className":8665},[],[8667],{"type":21,"value":8668},"refreshRollingSummary(id)",{"type":15,"tag":191,"props":8670,"children":8671},{},[8672],{"type":15,"tag":57,"props":8673,"children":8675},{"className":8674},[],[8676],{"type":21,"value":8677},"{outcome, rollingSummary, rollingSummaryUntilSeq}",{"type":15,"tag":191,"props":8679,"children":8680},{},[8681],{"type":21,"value":8682},"manual",{"type":15,"tag":1799,"props":8684,"children":8686},{"id":8685},"contextgetmemory",[8687],{"type":15,"tag":57,"props":8688,"children":8690},{"className":8689},[],[8691],{"type":21,"value":232},{"type":15,"tag":156,"props":8693,"children":8694},{},[8695,8713],{"type":15,"tag":160,"props":8696,"children":8697},{},[8698],{"type":15,"tag":164,"props":8699,"children":8700},{},[8701,8705,8709],{"type":15,"tag":168,"props":8702,"children":8703},{},[8704],{"type":21,"value":8364},{"type":15,"tag":168,"props":8706,"children":8707},{},[8708],{"type":21,"value":8369},{"type":15,"tag":168,"props":8710,"children":8711},{},[8712],{"type":21,"value":8374},{"type":15,"tag":184,"props":8714,"children":8715},{},[8716,8743,8763,8785,8807,8828,8848,8869,8890,8912,8940,8960,8981,9002,9024,9046,9067,9088,9109,9131,9152,9171],{"type":15,"tag":164,"props":8717,"children":8718},{},[8719,8728,8733],{"type":15,"tag":191,"props":8720,"children":8721},{},[8722],{"type":15,"tag":57,"props":8723,"children":8725},{"className":8724},[],[8726],{"type":21,"value":8727},"createMemorySpace({name?, metadata?})",{"type":15,"tag":191,"props":8729,"children":8730},{},[8731],{"type":21,"value":8732},"space",{"type":15,"tag":191,"props":8734,"children":8735},{},[8736,8741],{"type":15,"tag":57,"props":8737,"children":8739},{"className":8738},[],[8740],{"type":21,"value":3291},{"type":21,"value":8742}," is yours",{"type":15,"tag":164,"props":8744,"children":8745},{},[8746,8755,8760],{"type":15,"tag":191,"props":8747,"children":8748},{},[8749],{"type":15,"tag":57,"props":8750,"children":8752},{"className":8751},[],[8753],{"type":21,"value":8754},"getMemorySpace(id)",{"type":15,"tag":191,"props":8756,"children":8757},{},[8758],{"type":21,"value":8759},"space | null",{"type":15,"tag":191,"props":8761,"children":8762},{},[],{"type":15,"tag":164,"props":8764,"children":8765},{},[8766,8775,8782],{"type":15,"tag":191,"props":8767,"children":8768},{},[8769],{"type":15,"tag":57,"props":8770,"children":8772},{"className":8771},[],[8773],{"type":21,"value":8774},"listMemorySpaces({})",{"type":15,"tag":191,"props":8776,"children":8777},{},[8778,8779],{"type":21,"value":8732},{"type":15,"tag":460,"props":8780,"children":8781},{},[],{"type":15,"tag":191,"props":8783,"children":8784},{},[],{"type":15,"tag":164,"props":8786,"children":8787},{},[8788,8797,8802],{"type":15,"tag":191,"props":8789,"children":8790},{},[8791],{"type":15,"tag":57,"props":8792,"children":8794},{"className":8793},[],[8795],{"type":21,"value":8796},"deleteMemorySpace(id)",{"type":15,"tag":191,"props":8798,"children":8799},{},[8800],{"type":21,"value":8801},"void",{"type":15,"tag":191,"props":8803,"children":8804},{},[8805],{"type":21,"value":8806},"soft delete",{"type":15,"tag":164,"props":8808,"children":8809},{},[8810,8819,8823],{"type":15,"tag":191,"props":8811,"children":8812},{},[8813],{"type":15,"tag":57,"props":8814,"children":8816},{"className":8815},[],[8817],{"type":21,"value":8818},"addAtom(spaceId, {text, category: {name, kind}, importance?, confidence?, validFrom?, sourceConversationId?, sourceMessageIds?})",{"type":15,"tag":191,"props":8820,"children":8821},{},[8822],{"type":21,"value":3030},{"type":15,"tag":191,"props":8824,"children":8825},{},[8826],{"type":21,"value":8827},"direct write",{"type":15,"tag":164,"props":8829,"children":8830},{},[8831,8840,8845],{"type":15,"tag":191,"props":8832,"children":8833},{},[8834],{"type":15,"tag":57,"props":8835,"children":8837},{"className":8836},[],[8838],{"type":21,"value":8839},"getAtom(id)",{"type":15,"tag":191,"props":8841,"children":8842},{},[8843],{"type":21,"value":8844},"atom | null",{"type":15,"tag":191,"props":8846,"children":8847},{},[],{"type":15,"tag":164,"props":8849,"children":8850},{},[8851,8860,8864],{"type":15,"tag":191,"props":8852,"children":8853},{},[8854],{"type":15,"tag":57,"props":8855,"children":8857},{"className":8856},[],[8858],{"type":21,"value":8859},"supersedeAtom(oldId, {…AddAtom})",{"type":15,"tag":191,"props":8861,"children":8862},{},[8863],{"type":21,"value":3030},{"type":15,"tag":191,"props":8865,"children":8866},{},[8867],{"type":21,"value":8868},"closes old, inserts new",{"type":15,"tag":164,"props":8870,"children":8871},{},[8872,8881,8885],{"type":15,"tag":191,"props":8873,"children":8874},{},[8875],{"type":15,"tag":57,"props":8876,"children":8878},{"className":8877},[],[8879],{"type":21,"value":8880},"archiveAtom(id)",{"type":15,"tag":191,"props":8882,"children":8883},{},[8884],{"type":21,"value":8801},{"type":15,"tag":191,"props":8886,"children":8887},{},[8888],{"type":21,"value":8889},"excluded from default recall",{"type":15,"tag":164,"props":8891,"children":8892},{},[8893,8902,8909],{"type":15,"tag":191,"props":8894,"children":8895},{},[8896],{"type":15,"tag":57,"props":8897,"children":8899},{"className":8898},[],[8900],{"type":21,"value":8901},"listAtoms(spaceId, {category?, status?, validAt?, limit?})",{"type":15,"tag":191,"props":8903,"children":8904},{},[8905,8906],{"type":21,"value":3030},{"type":15,"tag":460,"props":8907,"children":8908},{},[],{"type":15,"tag":191,"props":8910,"children":8911},{},[],{"type":15,"tag":164,"props":8913,"children":8914},{},[8915,8924,8929],{"type":15,"tag":191,"props":8916,"children":8917},{},[8918],{"type":15,"tag":57,"props":8919,"children":8921},{"className":8920},[],[8922],{"type":21,"value":8923},"createEntity(spaceId, {type, canonicalName, description?, attributes?})",{"type":15,"tag":191,"props":8925,"children":8926},{},[8927],{"type":21,"value":8928},"entity",{"type":15,"tag":191,"props":8930,"children":8931},{},[8932,8938],{"type":15,"tag":57,"props":8933,"children":8935},{"className":8934},[],[8936],{"type":21,"value":8937},"type",{"type":21,"value":8939}," ∈ PERSON / ORGANIZATION / PLACE / OBJECT / CONCEPT / EVENT / AGREEMENT",{"type":15,"tag":164,"props":8941,"children":8942},{},[8943,8952,8957],{"type":15,"tag":191,"props":8944,"children":8945},{},[8946],{"type":15,"tag":57,"props":8947,"children":8949},{"className":8948},[],[8950],{"type":21,"value":8951},"getEntity(id)",{"type":15,"tag":191,"props":8953,"children":8954},{},[8955],{"type":21,"value":8956},"entity | null",{"type":15,"tag":191,"props":8958,"children":8959},{},[],{"type":15,"tag":164,"props":8961,"children":8962},{},[8963,8972,8976],{"type":15,"tag":191,"props":8964,"children":8965},{},[8966],{"type":15,"tag":57,"props":8967,"children":8969},{"className":8968},[],[8970],{"type":21,"value":8971},"findEntityByName(spaceId, {type, name})",{"type":15,"tag":191,"props":8973,"children":8974},{},[8975],{"type":21,"value":8956},{"type":15,"tag":191,"props":8977,"children":8978},{},[8979],{"type":21,"value":8980},"exact / alias match",{"type":15,"tag":164,"props":8982,"children":8983},{},[8984,8993,8997],{"type":15,"tag":191,"props":8985,"children":8986},{},[8987],{"type":15,"tag":57,"props":8988,"children":8990},{"className":8989},[],[8991],{"type":21,"value":8992},"mergeEntities(canonicalId, aliasId)",{"type":15,"tag":191,"props":8994,"children":8995},{},[8996],{"type":21,"value":8928},{"type":15,"tag":191,"props":8998,"children":8999},{},[9000],{"type":21,"value":9001},"re-points atom refs",{"type":15,"tag":164,"props":9003,"children":9004},{},[9005,9014,9021],{"type":15,"tag":191,"props":9006,"children":9007},{},[9008],{"type":15,"tag":57,"props":9009,"children":9011},{"className":9010},[],[9012],{"type":21,"value":9013},"searchEntities(spaceId, {type?, query, limit?})",{"type":15,"tag":191,"props":9015,"children":9016},{},[9017,9018],{"type":21,"value":8928},{"type":15,"tag":460,"props":9019,"children":9020},{},[],{"type":15,"tag":191,"props":9022,"children":9023},{},[],{"type":15,"tag":164,"props":9025,"children":9026},{},[9027,9036,9041],{"type":15,"tag":191,"props":9028,"children":9029},{},[9030],{"type":15,"tag":57,"props":9031,"children":9033},{"className":9032},[],[9034],{"type":21,"value":9035},"recallByTopic(spaceId, {query, limit?, categoryNames?, minImportance?, validAt?})",{"type":15,"tag":191,"props":9037,"children":9038},{},[9039],{"type":21,"value":9040},"recall result",{"type":15,"tag":191,"props":9042,"children":9043},{},[9044],{"type":21,"value":9045},"semantic",{"type":15,"tag":164,"props":9047,"children":9048},{},[9049,9058,9062],{"type":15,"tag":191,"props":9050,"children":9051},{},[9052],{"type":15,"tag":57,"props":9053,"children":9055},{"className":9054},[],[9056],{"type":21,"value":9057},"recallByEntity(spaceId, {entityIdOrName, limit?, categoryNames?})",{"type":15,"tag":191,"props":9059,"children":9060},{},[9061],{"type":21,"value":9040},{"type":15,"tag":191,"props":9063,"children":9064},{},[9065],{"type":21,"value":9066},"newest-first",{"type":15,"tag":164,"props":9068,"children":9069},{},[9070,9079,9083],{"type":15,"tag":191,"props":9071,"children":9072},{},[9073],{"type":15,"tag":57,"props":9074,"children":9076},{"className":9075},[],[9077],{"type":21,"value":9078},"recallTimeline(spaceId, {entityIdOrName? | query?, from?, to?, limit?, includeSuperseded?})",{"type":15,"tag":191,"props":9080,"children":9081},{},[9082],{"type":21,"value":9040},{"type":15,"tag":191,"props":9084,"children":9085},{},[9086],{"type":21,"value":9087},"bi-temporal",{"type":15,"tag":164,"props":9089,"children":9090},{},[9091,9100,9104],{"type":15,"tag":191,"props":9092,"children":9093},{},[9094],{"type":15,"tag":57,"props":9095,"children":9097},{"className":9096},[],[9098],{"type":21,"value":9099},"createBinding({conversationScope, memorySpaceIds, extractionPolicy})",{"type":15,"tag":191,"props":9101,"children":9102},{},[9103],{"type":21,"value":395},{"type":15,"tag":191,"props":9105,"children":9106},{},[9107],{"type":21,"value":9108},"enables extraction",{"type":15,"tag":164,"props":9110,"children":9111},{},[9112,9121,9128],{"type":15,"tag":191,"props":9113,"children":9114},{},[9115],{"type":15,"tag":57,"props":9116,"children":9118},{"className":9117},[],[9119],{"type":21,"value":9120},"listBindings({})",{"type":15,"tag":191,"props":9122,"children":9123},{},[9124,9125],{"type":21,"value":395},{"type":15,"tag":460,"props":9126,"children":9127},{},[],{"type":15,"tag":191,"props":9129,"children":9130},{},[],{"type":15,"tag":164,"props":9132,"children":9133},{},[9134,9143,9147],{"type":15,"tag":191,"props":9135,"children":9136},{},[9137],{"type":15,"tag":57,"props":9138,"children":9140},{"className":9139},[],[9141],{"type":21,"value":9142},"updateBinding(id, {extractionPolicy?, enabled?})",{"type":15,"tag":191,"props":9144,"children":9145},{},[9146],{"type":21,"value":395},{"type":15,"tag":191,"props":9148,"children":9149},{},[9150],{"type":21,"value":9151},"scope is immutable",{"type":15,"tag":164,"props":9153,"children":9154},{},[9155,9164,9168],{"type":15,"tag":191,"props":9156,"children":9157},{},[9158],{"type":15,"tag":57,"props":9159,"children":9161},{"className":9160},[],[9162],{"type":21,"value":9163},"deleteBinding(id)",{"type":15,"tag":191,"props":9165,"children":9166},{},[9167],{"type":21,"value":8801},{"type":15,"tag":191,"props":9169,"children":9170},{},[],{"type":15,"tag":164,"props":9172,"children":9173},{},[9174,9183,9188],{"type":15,"tag":191,"props":9175,"children":9176},{},[9177],{"type":15,"tag":57,"props":9178,"children":9180},{"className":9179},[],[9181],{"type":21,"value":9182},"runExtractionForConversation(convId, {extractionVersion?})",{"type":15,"tag":191,"props":9184,"children":9185},{},[9186],{"type":21,"value":9187},"job",{"type":15,"tag":191,"props":9189,"children":9190},{},[9191],{"type":21,"value":9192},"manual replay",{"type":15,"tag":1799,"props":9194,"children":9196},{"id":9195},"contextgetworkingcontext",[9197],{"type":15,"tag":57,"props":9198,"children":9200},{"className":9199},[],[9201],{"type":21,"value":257},{"type":15,"tag":156,"props":9203,"children":9204},{},[9205,9223],{"type":15,"tag":160,"props":9206,"children":9207},{},[9208],{"type":15,"tag":164,"props":9209,"children":9210},{},[9211,9215,9219],{"type":15,"tag":168,"props":9212,"children":9213},{},[9214],{"type":21,"value":8364},{"type":15,"tag":168,"props":9216,"children":9217},{},[9218],{"type":21,"value":8369},{"type":15,"tag":168,"props":9220,"children":9221},{},[9222],{"type":21,"value":8374},{"type":15,"tag":184,"props":9224,"children":9225},{},[9226],{"type":15,"tag":164,"props":9227,"children":9228},{},[9229,9238,9247],{"type":15,"tag":191,"props":9230,"children":9231},{},[9232],{"type":15,"tag":57,"props":9233,"children":9235},{"className":9234},[],[9236],{"type":21,"value":9237},"buildWorkingContext(convId, {memorySpaceId, recallQuery?, recentTurns?, recallLimit?, tokenBudget?, includeRollingSummary?, alwaysOnCategoryNames?, templateId?})",{"type":15,"tag":191,"props":9239,"children":9240},{},[9241],{"type":15,"tag":57,"props":9242,"children":9244},{"className":9243},[],[9245],{"type":21,"value":9246},"{contextBlock, messages, atomsUsed, tokensEstimated}",{"type":15,"tag":191,"props":9248,"children":9249},{},[9250],{"type":21,"value":9251},"all knobs documented in JSDoc",{"type":15,"tag":1799,"props":9253,"children":9255},{"id":9254},"contextgetaiadmin",[9256],{"type":15,"tag":57,"props":9257,"children":9259},{"className":9258},[],[9260],{"type":21,"value":282},{"type":15,"tag":156,"props":9262,"children":9263},{},[9264,9282],{"type":15,"tag":160,"props":9265,"children":9266},{},[9267],{"type":15,"tag":164,"props":9268,"children":9269},{},[9270,9274,9278],{"type":15,"tag":168,"props":9271,"children":9272},{},[9273],{"type":21,"value":8364},{"type":15,"tag":168,"props":9275,"children":9276},{},[9277],{"type":21,"value":8369},{"type":15,"tag":168,"props":9279,"children":9280},{},[9281],{"type":21,"value":8374},{"type":15,"tag":184,"props":9283,"children":9284},{},[9285,9311],{"type":15,"tag":164,"props":9286,"children":9287},{},[9288,9297,9306],{"type":15,"tag":191,"props":9289,"children":9290},{},[9291],{"type":15,"tag":57,"props":9292,"children":9294},{"className":9293},[],[9295],{"type":21,"value":9296},"exportUserData({userId?})",{"type":15,"tag":191,"props":9298,"children":9299},{},[9300],{"type":15,"tag":57,"props":9301,"children":9303},{"className":9302},[],[9304],{"type":21,"value":9305},"{conversations, spaces, atoms, entities, bindings}",{"type":15,"tag":191,"props":9307,"children":9308},{},[9309],{"type":21,"value":9310},"GDPR right-to-export",{"type":15,"tag":164,"props":9312,"children":9313},{},[9314,9323,9332],{"type":15,"tag":191,"props":9315,"children":9316},{},[9317],{"type":15,"tag":57,"props":9318,"children":9320},{"className":9319},[],[9321],{"type":21,"value":9322},"deleteUserData({userId?, confirm: true})",{"type":15,"tag":191,"props":9324,"children":9325},{},[9326],{"type":15,"tag":57,"props":9327,"children":9329},{"className":9328},[],[9330],{"type":21,"value":9331},"{deleted: {…counts}}",{"type":15,"tag":191,"props":9333,"children":9334},{},[9335],{"type":21,"value":9336},"GDPR right-to-erasure",{"type":15,"tag":1799,"props":9338,"children":9340},{"id":9339},"common-shapes",[9341],{"type":21,"value":9342},"Common Shapes",{"type":15,"tag":24,"props":9344,"children":9345},{},[9346,9351,9353,9359],{"type":15,"tag":44,"props":9347,"children":9348},{},[9349],{"type":21,"value":9350},"Content block",{"type":21,"value":9352}," (used in ",{"type":15,"tag":57,"props":9354,"children":9356},{"className":9355},[],[9357],{"type":21,"value":9358},"content",{"type":21,"value":9360}," fields):",{"type":15,"tag":348,"props":9362,"children":9364},{"code":9363,"language":453,"meta":7,"className":454,"style":7},"{ type: \"text\",        text: \"...\" }\n{ type: \"image\",       url: \"...\", mimeType: \"image/png\" }\n{ type: \"tool_use\",    id: \"tu_1\", name: \"lookup\", arguments: { ... } }\n{ type: \"tool_result\", toolUseId: \"tu_1\", content: \"...\", isError: false }\n",[9365],{"type":15,"tag":57,"props":9366,"children":9367},{"__ignoreMap":7},[9368,9410,9469,9547],{"type":15,"tag":460,"props":9369,"children":9370},{"class":462,"line":463},[9371,9375,9379,9383,9388,9393,9397,9401,9406],{"type":15,"tag":460,"props":9372,"children":9373},{"style":507},[9374],{"type":21,"value":4554},{"type":15,"tag":460,"props":9376,"children":9377},{"style":501},[9378],{"type":21,"value":8937},{"type":15,"tag":460,"props":9380,"children":9381},{"style":507},[9382],{"type":21,"value":2407},{"type":15,"tag":460,"props":9384,"children":9385},{"style":714},[9386],{"type":21,"value":9387},"\"text\"",{"type":15,"tag":460,"props":9389,"children":9390},{"style":507},[9391],{"type":21,"value":9392},",        ",{"type":15,"tag":460,"props":9394,"children":9395},{"style":501},[9396],{"type":21,"value":21},{"type":15,"tag":460,"props":9398,"children":9399},{"style":507},[9400],{"type":21,"value":2407},{"type":15,"tag":460,"props":9402,"children":9403},{"style":714},[9404],{"type":21,"value":9405},"\"...\"",{"type":15,"tag":460,"props":9407,"children":9408},{"style":507},[9409],{"type":21,"value":2116},{"type":15,"tag":460,"props":9411,"children":9412},{"class":462,"line":473},[9413,9417,9421,9425,9430,9434,9439,9443,9447,9451,9456,9460,9465],{"type":15,"tag":460,"props":9414,"children":9415},{"style":507},[9416],{"type":21,"value":4554},{"type":15,"tag":460,"props":9418,"children":9419},{"style":501},[9420],{"type":21,"value":8937},{"type":15,"tag":460,"props":9422,"children":9423},{"style":507},[9424],{"type":21,"value":2407},{"type":15,"tag":460,"props":9426,"children":9427},{"style":714},[9428],{"type":21,"value":9429},"\"image\"",{"type":15,"tag":460,"props":9431,"children":9432},{"style":507},[9433],{"type":21,"value":7744},{"type":15,"tag":460,"props":9435,"children":9436},{"style":501},[9437],{"type":21,"value":9438},"url",{"type":15,"tag":460,"props":9440,"children":9441},{"style":507},[9442],{"type":21,"value":2407},{"type":15,"tag":460,"props":9444,"children":9445},{"style":714},[9446],{"type":21,"value":9405},{"type":15,"tag":460,"props":9448,"children":9449},{"style":507},[9450],{"type":21,"value":319},{"type":15,"tag":460,"props":9452,"children":9453},{"style":501},[9454],{"type":21,"value":9455},"mimeType",{"type":15,"tag":460,"props":9457,"children":9458},{"style":507},[9459],{"type":21,"value":2407},{"type":15,"tag":460,"props":9461,"children":9462},{"style":714},[9463],{"type":21,"value":9464},"\"image/png\"",{"type":15,"tag":460,"props":9466,"children":9467},{"style":507},[9468],{"type":21,"value":2116},{"type":15,"tag":460,"props":9470,"children":9471},{"class":462,"line":482},[9472,9476,9480,9484,9489,9494,9499,9503,9508,9512,9516,9520,9525,9529,9533,9538,9542],{"type":15,"tag":460,"props":9473,"children":9474},{"style":507},[9475],{"type":21,"value":4554},{"type":15,"tag":460,"props":9477,"children":9478},{"style":501},[9479],{"type":21,"value":8937},{"type":15,"tag":460,"props":9481,"children":9482},{"style":507},[9483],{"type":21,"value":2407},{"type":15,"tag":460,"props":9485,"children":9486},{"style":714},[9487],{"type":21,"value":9488},"\"tool_use\"",{"type":15,"tag":460,"props":9490,"children":9491},{"style":507},[9492],{"type":21,"value":9493},",    ",{"type":15,"tag":460,"props":9495,"children":9496},{"style":501},[9497],{"type":21,"value":9498},"id",{"type":15,"tag":460,"props":9500,"children":9501},{"style":507},[9502],{"type":21,"value":2407},{"type":15,"tag":460,"props":9504,"children":9505},{"style":714},[9506],{"type":21,"value":9507},"\"tu_1\"",{"type":15,"tag":460,"props":9509,"children":9510},{"style":507},[9511],{"type":21,"value":319},{"type":15,"tag":460,"props":9513,"children":9514},{"style":501},[9515],{"type":21,"value":3291},{"type":15,"tag":460,"props":9517,"children":9518},{"style":507},[9519],{"type":21,"value":2407},{"type":15,"tag":460,"props":9521,"children":9522},{"style":714},[9523],{"type":21,"value":9524},"\"lookup\"",{"type":15,"tag":460,"props":9526,"children":9527},{"style":507},[9528],{"type":21,"value":319},{"type":15,"tag":460,"props":9530,"children":9531},{"style":501},[9532],{"type":21,"value":516},{"type":15,"tag":460,"props":9534,"children":9535},{"style":507},[9536],{"type":21,"value":9537},": { ",{"type":15,"tag":460,"props":9539,"children":9540},{"style":495},[9541],{"type":21,"value":5634},{"type":15,"tag":460,"props":9543,"children":9544},{"style":507},[9545],{"type":21,"value":9546}," } }\n",{"type":15,"tag":460,"props":9548,"children":9549},{"class":462,"line":491},[9550,9554,9558,9562,9567,9571,9576,9580,9584,9588,9592,9596,9600,9604,9609,9613,9617],{"type":15,"tag":460,"props":9551,"children":9552},{"style":507},[9553],{"type":21,"value":4554},{"type":15,"tag":460,"props":9555,"children":9556},{"style":501},[9557],{"type":21,"value":8937},{"type":15,"tag":460,"props":9559,"children":9560},{"style":507},[9561],{"type":21,"value":2407},{"type":15,"tag":460,"props":9563,"children":9564},{"style":714},[9565],{"type":21,"value":9566},"\"tool_result\"",{"type":15,"tag":460,"props":9568,"children":9569},{"style":507},[9570],{"type":21,"value":319},{"type":15,"tag":460,"props":9572,"children":9573},{"style":501},[9574],{"type":21,"value":9575},"toolUseId",{"type":15,"tag":460,"props":9577,"children":9578},{"style":507},[9579],{"type":21,"value":2407},{"type":15,"tag":460,"props":9581,"children":9582},{"style":714},[9583],{"type":21,"value":9507},{"type":15,"tag":460,"props":9585,"children":9586},{"style":507},[9587],{"type":21,"value":319},{"type":15,"tag":460,"props":9589,"children":9590},{"style":501},[9591],{"type":21,"value":9358},{"type":15,"tag":460,"props":9593,"children":9594},{"style":507},[9595],{"type":21,"value":2407},{"type":15,"tag":460,"props":9597,"children":9598},{"style":714},[9599],{"type":21,"value":9405},{"type":15,"tag":460,"props":9601,"children":9602},{"style":507},[9603],{"type":21,"value":319},{"type":15,"tag":460,"props":9605,"children":9606},{"style":501},[9607],{"type":21,"value":9608},"isError",{"type":15,"tag":460,"props":9610,"children":9611},{"style":507},[9612],{"type":21,"value":2407},{"type":15,"tag":460,"props":9614,"children":9615},{"style":872},[9616],{"type":21,"value":4341},{"type":15,"tag":460,"props":9618,"children":9619},{"style":507},[9620],{"type":21,"value":2116},{"type":15,"tag":24,"props":9622,"children":9623},{},[9624,9629],{"type":15,"tag":44,"props":9625,"children":9626},{},[9627],{"type":21,"value":9628},"Atom",{"type":21,"value":4531},{"type":15,"tag":348,"props":9631,"children":9633},{"code":9632,"language":453,"meta":7,"className":454,"style":7},"{\n    id, memorySpaceId, tenantId, appId, userId,\n    text,\n    category:    { name, kind },\n    importance:  1..5,\n    confidence:  0.0..1.0,\n    validFrom, validTo,                  // ISO instants; validTo null = current\n    status:      \"ACTIVE\" | \"ARCHIVED\" | \"DELETED\",\n    sourceConversationId,\n    sourceMessageIds: [ ... ],\n    entityIds:        [ ... ],\n    createdAt, updatedAt\n}\n",[9634],{"type":15,"tag":57,"props":9635,"children":9636},{"__ignoreMap":7},[9637,9644,9652,9660,9673,9695,9733,9746,9787,9795,9816,9837,9845],{"type":15,"tag":460,"props":9638,"children":9639},{"class":462,"line":463},[9640],{"type":15,"tag":460,"props":9641,"children":9642},{"style":507},[9643],{"type":21,"value":5342},{"type":15,"tag":460,"props":9645,"children":9646},{"class":462,"line":473},[9647],{"type":15,"tag":460,"props":9648,"children":9649},{"style":507},[9650],{"type":21,"value":9651},"    id, memorySpaceId, tenantId, appId, userId,\n",{"type":15,"tag":460,"props":9653,"children":9654},{"class":462,"line":482},[9655],{"type":15,"tag":460,"props":9656,"children":9657},{"style":507},[9658],{"type":21,"value":9659},"    text,\n",{"type":15,"tag":460,"props":9661,"children":9662},{"class":462,"line":491},[9663,9668],{"type":15,"tag":460,"props":9664,"children":9665},{"style":501},[9666],{"type":21,"value":9667},"    category",{"type":15,"tag":460,"props":9669,"children":9670},{"style":507},[9671],{"type":21,"value":9672},":    { name, kind },\n",{"type":15,"tag":460,"props":9674,"children":9675},{"class":462,"line":524},[9676,9681,9686,9691],{"type":15,"tag":460,"props":9677,"children":9678},{"style":501},[9679],{"type":21,"value":9680},"    importance",{"type":15,"tag":460,"props":9682,"children":9683},{"style":507},[9684],{"type":21,"value":9685},":  ",{"type":15,"tag":460,"props":9687,"children":9688},{"style":872},[9689],{"type":21,"value":9690},"1..5",{"type":15,"tag":460,"props":9692,"children":9693},{"style":507},[9694],{"type":21,"value":809},{"type":15,"tag":460,"props":9696,"children":9697},{"class":462,"line":558},[9698,9703,9707,9712,9716,9721,9725,9729],{"type":15,"tag":460,"props":9699,"children":9700},{"style":501},[9701],{"type":21,"value":9702},"    confidence",{"type":15,"tag":460,"props":9704,"children":9705},{"style":507},[9706],{"type":21,"value":9685},{"type":15,"tag":460,"props":9708,"children":9709},{"style":872},[9710],{"type":21,"value":9711},"0.0",{"type":15,"tag":460,"props":9713,"children":9714},{"style":507},[9715],{"type":21,"value":2476},{"type":15,"tag":460,"props":9717,"children":9718},{"style":872},[9719],{"type":21,"value":9720},".1",{"type":15,"tag":460,"props":9722,"children":9723},{"style":507},[9724],{"type":21,"value":2476},{"type":15,"tag":460,"props":9726,"children":9727},{"style":872},[9728],{"type":21,"value":875},{"type":15,"tag":460,"props":9730,"children":9731},{"style":507},[9732],{"type":21,"value":809},{"type":15,"tag":460,"props":9734,"children":9735},{"class":462,"line":588},[9736,9741],{"type":15,"tag":460,"props":9737,"children":9738},{"style":507},[9739],{"type":21,"value":9740},"    validFrom, validTo,                  ",{"type":15,"tag":460,"props":9742,"children":9743},{"style":467},[9744],{"type":21,"value":9745},"// ISO instants; validTo null = current\n",{"type":15,"tag":460,"props":9747,"children":9748},{"class":462,"line":618},[9749,9754,9759,9764,9769,9774,9778,9783],{"type":15,"tag":460,"props":9750,"children":9751},{"style":501},[9752],{"type":21,"value":9753},"    status",{"type":15,"tag":460,"props":9755,"children":9756},{"style":507},[9757],{"type":21,"value":9758},":      ",{"type":15,"tag":460,"props":9760,"children":9761},{"style":714},[9762],{"type":21,"value":9763},"\"ACTIVE\"",{"type":15,"tag":460,"props":9765,"children":9766},{"style":495},[9767],{"type":21,"value":9768}," |",{"type":15,"tag":460,"props":9770,"children":9771},{"style":714},[9772],{"type":21,"value":9773}," \"ARCHIVED\"",{"type":15,"tag":460,"props":9775,"children":9776},{"style":495},[9777],{"type":21,"value":9768},{"type":15,"tag":460,"props":9779,"children":9780},{"style":714},[9781],{"type":21,"value":9782}," \"DELETED\"",{"type":15,"tag":460,"props":9784,"children":9785},{"style":507},[9786],{"type":21,"value":809},{"type":15,"tag":460,"props":9788,"children":9789},{"class":462,"line":628},[9790],{"type":15,"tag":460,"props":9791,"children":9792},{"style":507},[9793],{"type":21,"value":9794},"    sourceConversationId,\n",{"type":15,"tag":460,"props":9796,"children":9797},{"class":462,"line":637},[9798,9803,9808,9812],{"type":15,"tag":460,"props":9799,"children":9800},{"style":501},[9801],{"type":21,"value":9802},"    sourceMessageIds",{"type":15,"tag":460,"props":9804,"children":9805},{"style":507},[9806],{"type":21,"value":9807},": [ ",{"type":15,"tag":460,"props":9809,"children":9810},{"style":495},[9811],{"type":21,"value":5634},{"type":15,"tag":460,"props":9813,"children":9814},{"style":507},[9815],{"type":21,"value":2394},{"type":15,"tag":460,"props":9817,"children":9818},{"class":462,"line":695},[9819,9824,9829,9833],{"type":15,"tag":460,"props":9820,"children":9821},{"style":501},[9822],{"type":21,"value":9823},"    entityIds",{"type":15,"tag":460,"props":9825,"children":9826},{"style":507},[9827],{"type":21,"value":9828},":        [ ",{"type":15,"tag":460,"props":9830,"children":9831},{"style":495},[9832],{"type":21,"value":5634},{"type":15,"tag":460,"props":9834,"children":9835},{"style":507},[9836],{"type":21,"value":2394},{"type":15,"tag":460,"props":9838,"children":9839},{"class":462,"line":744},[9840],{"type":15,"tag":460,"props":9841,"children":9842},{"style":507},[9843],{"type":21,"value":9844},"    createdAt, updatedAt\n",{"type":15,"tag":460,"props":9846,"children":9847},{"class":462,"line":753},[9848],{"type":15,"tag":460,"props":9849,"children":9850},{"style":507},[9851],{"type":21,"value":1684},{"type":15,"tag":24,"props":9853,"children":9854},{},[9855,9860],{"type":15,"tag":44,"props":9856,"children":9857},{},[9858],{"type":21,"value":9859},"Entity",{"type":21,"value":4531},{"type":15,"tag":348,"props":9862,"children":9864},{"code":9863,"language":453,"meta":7,"className":454,"style":7},"{\n    id, memorySpaceId, tenantId, appId, userId,\n    type:           \"PERSON\" | \"ORGANIZATION\" | ...,\n    canonicalName,  description,\n    aliases:        [ ... ],\n    status:         \"ACTIVE\" | \"MERGED\",\n    firstSeenAt, lastSeenAt, atomCount,\n    createdAt, updatedAt\n}\n",[9865],{"type":15,"tag":57,"props":9866,"children":9867},{"__ignoreMap":7},[9868,9875,9882,9922,9930,9950,9979,9987,9994],{"type":15,"tag":460,"props":9869,"children":9870},{"class":462,"line":463},[9871],{"type":15,"tag":460,"props":9872,"children":9873},{"style":507},[9874],{"type":21,"value":5342},{"type":15,"tag":460,"props":9876,"children":9877},{"class":462,"line":473},[9878],{"type":15,"tag":460,"props":9879,"children":9880},{"style":507},[9881],{"type":21,"value":9651},{"type":15,"tag":460,"props":9883,"children":9884},{"class":462,"line":482},[9885,9890,9895,9900,9904,9909,9913,9918],{"type":15,"tag":460,"props":9886,"children":9887},{"style":501},[9888],{"type":21,"value":9889},"    type",{"type":15,"tag":460,"props":9891,"children":9892},{"style":507},[9893],{"type":21,"value":9894},":           ",{"type":15,"tag":460,"props":9896,"children":9897},{"style":714},[9898],{"type":21,"value":9899},"\"PERSON\"",{"type":15,"tag":460,"props":9901,"children":9902},{"style":495},[9903],{"type":21,"value":9768},{"type":15,"tag":460,"props":9905,"children":9906},{"style":714},[9907],{"type":21,"value":9908}," \"ORGANIZATION\"",{"type":15,"tag":460,"props":9910,"children":9911},{"style":495},[9912],{"type":21,"value":9768},{"type":15,"tag":460,"props":9914,"children":9915},{"style":495},[9916],{"type":21,"value":9917}," ...",{"type":15,"tag":460,"props":9919,"children":9920},{"style":507},[9921],{"type":21,"value":809},{"type":15,"tag":460,"props":9923,"children":9924},{"class":462,"line":491},[9925],{"type":15,"tag":460,"props":9926,"children":9927},{"style":507},[9928],{"type":21,"value":9929},"    canonicalName,  description,\n",{"type":15,"tag":460,"props":9931,"children":9932},{"class":462,"line":524},[9933,9938,9942,9946],{"type":15,"tag":460,"props":9934,"children":9935},{"style":501},[9936],{"type":21,"value":9937},"    aliases",{"type":15,"tag":460,"props":9939,"children":9940},{"style":507},[9941],{"type":21,"value":9828},{"type":15,"tag":460,"props":9943,"children":9944},{"style":495},[9945],{"type":21,"value":5634},{"type":15,"tag":460,"props":9947,"children":9948},{"style":507},[9949],{"type":21,"value":2394},{"type":15,"tag":460,"props":9951,"children":9952},{"class":462,"line":558},[9953,9957,9962,9966,9970,9975],{"type":15,"tag":460,"props":9954,"children":9955},{"style":501},[9956],{"type":21,"value":9753},{"type":15,"tag":460,"props":9958,"children":9959},{"style":507},[9960],{"type":21,"value":9961},":         ",{"type":15,"tag":460,"props":9963,"children":9964},{"style":714},[9965],{"type":21,"value":9763},{"type":15,"tag":460,"props":9967,"children":9968},{"style":495},[9969],{"type":21,"value":9768},{"type":15,"tag":460,"props":9971,"children":9972},{"style":714},[9973],{"type":21,"value":9974}," \"MERGED\"",{"type":15,"tag":460,"props":9976,"children":9977},{"style":507},[9978],{"type":21,"value":809},{"type":15,"tag":460,"props":9980,"children":9981},{"class":462,"line":588},[9982],{"type":15,"tag":460,"props":9983,"children":9984},{"style":507},[9985],{"type":21,"value":9986},"    firstSeenAt, lastSeenAt, atomCount,\n",{"type":15,"tag":460,"props":9988,"children":9989},{"class":462,"line":618},[9990],{"type":15,"tag":460,"props":9991,"children":9992},{"style":507},[9993],{"type":21,"value":9844},{"type":15,"tag":460,"props":9995,"children":9996},{"class":462,"line":628},[9997],{"type":15,"tag":460,"props":9998,"children":9999},{"style":507},[10000],{"type":21,"value":1684},{"type":15,"tag":24,"props":10002,"children":10003},{},[10004,10009],{"type":15,"tag":44,"props":10005,"children":10006},{},[10007],{"type":21,"value":10008},"Binding",{"type":21,"value":4531},{"type":15,"tag":348,"props":10011,"children":10013},{"code":10012,"language":453,"meta":7,"className":454,"style":7},"{\n    id, tenantId,\n    conversationScope: { namespace, userId },   // or array of these\n    memorySpaceIds:    [ ... ],\n    extractionPolicy:  {\n        extractionVersion:    \"v1\",\n        onConversationClosed: true,\n        windowed:             false,\n        windowTurns:          0\n    },\n    enabled: true,\n    createdAt, updatedAt\n}\n",[10014],{"type":15,"tag":57,"props":10015,"children":10016},{"__ignoreMap":7},[10017,10024,10032,10050,10071,10084,10105,10125,10146,10163,10170,10190,10197],{"type":15,"tag":460,"props":10018,"children":10019},{"class":462,"line":463},[10020],{"type":15,"tag":460,"props":10021,"children":10022},{"style":507},[10023],{"type":21,"value":5342},{"type":15,"tag":460,"props":10025,"children":10026},{"class":462,"line":473},[10027],{"type":15,"tag":460,"props":10028,"children":10029},{"style":507},[10030],{"type":21,"value":10031},"    id, tenantId,\n",{"type":15,"tag":460,"props":10033,"children":10034},{"class":462,"line":482},[10035,10040,10045],{"type":15,"tag":460,"props":10036,"children":10037},{"style":501},[10038],{"type":21,"value":10039},"    conversationScope",{"type":15,"tag":460,"props":10041,"children":10042},{"style":507},[10043],{"type":21,"value":10044},": { namespace, userId },   ",{"type":15,"tag":460,"props":10046,"children":10047},{"style":467},[10048],{"type":21,"value":10049},"// or array of these\n",{"type":15,"tag":460,"props":10051,"children":10052},{"class":462,"line":491},[10053,10058,10063,10067],{"type":15,"tag":460,"props":10054,"children":10055},{"style":501},[10056],{"type":21,"value":10057},"    memorySpaceIds",{"type":15,"tag":460,"props":10059,"children":10060},{"style":507},[10061],{"type":21,"value":10062},":    [ ",{"type":15,"tag":460,"props":10064,"children":10065},{"style":495},[10066],{"type":21,"value":5634},{"type":15,"tag":460,"props":10068,"children":10069},{"style":507},[10070],{"type":21,"value":2394},{"type":15,"tag":460,"props":10072,"children":10073},{"class":462,"line":524},[10074,10079],{"type":15,"tag":460,"props":10075,"children":10076},{"style":501},[10077],{"type":21,"value":10078},"    extractionPolicy",{"type":15,"tag":460,"props":10080,"children":10081},{"style":507},[10082],{"type":21,"value":10083},":  {\n",{"type":15,"tag":460,"props":10085,"children":10086},{"class":462,"line":558},[10087,10092,10097,10101],{"type":15,"tag":460,"props":10088,"children":10089},{"style":501},[10090],{"type":21,"value":10091},"        extractionVersion",{"type":15,"tag":460,"props":10093,"children":10094},{"style":507},[10095],{"type":21,"value":10096},":    ",{"type":15,"tag":460,"props":10098,"children":10099},{"style":714},[10100],{"type":21,"value":4296},{"type":15,"tag":460,"props":10102,"children":10103},{"style":507},[10104],{"type":21,"value":809},{"type":15,"tag":460,"props":10106,"children":10107},{"class":462,"line":588},[10108,10113,10117,10121],{"type":15,"tag":460,"props":10109,"children":10110},{"style":501},[10111],{"type":21,"value":10112},"        onConversationClosed",{"type":15,"tag":460,"props":10114,"children":10115},{"style":507},[10116],{"type":21,"value":2407},{"type":15,"tag":460,"props":10118,"children":10119},{"style":872},[10120],{"type":21,"value":4319},{"type":15,"tag":460,"props":10122,"children":10123},{"style":507},[10124],{"type":21,"value":809},{"type":15,"tag":460,"props":10126,"children":10127},{"class":462,"line":618},[10128,10133,10138,10142],{"type":15,"tag":460,"props":10129,"children":10130},{"style":501},[10131],{"type":21,"value":10132},"        windowed",{"type":15,"tag":460,"props":10134,"children":10135},{"style":507},[10136],{"type":21,"value":10137},":             ",{"type":15,"tag":460,"props":10139,"children":10140},{"style":872},[10141],{"type":21,"value":4341},{"type":15,"tag":460,"props":10143,"children":10144},{"style":507},[10145],{"type":21,"value":809},{"type":15,"tag":460,"props":10147,"children":10148},{"class":462,"line":628},[10149,10154,10159],{"type":15,"tag":460,"props":10150,"children":10151},{"style":501},[10152],{"type":21,"value":10153},"        windowTurns",{"type":15,"tag":460,"props":10155,"children":10156},{"style":507},[10157],{"type":21,"value":10158},":          ",{"type":15,"tag":460,"props":10160,"children":10161},{"style":872},[10162],{"type":21,"value":4364},{"type":15,"tag":460,"props":10164,"children":10165},{"class":462,"line":637},[10166],{"type":15,"tag":460,"props":10167,"children":10168},{"style":507},[10169],{"type":21,"value":2717},{"type":15,"tag":460,"props":10171,"children":10172},{"class":462,"line":695},[10173,10178,10182,10186],{"type":15,"tag":460,"props":10174,"children":10175},{"style":501},[10176],{"type":21,"value":10177},"    enabled",{"type":15,"tag":460,"props":10179,"children":10180},{"style":507},[10181],{"type":21,"value":2407},{"type":15,"tag":460,"props":10183,"children":10184},{"style":872},[10185],{"type":21,"value":4319},{"type":15,"tag":460,"props":10187,"children":10188},{"style":507},[10189],{"type":21,"value":809},{"type":15,"tag":460,"props":10191,"children":10192},{"class":462,"line":744},[10193],{"type":15,"tag":460,"props":10194,"children":10195},{"style":507},[10196],{"type":21,"value":9844},{"type":15,"tag":460,"props":10198,"children":10199},{"class":462,"line":753},[10200],{"type":15,"tag":460,"props":10201,"children":10202},{"style":507},[10203],{"type":21,"value":1684},{"type":15,"tag":24,"props":10205,"children":10206},{},[10207,10212],{"type":15,"tag":44,"props":10208,"children":10209},{},[10210],{"type":21,"value":10211},"Recall hit",{"type":21,"value":4531},{"type":15,"tag":348,"props":10214,"children":10216},{"code":10215,"language":453,"meta":7,"className":454,"style":7},"{\n    atom:             { …atom shape… },\n    score:            0.0..1.0,           // post-fusion ranking\n    decayWeight:      0.0..1.0,           // multiplier applied\n    entityMatchBonus: 1.0..2.0\n}\n",[10217],{"type":15,"tag":57,"props":10218,"children":10219},{"__ignoreMap":7},[10220,10227,10240,10280,10321,10354],{"type":15,"tag":460,"props":10221,"children":10222},{"class":462,"line":463},[10223],{"type":15,"tag":460,"props":10224,"children":10225},{"style":507},[10226],{"type":21,"value":5342},{"type":15,"tag":460,"props":10228,"children":10229},{"class":462,"line":473},[10230,10235],{"type":15,"tag":460,"props":10231,"children":10232},{"style":501},[10233],{"type":21,"value":10234},"    atom",{"type":15,"tag":460,"props":10236,"children":10237},{"style":507},[10238],{"type":21,"value":10239},":             { …atom shape… },\n",{"type":15,"tag":460,"props":10241,"children":10242},{"class":462,"line":482},[10243,10248,10252,10256,10260,10264,10268,10272,10276],{"type":15,"tag":460,"props":10244,"children":10245},{"style":501},[10246],{"type":21,"value":10247},"    score",{"type":15,"tag":460,"props":10249,"children":10250},{"style":507},[10251],{"type":21,"value":5355},{"type":15,"tag":460,"props":10253,"children":10254},{"style":872},[10255],{"type":21,"value":9711},{"type":15,"tag":460,"props":10257,"children":10258},{"style":507},[10259],{"type":21,"value":2476},{"type":15,"tag":460,"props":10261,"children":10262},{"style":872},[10263],{"type":21,"value":9720},{"type":15,"tag":460,"props":10265,"children":10266},{"style":507},[10267],{"type":21,"value":2476},{"type":15,"tag":460,"props":10269,"children":10270},{"style":872},[10271],{"type":21,"value":875},{"type":15,"tag":460,"props":10273,"children":10274},{"style":507},[10275],{"type":21,"value":5391},{"type":15,"tag":460,"props":10277,"children":10278},{"style":467},[10279],{"type":21,"value":5670},{"type":15,"tag":460,"props":10281,"children":10282},{"class":462,"line":491},[10283,10288,10292,10296,10300,10304,10308,10312,10316],{"type":15,"tag":460,"props":10284,"children":10285},{"style":501},[10286],{"type":21,"value":10287},"    decayWeight",{"type":15,"tag":460,"props":10289,"children":10290},{"style":507},[10291],{"type":21,"value":9758},{"type":15,"tag":460,"props":10293,"children":10294},{"style":872},[10295],{"type":21,"value":9711},{"type":15,"tag":460,"props":10297,"children":10298},{"style":507},[10299],{"type":21,"value":2476},{"type":15,"tag":460,"props":10301,"children":10302},{"style":872},[10303],{"type":21,"value":9720},{"type":15,"tag":460,"props":10305,"children":10306},{"style":507},[10307],{"type":21,"value":2476},{"type":15,"tag":460,"props":10309,"children":10310},{"style":872},[10311],{"type":21,"value":875},{"type":15,"tag":460,"props":10313,"children":10314},{"style":507},[10315],{"type":21,"value":5391},{"type":15,"tag":460,"props":10317,"children":10318},{"style":467},[10319],{"type":21,"value":10320},"// multiplier applied\n",{"type":15,"tag":460,"props":10322,"children":10323},{"class":462,"line":524},[10324,10329,10333,10337,10341,10346,10350],{"type":15,"tag":460,"props":10325,"children":10326},{"style":501},[10327],{"type":21,"value":10328},"    entityMatchBonus",{"type":15,"tag":460,"props":10330,"children":10331},{"style":507},[10332],{"type":21,"value":2407},{"type":15,"tag":460,"props":10334,"children":10335},{"style":872},[10336],{"type":21,"value":5683},{"type":15,"tag":460,"props":10338,"children":10339},{"style":507},[10340],{"type":21,"value":2476},{"type":15,"tag":460,"props":10342,"children":10343},{"style":872},[10344],{"type":21,"value":10345},".2",{"type":15,"tag":460,"props":10347,"children":10348},{"style":507},[10349],{"type":21,"value":2476},{"type":15,"tag":460,"props":10351,"children":10352},{"style":872},[10353],{"type":21,"value":4364},{"type":15,"tag":460,"props":10355,"children":10356},{"class":462,"line":558},[10357],{"type":15,"tag":460,"props":10358,"children":10359},{"style":507},[10360],{"type":21,"value":1684},{"type":15,"tag":1799,"props":10362,"children":10364},{"id":10363},"variable-binding-in-agent-json",[10365],{"type":21,"value":10366},"Variable Binding In Agent JSON",{"type":15,"tag":24,"props":10368,"children":10369},{},[10370],{"type":21,"value":10371},"When configuring tools or agents that need per-user values sourced from AIStep inputs:",{"type":15,"tag":348,"props":10373,"children":10375},{"code":10374,"language":6354,"meta":7,"className":6355,"style":7},"{\n  \"memorySpaceId\": \"$userMemorySpaceId\"\n}\n",[10376],{"type":15,"tag":57,"props":10377,"children":10378},{"__ignoreMap":7},[10379,10386,10401],{"type":15,"tag":460,"props":10380,"children":10381},{"class":462,"line":463},[10382],{"type":15,"tag":460,"props":10383,"children":10384},{"style":507},[10385],{"type":21,"value":5342},{"type":15,"tag":460,"props":10387,"children":10388},{"class":462,"line":473},[10389,10393,10397],{"type":15,"tag":460,"props":10390,"children":10391},{"style":872},[10392],{"type":21,"value":6727},{"type":15,"tag":460,"props":10394,"children":10395},{"style":507},[10396],{"type":21,"value":2407},{"type":15,"tag":460,"props":10398,"children":10399},{"style":714},[10400],{"type":21,"value":6444},{"type":15,"tag":460,"props":10402,"children":10403},{"class":462,"line":482},[10404],{"type":15,"tag":460,"props":10405,"children":10406},{"style":507},[10407],{"type":21,"value":1684},{"type":15,"tag":24,"props":10409,"children":10410},{},[10411,10412,10418,10420,10425],{"type":21,"value":3285},{"type":15,"tag":57,"props":10413,"children":10415},{"className":10414},[],[10416],{"type":21,"value":10417},"$paramName",{"type":21,"value":10419}," prefix tells the platform to read the value from the AIStep's input map at runtime. Drop the ",{"type":15,"tag":57,"props":10421,"children":10423},{"className":10422},[],[10424],{"type":21,"value":6662},{"type":21,"value":10426}," for literal values that are the same for every user. Then invoke with the variable bound:",{"type":15,"tag":348,"props":10428,"children":10430},{"code":10429,"language":453,"meta":7,"className":454,"style":7},"context.getAIFunctions().invokeAgent(\"agentName\", {\n    arguments: {\n        userMemorySpaceId: someResolvedSpaceId\n        // ... other agent inputs\n    }\n});\n",[10431],{"type":15,"tag":57,"props":10432,"children":10433},{"__ignoreMap":7},[10434,10466,10473,10481,10489,10496],{"type":15,"tag":460,"props":10435,"children":10436},{"class":462,"line":463},[10437,10441,10445,10449,10453,10457,10462],{"type":15,"tag":460,"props":10438,"children":10439},{"style":507},[10440],{"type":21,"value":3513},{"type":15,"tag":460,"props":10442,"children":10443},{"style":501},[10444],{"type":21,"value":6581},{"type":15,"tag":460,"props":10446,"children":10447},{"style":507},[10448],{"type":21,"value":851},{"type":15,"tag":460,"props":10450,"children":10451},{"style":501},[10452],{"type":21,"value":6590},{"type":15,"tag":460,"props":10454,"children":10455},{"style":507},[10456],{"type":21,"value":510},{"type":15,"tag":460,"props":10458,"children":10459},{"style":714},[10460],{"type":21,"value":10461},"\"agentName\"",{"type":15,"tag":460,"props":10463,"children":10464},{"style":507},[10465],{"type":21,"value":6604},{"type":15,"tag":460,"props":10467,"children":10468},{"class":462,"line":473},[10469],{"type":15,"tag":460,"props":10470,"children":10471},{"style":507},[10472],{"type":21,"value":6612},{"type":15,"tag":460,"props":10474,"children":10475},{"class":462,"line":482},[10476],{"type":15,"tag":460,"props":10477,"children":10478},{"style":507},[10479],{"type":21,"value":10480},"        userMemorySpaceId: someResolvedSpaceId\n",{"type":15,"tag":460,"props":10482,"children":10483},{"class":462,"line":491},[10484],{"type":15,"tag":460,"props":10485,"children":10486},{"style":467},[10487],{"type":21,"value":10488},"        // ... other agent inputs\n",{"type":15,"tag":460,"props":10490,"children":10491},{"class":462,"line":524},[10492],{"type":15,"tag":460,"props":10493,"children":10494},{"style":507},[10495],{"type":21,"value":1074},{"type":15,"tag":460,"props":10497,"children":10498},{"class":462,"line":558},[10499],{"type":15,"tag":460,"props":10500,"children":10501},{"style":507},[10502],{"type":21,"value":2124},{"type":15,"tag":66,"props":10504,"children":10506},{"id":10505},"next-steps",[10507],{"type":21,"value":10508},"Next Steps",{"type":15,"tag":78,"props":10510,"children":10511},{},[10512,10528,10539],{"type":15,"tag":82,"props":10513,"children":10514},{},[10515,10519,10521,10526],{"type":15,"tag":30,"props":10516,"children":10517},{"href":32},[10518],{"type":21,"value":35},{"type":21,"value":10520}," — build and invoke the agents that ",{"type":15,"tag":3047,"props":10522,"children":10523},{},[10524],{"type":21,"value":10525},"use",{"type":21,"value":10527}," this memory",{"type":15,"tag":82,"props":10529,"children":10530},{},[10531,10537],{"type":15,"tag":30,"props":10532,"children":10534},{"href":10533},"/guides/rules-and-actions",[10535],{"type":21,"value":10536},"Rules and Actions",{"type":21,"value":10538}," — schedule a job that closes stale conversations to trigger extraction",{"type":15,"tag":82,"props":10540,"children":10541},{},[10542,10548],{"type":15,"tag":30,"props":10543,"children":10545},{"href":10544},"/guides/security",[10546],{"type":21,"value":10547},"Security",{"type":21,"value":10549}," — understand the tenant + user isolation that backs every memory call",{"type":15,"tag":10551,"props":10552,"children":10553},"style",{},[10554],{"type":21,"value":10555},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":7,"searchDepth":473,"depth":473,"links":10557},[10558,10559,10560,10561,10562,10569,10576,10583,10592,10597,10598,10599,10606,10615,10623],{"id":68,"depth":473,"text":71},{"id":139,"depth":473,"text":142},{"id":338,"depth":473,"text":341},{"id":417,"depth":473,"text":420},{"id":1775,"depth":473,"text":198,"children":10563},[10564,10565,10566,10567,10568],{"id":1801,"depth":482,"text":1804},{"id":1945,"depth":482,"text":1948},{"id":2280,"depth":482,"text":2283},{"id":2754,"depth":482,"text":2757},{"id":2874,"depth":482,"text":2877},{"id":3006,"depth":473,"text":3009,"children":10570},[10571,10572,10574,10575],{"id":3017,"depth":482,"text":3020},{"id":3265,"depth":482,"text":10573},"Categories — A (name, kind) Tuple",{"id":3626,"depth":482,"text":3629},{"id":3814,"depth":482,"text":3817},{"id":4081,"depth":473,"text":4084,"children":10577},[10578,10579,10580,10581,10582],{"id":4108,"depth":482,"text":4111},{"id":4402,"depth":482,"text":4405},{"id":4503,"depth":482,"text":4506},{"id":4729,"depth":482,"text":4732},{"id":4774,"depth":482,"text":4777},{"id":4842,"depth":473,"text":4845,"children":10584},[10585,10587,10589,10591],{"id":4853,"depth":482,"text":10586},"recallByTopic — Semantic Search",{"id":5018,"depth":482,"text":10588},"recallByEntity — Everything About X",{"id":5171,"depth":482,"text":10590},"recallTimeline — What Was True At Time T",{"id":5319,"depth":482,"text":5322},{"id":5749,"depth":473,"text":5752,"children":10593},[10594,10595,10596],{"id":6010,"depth":482,"text":6013},{"id":6041,"depth":482,"text":6044},{"id":6229,"depth":482,"text":6232},{"id":6243,"depth":473,"text":6246},{"id":6762,"depth":473,"text":6765},{"id":7292,"depth":473,"text":7295,"children":10600},[10601,10602,10603,10604,10605],{"id":7298,"depth":482,"text":7301},{"id":7587,"depth":482,"text":7590},{"id":7629,"depth":482,"text":7632},{"id":7776,"depth":482,"text":7779},{"id":7968,"depth":482,"text":7971},{"id":8160,"depth":473,"text":8163,"children":10607},[10608,10609,10610,10611,10612,10614],{"id":8166,"depth":482,"text":8169},{"id":8206,"depth":482,"text":8209},{"id":8224,"depth":482,"text":8227},{"id":8261,"depth":482,"text":8264},{"id":8286,"depth":482,"text":10613},"Bumping extractionVersion Doesn't Auto-Replay",{"id":8311,"depth":482,"text":8314},{"id":8333,"depth":473,"text":8336,"children":10616},[10617,10618,10619,10620,10621,10622],{"id":8344,"depth":482,"text":207},{"id":8685,"depth":482,"text":232},{"id":9195,"depth":482,"text":257},{"id":9254,"depth":482,"text":282},{"id":9339,"depth":482,"text":9342},{"id":10363,"depth":482,"text":10366},{"id":10505,"depth":473,"text":10508},"markdown","content:guides:ai-memory.md","guides/ai-memory.md","guides/ai-memory","md",1779461877376]