[{"data":1,"prerenderedAt":1908},["ShallowReactive",2],{"docs-navigation":3,"docs-page-\u002Fdocs\u002Fget-started\u002Ffirst-result":280,"docs-surround-\u002Fdocs\u002Fget-started\u002Ffirst-result":1905},[4],{"title":5,"path":6,"stem":7,"children":8,"page":279},"Docs","\u002Fdocs","docs",[9,56,125,225,260],{"title":10,"path":11,"stem":12,"children":13},"GET STARTED","\u002Fdocs\u002Fget-started","docs\u002F1.get-started\u002F1.index",[14,16,20,24,28,32,36,40,44,48,52],{"title":15,"path":11,"stem":12},"Start here",{"title":17,"path":18,"stem":19},"Security evaluation pack","\u002Fdocs\u002Fget-started\u002Fsecurity-evaluation","docs\u002F1.get-started\u002F10.security-evaluation",{"title":21,"path":22,"stem":23},"Evaluation costs and plan boundaries","\u002Fdocs\u002Fget-started\u002Fevaluation-costs","docs\u002F1.get-started\u002F11.evaluation-costs",{"title":25,"path":26,"stem":27},"Quickstart","\u002Fdocs\u002Fget-started\u002Fquickstart","docs\u002F1.get-started\u002F2.quickstart",{"title":29,"path":30,"stem":31},"API","\u002Fdocs\u002Fget-started\u002Fapi","docs\u002F1.get-started\u002F3.api",{"title":33,"path":34,"stem":35},"SDKs and CLI","\u002Fdocs\u002Fget-started\u002Fsdks-cli","docs\u002F1.get-started\u002F4.sdks-cli",{"title":37,"path":38,"stem":39},"Sandbox testing","\u002Fdocs\u002Fget-started\u002Flocal-development","docs\u002F1.get-started\u002F5.local-development",{"title":41,"path":42,"stem":43},"Authentication","\u002Fdocs\u002Fget-started\u002Fauthentication","docs\u002F1.get-started\u002F6.authentication",{"title":45,"path":46,"stem":47},"Complete language examples","\u002Fdocs\u002Fget-started\u002Ffirst-result","docs\u002F1.get-started\u002F7.first-result",{"title":49,"path":50,"stem":51},"Evaluate against your current stack","\u002Fdocs\u002Fget-started\u002Fevaluate","docs\u002F1.get-started\u002F8.evaluate",{"title":53,"path":54,"stem":55},"HTTP automation and framework wiring","\u002Fdocs\u002Fget-started\u002Fautomation","docs\u002F1.get-started\u002F9.automation",{"title":57,"path":58,"stem":59,"children":60},"FUNDAMENTALS","\u002Fdocs\u002Ffundamentals","docs\u002F2.fundamentals\u002F01.index",[61,63,67,71,75,79,83,87,91,95,99],{"title":62,"path":58,"stem":59},"Fundamentals",{"title":64,"path":65,"stem":66},"Architecture","\u002Fdocs\u002Ffundamentals\u002Farchitecture","docs\u002F2.fundamentals\u002F02.architecture",{"title":68,"path":69,"stem":70},"Memory model","\u002Fdocs\u002Ffundamentals\u002Fmemory-model","docs\u002F2.fundamentals\u002F03.memory-model",{"title":72,"path":73,"stem":74},"Compression","\u002Fdocs\u002Ffundamentals\u002Fcompression","docs\u002F2.fundamentals\u002F04.compression",{"title":76,"path":77,"stem":78},"RAG and cached context","\u002Fdocs\u002Ffundamentals\u002Frag-cag","docs\u002F2.fundamentals\u002F05.rag-cag",{"title":80,"path":81,"stem":82},"Context cache","\u002Fdocs\u002Ffundamentals\u002Fcontext-cache","docs\u002F2.fundamentals\u002F06.context-cache",{"title":84,"path":85,"stem":86},"Security","\u002Fdocs\u002Ffundamentals\u002Fsecurity","docs\u002F2.fundamentals\u002F07.security",{"title":88,"path":89,"stem":90},"Languages","\u002Fdocs\u002Ffundamentals\u002Flanguages","docs\u002F2.fundamentals\u002F08.languages",{"title":92,"path":93,"stem":94},"Knowledge and decision intelligence","\u002Fdocs\u002Ffundamentals\u002Fknowledge-decision-intelligence","docs\u002F2.fundamentals\u002F09.knowledge-decision-intelligence",{"title":96,"path":97,"stem":98},"UI patterns","\u002Fdocs\u002Ffundamentals\u002Fui","docs\u002F2.fundamentals\u002F09.ui",{"title":100,"path":101,"stem":102,"children":103},"Global, Regional, and Jurisdictional Memory","\u002Fdocs\u002Ffundamentals\u002Fdata-placement","docs\u002F2.fundamentals\u002F10.data-placement\u002F1.index",[104,105,109,113,117,121],{"title":100,"path":101,"stem":102},{"title":106,"path":107,"stem":108},"TypeScript \u002F JavaScript","\u002Fdocs\u002Ffundamentals\u002Fdata-placement\u002Ftypescript","docs\u002F2.fundamentals\u002F10.data-placement\u002F2.typescript",{"title":110,"path":111,"stem":112},"Python","\u002Fdocs\u002Ffundamentals\u002Fdata-placement\u002Fpython","docs\u002F2.fundamentals\u002F10.data-placement\u002F3.python",{"title":114,"path":115,"stem":116},"PHP","\u002Fdocs\u002Ffundamentals\u002Fdata-placement\u002Fphp","docs\u002F2.fundamentals\u002F10.data-placement\u002F4.php",{"title":118,"path":119,"stem":120},"Go","\u002Fdocs\u002Ffundamentals\u002Fdata-placement\u002Fgo","docs\u002F2.fundamentals\u002F10.data-placement\u002F5.go",{"title":122,"path":123,"stem":124},"Rust","\u002Fdocs\u002Ffundamentals\u002Fdata-placement\u002Frust","docs\u002F2.fundamentals\u002F10.data-placement\u002F6.rust",{"title":126,"path":127,"stem":128,"children":129},"AGENTS & CODE NUCLEI","\u002Fdocs\u002Fagents","docs\u002F3.agents\u002F01.index",[130,132,136,140,144,148,152,156,160,164,182,221],{"title":131,"path":127,"stem":128},"Agents",{"title":133,"path":134,"stem":135},"Codex Code Nucleus","\u002Fdocs\u002Fagents\u002Fcodex-code-nucleus","docs\u002F3.agents\u002F02.codex-code-nucleus",{"title":137,"path":138,"stem":139},"Claude Code Nucleus","\u002Fdocs\u002Fagents\u002Fclaude-code-nucleus","docs\u002F3.agents\u002F03.claude-code-nucleus",{"title":141,"path":142,"stem":143},"Google Gemini Code Nucleus","\u002Fdocs\u002Fagents\u002Fgoogle-gemini-code-nucleus","docs\u002F3.agents\u002F04.google-gemini-code-nucleus",{"title":145,"path":146,"stem":147},"GitHub Copilot Code Nucleus","\u002Fdocs\u002Fagents\u002Fgithub-copilot-code-nucleus","docs\u002F3.agents\u002F05.github-copilot-code-nucleus",{"title":149,"path":150,"stem":151},"Cursor Code Nucleus","\u002Fdocs\u002Fagents\u002Fcursor-code-nucleus","docs\u002F3.agents\u002F06.cursor-code-nucleus",{"title":153,"path":154,"stem":155},"Windsurf Code Nucleus","\u002Fdocs\u002Fagents\u002Fwindsurf-code-nucleus","docs\u002F3.agents\u002F07.windsurf-code-nucleus",{"title":157,"path":158,"stem":159},"Agent skills","\u002Fdocs\u002Fagents\u002Fagent-skills","docs\u002F3.agents\u002F08.agent-skills",{"title":161,"path":162,"stem":163},"Admin UI prompt","\u002Fdocs\u002Fagents\u002Fadmin-ui-prompt","docs\u002F3.agents\u002F09.admin-ui-prompt",{"title":165,"path":166,"stem":167,"children":168},"Team Code Governance","\u002Fdocs\u002Fagents\u002Fcode-governance","docs\u002F3.agents\u002F10.code-governance\u002F1.index",[169,170,174,178],{"title":165,"path":166,"stem":167},{"title":171,"path":172,"stem":173},"Local Team Setup","\u002Fdocs\u002Fagents\u002Fcode-governance\u002Flocal-team-setup","docs\u002F3.agents\u002F10.code-governance\u002F2.local-team-setup",{"title":175,"path":176,"stem":177},"Language Governance Packs","\u002Fdocs\u002Fagents\u002Fcode-governance\u002Flanguage-packs","docs\u002F3.agents\u002F10.code-governance\u002F3.language-packs",{"title":179,"path":180,"stem":181},"GitHub CI\u002FCD Governance","\u002Fdocs\u002Fagents\u002Fcode-governance\u002Fgithub-cicd","docs\u002F3.agents\u002F10.code-governance\u002F4.github-cicd",{"title":183,"path":184,"stem":185,"children":186},"Memory + Consequence Agents","\u002Fdocs\u002Fagents\u002Fmemory-consequence-agents","docs\u002F3.agents\u002F11.memory-consequence-agents\u002F1.index",[187,188,209,213,217],{"title":183,"path":184,"stem":185},{"title":189,"path":190,"stem":191,"children":192},"End-to-End Agent Example","\u002Fdocs\u002Fagents\u002Fmemory-consequence-agents\u002Fend-to-end","docs\u002F3.agents\u002F11.memory-consequence-agents\u002F2.end-to-end\u002F1.index",[193,194,197,200,203,206],{"title":189,"path":190,"stem":191},{"title":106,"path":195,"stem":196},"\u002Fdocs\u002Fagents\u002Fmemory-consequence-agents\u002Fend-to-end\u002Ftypescript","docs\u002F3.agents\u002F11.memory-consequence-agents\u002F2.end-to-end\u002F2.typescript",{"title":110,"path":198,"stem":199},"\u002Fdocs\u002Fagents\u002Fmemory-consequence-agents\u002Fend-to-end\u002Fpython","docs\u002F3.agents\u002F11.memory-consequence-agents\u002F2.end-to-end\u002F3.python",{"title":114,"path":201,"stem":202},"\u002Fdocs\u002Fagents\u002Fmemory-consequence-agents\u002Fend-to-end\u002Fphp","docs\u002F3.agents\u002F11.memory-consequence-agents\u002F2.end-to-end\u002F4.php",{"title":118,"path":204,"stem":205},"\u002Fdocs\u002Fagents\u002Fmemory-consequence-agents\u002Fend-to-end\u002Fgo","docs\u002F3.agents\u002F11.memory-consequence-agents\u002F2.end-to-end\u002F5.go",{"title":122,"path":207,"stem":208},"\u002Fdocs\u002Fagents\u002Fmemory-consequence-agents\u002Fend-to-end\u002Frust","docs\u002F3.agents\u002F11.memory-consequence-agents\u002F2.end-to-end\u002F6.rust",{"title":210,"path":211,"stem":212},"Industry Agent Use Cases","\u002Fdocs\u002Fagents\u002Fmemory-consequence-agents\u002Findustry-use-cases","docs\u002F3.agents\u002F11.memory-consequence-agents\u002F3.industry-use-cases",{"title":214,"path":215,"stem":216},"Historical Actions and Learning","\u002Fdocs\u002Fagents\u002Fmemory-consequence-agents\u002Fhistorical-learning","docs\u002F3.agents\u002F11.memory-consequence-agents\u002F4.historical-learning",{"title":218,"path":219,"stem":220},"Free support-escalation evaluation","\u002Fdocs\u002Fagents\u002Fmemory-consequence-agents\u002Ffree-evaluation","docs\u002F3.agents\u002F11.memory-consequence-agents\u002F5.free-evaluation",{"title":222,"path":223,"stem":224},"Consequence decision support","\u002Fdocs\u002Fagents\u002Fconsequence","docs\u002F3.agents\u002F12.consequence",{"title":226,"path":227,"stem":228,"children":229},"MODEL PROVIDERS","\u002Fdocs\u002Fproviders","docs\u002F4.providers\u002F1.index",[230,232,236,240,244,248,252,256],{"title":231,"path":227,"stem":228},"Providers",{"title":233,"path":234,"stem":235},"OpenAI and Azure OpenAI","\u002Fdocs\u002Fproviders\u002Fopenai","docs\u002F4.providers\u002F2.openai",{"title":237,"path":238,"stem":239},"Anthropic Claude","\u002Fdocs\u002Fproviders\u002Fanthropic","docs\u002F4.providers\u002F3.anthropic",{"title":241,"path":242,"stem":243},"Google Gemini and Vertex AI","\u002Fdocs\u002Fproviders\u002Fgoogle-gemini","docs\u002F4.providers\u002F4.google-gemini",{"title":245,"path":246,"stem":247},"OpenAI-compatible providers","\u002Fdocs\u002Fproviders\u002Fopenai-compatible","docs\u002F4.providers\u002F5.openai-compatible",{"title":249,"path":250,"stem":251},"Groq","\u002Fdocs\u002Fproviders\u002Fgroq","docs\u002F4.providers\u002F6.groq",{"title":253,"path":254,"stem":255},"Cohere","\u002Fdocs\u002Fproviders\u002Fcohere","docs\u002F4.providers\u002F7.cohere",{"title":257,"path":258,"stem":259},"Amazon Bedrock","\u002Fdocs\u002Fproviders\u002Famazon-bedrock","docs\u002F4.providers\u002F8.amazon-bedrock",{"title":261,"path":262,"stem":263,"children":264},"CHANGELOG","\u002Fdocs\u002Fchangelog","docs\u002F5.changelog\u002F1.index",[265,267,271,275],{"title":266,"path":262,"stem":263},"Changelog",{"title":268,"path":269,"stem":270},"Roadmap","\u002Fdocs\u002Fchangelog\u002Froadmap","docs\u002F5.changelog\u002F2.roadmap",{"title":272,"path":273,"stem":274},"Release notes","\u002Fdocs\u002Fchangelog\u002Frelease-runbook","docs\u002F5.changelog\u002F3.release-runbook",{"title":276,"path":277,"stem":278},"Testing","\u002Fdocs\u002Fchangelog\u002Ftesting","docs\u002F5.changelog\u002F4.testing",false,{"id":281,"title":45,"body":282,"description":1900,"extension":1901,"meta":1902,"navigation":1225,"path":46,"seo":1903,"stem":47,"__hash__":1904},"docs\u002Fdocs\u002F1.get-started\u002F7.first-result.md",{"type":283,"value":284,"toc":1892},"minimark",[285,290,312,323,330,334,344,1193,1196,1205,1334,1338,1348,1491,1494,1508,1688,1691,1706,1757,1875,1879,1882,1888],[286,287,289],"h1",{"id":288},"run-one-complete-workflow-in-your-language","Run one complete workflow in your language",[291,292,293,294,298,299,303,304,307,308,311],"p",{},"Carry a synthetic preference into a later task using the backend you already have. Complete the ",[295,296,297],"a",{"href":26},"account and Nucleus setup",", then export ",[300,301,302],"code",{},"NEUTRON_API_TOKEN",", ",[300,305,306],{},"NEUTRON_NUCLEUS_ID"," and ",[300,309,310],{},"NEUTRON_SCOPE_ID"," in that server environment. Use only a disposable evaluation Scope. These examples call public REST directly; they do not require an unpublished Neutron SDK package.",[291,313,314,315,318,319,322],{},"Each example remembers an invented preference, requests bounded context and finally tombstones its own memory. Expect an accepted memory, a ",[300,316,317],{},"promptContext"," containing the preference and a confirmed tombstone. This is two billable memory requests plus one unbilled forget request. The example does not call your application model provider. To verify separate requested Scopes, positive recall and post-delete absence, use the ",[295,320,321],{"href":50},"repeatable evaluation",".",[291,324,325,326,329],{},"Keep tokens server-side. Your application must authorise the Nucleus and Scope before invoking these calls. A client-selected Scope is not an end-user permission check. Never print or store raw credentials in logs. Follow ",[295,327,328],{"href":54},"framework wiring"," for LangChain, LangGraph, Laravel and Vercel boundaries.",[331,332,106],"h2",{"id":333},"typescript-javascript",[291,335,336,337,340,341,322],{},"Save as ",[300,338,339],{},"first-result.mjs","; Node.js 22.18+ runs the same JavaScript from a TypeScript backend. Run ",[300,342,343],{},"node first-result.mjs",[345,346,351],"pre",{"className":347,"code":348,"language":349,"meta":350,"style":350},"language-js shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { randomUUID } from \"node:crypto\";\nconst { NEUTRON_API_TOKEN: token, NEUTRON_NUCLEUS_ID: nucleusId, NEUTRON_SCOPE_ID: scopeId } = process.env;\nif (!token || !nucleusId || !scopeId) throw new Error(\"Set the three NEUTRON environment variables\");\nconst post = async (route, body) => {\n  const response = await fetch(`https:\u002F\u002Fneutronai.dev\u002Fapi\u002Fv1\u002Fmemory\u002F${route}`, {\n    method: \"POST\", headers: { authorization: `Bearer ${token}`, \"content-type\": \"application\u002Fjson\" },\n    body: JSON.stringify({ nucleusId, ...body }), signal: AbortSignal.timeout(15000), redirect: \"error\",\n  });\n  if (!response.ok) throw new Error(`${route}: HTTP ${response.status}`);\n  return response.json();\n};\nconst memory = await post(\"remember\", { scopeId, type: \"preference\", text: `Aster ${randomUUID()} prefers weekly support email.`, privacyClass: \"tenant\" });\ntry {\n  if (!memory.accepted || !memory.memoryId) throw new Error(\"Remember not accepted\");\n  const pack = await post(\"agent-context\", { scopeIds: [scopeId], task: \"Find the support email preference\", include: [\"preferences\"], privacyClasses: [\"tenant\"], tokenBudget: 400 });\n  console.log(pack.promptContext);\n} finally {\n  const result = await post(\"forget\", { scopeId, memoryId: memory.memoryId, reason: \"evaluation_cleanup\" });\n  if (!result.tombstoned) throw new Error(\"Confirm cleanup in your evaluation Scope\");\n}\n","js","",[300,352,353,389,445,501,534,571,634,709,719,773,791,797,888,896,946,1052,1076,1086,1149,1187],{"__ignoreMap":350},[354,355,358,362,366,370,373,376,379,383,386],"span",{"class":356,"line":357},"line",1,[354,359,361],{"class":360},"s7zQu","import",[354,363,365],{"class":364},"sMK4o"," {",[354,367,369],{"class":368},"sTEyZ"," randomUUID",[354,371,372],{"class":364}," }",[354,374,375],{"class":360}," from",[354,377,378],{"class":364}," \"",[354,380,382],{"class":381},"sfazB","node:crypto",[354,384,385],{"class":364},"\"",[354,387,388],{"class":364},";\n",[354,390,392,396,398,402,405,408,411,414,416,419,421,424,426,429,432,435,438,440,443],{"class":356,"line":391},2,[354,393,395],{"class":394},"spNyl","const",[354,397,365],{"class":364},[354,399,401],{"class":400},"swJcz"," NEUTRON_API_TOKEN",[354,403,404],{"class":364},":",[354,406,407],{"class":368}," token",[354,409,410],{"class":364},",",[354,412,413],{"class":400}," NEUTRON_NUCLEUS_ID",[354,415,404],{"class":364},[354,417,418],{"class":368}," nucleusId",[354,420,410],{"class":364},[354,422,423],{"class":400}," NEUTRON_SCOPE_ID",[354,425,404],{"class":364},[354,427,428],{"class":368}," scopeId ",[354,430,431],{"class":364},"}",[354,433,434],{"class":364}," =",[354,436,437],{"class":368}," process",[354,439,322],{"class":364},[354,441,442],{"class":368},"env",[354,444,388],{"class":364},[354,446,448,451,454,457,460,463,466,469,471,473,476,479,482,486,489,491,494,496,499],{"class":356,"line":447},3,[354,449,450],{"class":360},"if",[354,452,453],{"class":368}," (",[354,455,456],{"class":364},"!",[354,458,459],{"class":368},"token ",[354,461,462],{"class":364},"||",[354,464,465],{"class":364}," !",[354,467,468],{"class":368},"nucleusId ",[354,470,462],{"class":364},[354,472,465],{"class":364},[354,474,475],{"class":368},"scopeId) ",[354,477,478],{"class":360},"throw",[354,480,481],{"class":364}," new",[354,483,485],{"class":484},"s2Zo4"," Error",[354,487,488],{"class":368},"(",[354,490,385],{"class":364},[354,492,493],{"class":381},"Set the three NEUTRON environment variables",[354,495,385],{"class":364},[354,497,498],{"class":368},")",[354,500,388],{"class":364},[354,502,504,506,509,512,515,517,521,523,526,528,531],{"class":356,"line":503},4,[354,505,395],{"class":394},[354,507,508],{"class":368}," post ",[354,510,511],{"class":364},"=",[354,513,514],{"class":394}," async",[354,516,453],{"class":364},[354,518,520],{"class":519},"sHdIc","route",[354,522,410],{"class":364},[354,524,525],{"class":519}," body",[354,527,498],{"class":364},[354,529,530],{"class":394}," =>",[354,532,533],{"class":364}," {\n",[354,535,537,540,543,545,548,551,553,556,559,562,564,567,569],{"class":356,"line":536},5,[354,538,539],{"class":394},"  const",[354,541,542],{"class":368}," response",[354,544,434],{"class":364},[354,546,547],{"class":360}," await",[354,549,550],{"class":484}," fetch",[354,552,488],{"class":400},[354,554,555],{"class":364},"`",[354,557,558],{"class":381},"https:\u002F\u002Fneutronai.dev\u002Fapi\u002Fv1\u002Fmemory\u002F",[354,560,561],{"class":364},"${",[354,563,520],{"class":368},[354,565,566],{"class":364},"}`",[354,568,410],{"class":364},[354,570,533],{"class":364},[354,572,574,577,579,581,584,586,588,591,593,595,598,600,603,606,608,611,613,615,617,620,622,624,626,629,631],{"class":356,"line":573},6,[354,575,576],{"class":400},"    method",[354,578,404],{"class":364},[354,580,378],{"class":364},[354,582,583],{"class":381},"POST",[354,585,385],{"class":364},[354,587,410],{"class":364},[354,589,590],{"class":400}," headers",[354,592,404],{"class":364},[354,594,365],{"class":364},[354,596,597],{"class":400}," authorization",[354,599,404],{"class":364},[354,601,602],{"class":364}," `",[354,604,605],{"class":381},"Bearer ",[354,607,561],{"class":364},[354,609,610],{"class":368},"token",[354,612,566],{"class":364},[354,614,410],{"class":364},[354,616,378],{"class":364},[354,618,619],{"class":400},"content-type",[354,621,385],{"class":364},[354,623,404],{"class":364},[354,625,378],{"class":364},[354,627,628],{"class":381},"application\u002Fjson",[354,630,385],{"class":364},[354,632,633],{"class":364}," },\n",[354,635,637,640,642,645,647,650,652,655,657,659,662,665,667,669,671,674,676,679,681,684,686,690,692,694,697,699,701,704,706],{"class":356,"line":636},7,[354,638,639],{"class":400},"    body",[354,641,404],{"class":364},[354,643,644],{"class":368}," JSON",[354,646,322],{"class":364},[354,648,649],{"class":484},"stringify",[354,651,488],{"class":400},[354,653,654],{"class":364},"{",[354,656,418],{"class":368},[354,658,410],{"class":364},[354,660,661],{"class":364}," ...",[354,663,664],{"class":368},"body",[354,666,372],{"class":364},[354,668,498],{"class":400},[354,670,410],{"class":364},[354,672,673],{"class":400}," signal",[354,675,404],{"class":364},[354,677,678],{"class":368}," AbortSignal",[354,680,322],{"class":364},[354,682,683],{"class":484},"timeout",[354,685,488],{"class":400},[354,687,689],{"class":688},"sbssI","15000",[354,691,498],{"class":400},[354,693,410],{"class":364},[354,695,696],{"class":400}," redirect",[354,698,404],{"class":364},[354,700,378],{"class":364},[354,702,703],{"class":381},"error",[354,705,385],{"class":364},[354,707,708],{"class":364},",\n",[354,710,712,715,717],{"class":356,"line":711},8,[354,713,714],{"class":364},"  }",[354,716,498],{"class":400},[354,718,388],{"class":364},[354,720,722,725,727,729,732,734,737,740,742,744,746,748,751,753,755,758,760,762,764,767,769,771],{"class":356,"line":721},9,[354,723,724],{"class":360},"  if",[354,726,453],{"class":400},[354,728,456],{"class":364},[354,730,731],{"class":368},"response",[354,733,322],{"class":364},[354,735,736],{"class":368},"ok",[354,738,739],{"class":400},") ",[354,741,478],{"class":360},[354,743,481],{"class":364},[354,745,485],{"class":484},[354,747,488],{"class":400},[354,749,750],{"class":364},"`${",[354,752,520],{"class":368},[354,754,431],{"class":364},[354,756,757],{"class":381},": HTTP ",[354,759,561],{"class":364},[354,761,731],{"class":368},[354,763,322],{"class":364},[354,765,766],{"class":368},"status",[354,768,566],{"class":364},[354,770,498],{"class":400},[354,772,388],{"class":364},[354,774,776,779,781,783,786,789],{"class":356,"line":775},10,[354,777,778],{"class":360},"  return",[354,780,542],{"class":368},[354,782,322],{"class":364},[354,784,785],{"class":484},"json",[354,787,788],{"class":400},"()",[354,790,388],{"class":364},[354,792,794],{"class":356,"line":793},11,[354,795,796],{"class":364},"};\n",[354,798,800,802,805,807,809,812,814,816,819,821,823,825,828,830,833,835,837,840,842,844,847,849,851,854,856,859,861,863,866,868,870,873,875,877,880,882,884,886],{"class":356,"line":799},12,[354,801,395],{"class":394},[354,803,804],{"class":368}," memory ",[354,806,511],{"class":364},[354,808,547],{"class":360},[354,810,811],{"class":484}," post",[354,813,488],{"class":368},[354,815,385],{"class":364},[354,817,818],{"class":381},"remember",[354,820,385],{"class":364},[354,822,410],{"class":364},[354,824,365],{"class":364},[354,826,827],{"class":368}," scopeId",[354,829,410],{"class":364},[354,831,832],{"class":400}," type",[354,834,404],{"class":364},[354,836,378],{"class":364},[354,838,839],{"class":381},"preference",[354,841,385],{"class":364},[354,843,410],{"class":364},[354,845,846],{"class":400}," text",[354,848,404],{"class":364},[354,850,602],{"class":364},[354,852,853],{"class":381},"Aster ",[354,855,561],{"class":364},[354,857,858],{"class":484},"randomUUID",[354,860,788],{"class":368},[354,862,431],{"class":364},[354,864,865],{"class":381}," prefers weekly support email.",[354,867,555],{"class":364},[354,869,410],{"class":364},[354,871,872],{"class":400}," privacyClass",[354,874,404],{"class":364},[354,876,378],{"class":364},[354,878,879],{"class":381},"tenant",[354,881,385],{"class":364},[354,883,372],{"class":364},[354,885,498],{"class":368},[354,887,388],{"class":364},[354,889,891,894],{"class":356,"line":890},13,[354,892,893],{"class":360},"try",[354,895,533],{"class":364},[354,897,899,901,903,905,908,910,913,916,918,920,922,925,927,929,931,933,935,937,940,942,944],{"class":356,"line":898},14,[354,900,724],{"class":360},[354,902,453],{"class":400},[354,904,456],{"class":364},[354,906,907],{"class":368},"memory",[354,909,322],{"class":364},[354,911,912],{"class":368},"accepted",[354,914,915],{"class":364}," ||",[354,917,465],{"class":364},[354,919,907],{"class":368},[354,921,322],{"class":364},[354,923,924],{"class":368},"memoryId",[354,926,739],{"class":400},[354,928,478],{"class":360},[354,930,481],{"class":364},[354,932,485],{"class":484},[354,934,488],{"class":400},[354,936,385],{"class":364},[354,938,939],{"class":381},"Remember not accepted",[354,941,385],{"class":364},[354,943,498],{"class":400},[354,945,388],{"class":364},[354,947,949,951,954,956,958,960,962,964,967,969,971,973,976,978,981,984,987,989,992,994,996,999,1001,1003,1006,1008,1010,1012,1015,1017,1019,1021,1024,1026,1028,1030,1032,1034,1036,1038,1041,1043,1046,1048,1050],{"class":356,"line":948},15,[354,950,539],{"class":394},[354,952,953],{"class":368}," pack",[354,955,434],{"class":364},[354,957,547],{"class":360},[354,959,811],{"class":484},[354,961,488],{"class":400},[354,963,385],{"class":364},[354,965,966],{"class":381},"agent-context",[354,968,385],{"class":364},[354,970,410],{"class":364},[354,972,365],{"class":364},[354,974,975],{"class":400}," scopeIds",[354,977,404],{"class":364},[354,979,980],{"class":400}," [",[354,982,983],{"class":368},"scopeId",[354,985,986],{"class":400},"]",[354,988,410],{"class":364},[354,990,991],{"class":400}," task",[354,993,404],{"class":364},[354,995,378],{"class":364},[354,997,998],{"class":381},"Find the support email preference",[354,1000,385],{"class":364},[354,1002,410],{"class":364},[354,1004,1005],{"class":400}," include",[354,1007,404],{"class":364},[354,1009,980],{"class":400},[354,1011,385],{"class":364},[354,1013,1014],{"class":381},"preferences",[354,1016,385],{"class":364},[354,1018,986],{"class":400},[354,1020,410],{"class":364},[354,1022,1023],{"class":400}," privacyClasses",[354,1025,404],{"class":364},[354,1027,980],{"class":400},[354,1029,385],{"class":364},[354,1031,879],{"class":381},[354,1033,385],{"class":364},[354,1035,986],{"class":400},[354,1037,410],{"class":364},[354,1039,1040],{"class":400}," tokenBudget",[354,1042,404],{"class":364},[354,1044,1045],{"class":688}," 400",[354,1047,372],{"class":364},[354,1049,498],{"class":400},[354,1051,388],{"class":364},[354,1053,1055,1058,1060,1063,1065,1068,1070,1072,1074],{"class":356,"line":1054},16,[354,1056,1057],{"class":368},"  console",[354,1059,322],{"class":364},[354,1061,1062],{"class":484},"log",[354,1064,488],{"class":400},[354,1066,1067],{"class":368},"pack",[354,1069,322],{"class":364},[354,1071,317],{"class":368},[354,1073,498],{"class":400},[354,1075,388],{"class":364},[354,1077,1079,1081,1084],{"class":356,"line":1078},17,[354,1080,431],{"class":364},[354,1082,1083],{"class":360}," finally",[354,1085,533],{"class":364},[354,1087,1089,1091,1094,1096,1098,1100,1102,1104,1107,1109,1111,1113,1115,1117,1120,1122,1125,1127,1129,1131,1134,1136,1138,1141,1143,1145,1147],{"class":356,"line":1088},18,[354,1090,539],{"class":394},[354,1092,1093],{"class":368}," result",[354,1095,434],{"class":364},[354,1097,547],{"class":360},[354,1099,811],{"class":484},[354,1101,488],{"class":400},[354,1103,385],{"class":364},[354,1105,1106],{"class":381},"forget",[354,1108,385],{"class":364},[354,1110,410],{"class":364},[354,1112,365],{"class":364},[354,1114,827],{"class":368},[354,1116,410],{"class":364},[354,1118,1119],{"class":400}," memoryId",[354,1121,404],{"class":364},[354,1123,1124],{"class":368}," memory",[354,1126,322],{"class":364},[354,1128,924],{"class":368},[354,1130,410],{"class":364},[354,1132,1133],{"class":400}," reason",[354,1135,404],{"class":364},[354,1137,378],{"class":364},[354,1139,1140],{"class":381},"evaluation_cleanup",[354,1142,385],{"class":364},[354,1144,372],{"class":364},[354,1146,498],{"class":400},[354,1148,388],{"class":364},[354,1150,1152,1154,1156,1158,1161,1163,1166,1168,1170,1172,1174,1176,1178,1181,1183,1185],{"class":356,"line":1151},19,[354,1153,724],{"class":360},[354,1155,453],{"class":400},[354,1157,456],{"class":364},[354,1159,1160],{"class":368},"result",[354,1162,322],{"class":364},[354,1164,1165],{"class":368},"tombstoned",[354,1167,739],{"class":400},[354,1169,478],{"class":360},[354,1171,481],{"class":364},[354,1173,485],{"class":484},[354,1175,488],{"class":400},[354,1177,385],{"class":364},[354,1179,1180],{"class":381},"Confirm cleanup in your evaluation Scope",[354,1182,385],{"class":364},[354,1184,498],{"class":400},[354,1186,388],{"class":364},[354,1188,1190],{"class":356,"line":1189},20,[354,1191,1192],{"class":364},"}\n",[331,1194,110],{"id":1195},"python",[291,1197,336,1198,1201,1202,322],{},[300,1199,1200],{},"first_result.py","; Python 3.10+ uses only its standard library. Run ",[300,1203,1204],{},"python3 first_result.py",[345,1206,1209],{"className":1207,"code":1208,"language":1195,"meta":350,"style":350},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import json, os, uuid\nfrom urllib.request import Request, urlopen\n\ntoken = os.environ[\"NEUTRON_API_TOKEN\"]\nnucleus = os.environ[\"NEUTRON_NUCLEUS_ID\"]\nscope = os.environ[\"NEUTRON_SCOPE_ID\"]\n\ndef post(route, body):\n    payload = json.dumps({\"nucleusId\": nucleus, **body}).encode()\n    request = Request(\"https:\u002F\u002Fneutronai.dev\u002Fapi\u002Fv1\u002Fmemory\u002F\" + route, data=payload,\n                      headers={\"Authorization\": \"Bearer \" + token, \"Content-Type\": \"application\u002Fjson\"}, method=\"POST\")\n    with urlopen(request, timeout=15) as response:\n        return json.load(response)\n\nmemory = post(\"remember\", {\"scopeId\": scope, \"type\": \"preference\", \"text\": f\"Aster {uuid.uuid4()} prefers weekly support email.\", \"privacyClass\": \"tenant\"})\ntry:\n    if not memory.get(\"accepted\") or not memory.get(\"memoryId\"):\n        raise RuntimeError(\"Remember not accepted\")\n    pack = post(\"agent-context\", {\"scopeIds\": [scope], \"task\": \"Find the support email preference\", \"include\": [\"preferences\"], \"privacyClasses\": [\"tenant\"], \"tokenBudget\": 400})\n    print(pack[\"promptContext\"])\nfinally:\n    result = post(\"forget\", {\"scopeId\": scope, \"memoryId\": memory[\"memoryId\"], \"reason\": \"evaluation_cleanup\"})\n    if not result.get(\"tombstoned\"):\n        raise RuntimeError(\"Confirm cleanup in your evaluation Scope\")\n",[300,1210,1211,1216,1221,1227,1232,1237,1242,1246,1251,1256,1261,1266,1271,1276,1280,1285,1290,1295,1300,1305,1310,1316,1322,1328],{"__ignoreMap":350},[354,1212,1213],{"class":356,"line":357},[354,1214,1215],{},"import json, os, uuid\n",[354,1217,1218],{"class":356,"line":391},[354,1219,1220],{},"from urllib.request import Request, urlopen\n",[354,1222,1223],{"class":356,"line":447},[354,1224,1226],{"emptyLinePlaceholder":1225},true,"\n",[354,1228,1229],{"class":356,"line":503},[354,1230,1231],{},"token = os.environ[\"NEUTRON_API_TOKEN\"]\n",[354,1233,1234],{"class":356,"line":536},[354,1235,1236],{},"nucleus = os.environ[\"NEUTRON_NUCLEUS_ID\"]\n",[354,1238,1239],{"class":356,"line":573},[354,1240,1241],{},"scope = os.environ[\"NEUTRON_SCOPE_ID\"]\n",[354,1243,1244],{"class":356,"line":636},[354,1245,1226],{"emptyLinePlaceholder":1225},[354,1247,1248],{"class":356,"line":711},[354,1249,1250],{},"def post(route, body):\n",[354,1252,1253],{"class":356,"line":721},[354,1254,1255],{},"    payload = json.dumps({\"nucleusId\": nucleus, **body}).encode()\n",[354,1257,1258],{"class":356,"line":775},[354,1259,1260],{},"    request = Request(\"https:\u002F\u002Fneutronai.dev\u002Fapi\u002Fv1\u002Fmemory\u002F\" + route, data=payload,\n",[354,1262,1263],{"class":356,"line":793},[354,1264,1265],{},"                      headers={\"Authorization\": \"Bearer \" + token, \"Content-Type\": \"application\u002Fjson\"}, method=\"POST\")\n",[354,1267,1268],{"class":356,"line":799},[354,1269,1270],{},"    with urlopen(request, timeout=15) as response:\n",[354,1272,1273],{"class":356,"line":890},[354,1274,1275],{},"        return json.load(response)\n",[354,1277,1278],{"class":356,"line":898},[354,1279,1226],{"emptyLinePlaceholder":1225},[354,1281,1282],{"class":356,"line":948},[354,1283,1284],{},"memory = post(\"remember\", {\"scopeId\": scope, \"type\": \"preference\", \"text\": f\"Aster {uuid.uuid4()} prefers weekly support email.\", \"privacyClass\": \"tenant\"})\n",[354,1286,1287],{"class":356,"line":1054},[354,1288,1289],{},"try:\n",[354,1291,1292],{"class":356,"line":1078},[354,1293,1294],{},"    if not memory.get(\"accepted\") or not memory.get(\"memoryId\"):\n",[354,1296,1297],{"class":356,"line":1088},[354,1298,1299],{},"        raise RuntimeError(\"Remember not accepted\")\n",[354,1301,1302],{"class":356,"line":1151},[354,1303,1304],{},"    pack = post(\"agent-context\", {\"scopeIds\": [scope], \"task\": \"Find the support email preference\", \"include\": [\"preferences\"], \"privacyClasses\": [\"tenant\"], \"tokenBudget\": 400})\n",[354,1306,1307],{"class":356,"line":1189},[354,1308,1309],{},"    print(pack[\"promptContext\"])\n",[354,1311,1313],{"class":356,"line":1312},21,[354,1314,1315],{},"finally:\n",[354,1317,1319],{"class":356,"line":1318},22,[354,1320,1321],{},"    result = post(\"forget\", {\"scopeId\": scope, \"memoryId\": memory[\"memoryId\"], \"reason\": \"evaluation_cleanup\"})\n",[354,1323,1325],{"class":356,"line":1324},23,[354,1326,1327],{},"    if not result.get(\"tombstoned\"):\n",[354,1329,1331],{"class":356,"line":1330},24,[354,1332,1333],{},"        raise RuntimeError(\"Confirm cleanup in your evaluation Scope\")\n",[331,1335,1337],{"id":1336},"php-laravel","PHP \u002F Laravel",[291,1339,336,1340,1343,1344,1347],{},[300,1341,1342],{},"first-result.php","; PHP 8.2+ needs the cURL extension. Run ",[300,1345,1346],{},"php first-result.php",", or move the HTTP helper into an authenticated Laravel service.",[345,1349,1353],{"className":1350,"code":1351,"language":1352,"meta":350,"style":350},"language-php shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003C?php\ndeclare(strict_types=1);\n$token = getenv('NEUTRON_API_TOKEN');\n$nucleus = getenv('NEUTRON_NUCLEUS_ID');\n$scope = getenv('NEUTRON_SCOPE_ID');\nif (!$token || !$nucleus || !$scope) throw new RuntimeException('Set the three NEUTRON environment variables');\nfunction post(string $route, array $body): array {\n    global $token, $nucleus;\n    $curl = curl_init('https:\u002F\u002Fneutronai.dev\u002Fapi\u002Fv1\u002Fmemory\u002F' . $route);\n    curl_setopt_array($curl, [CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 15,\n        CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $token, 'Content-Type: application\u002Fjson'],\n        CURLOPT_POSTFIELDS => json_encode(['nucleusId' => $nucleus] + $body, JSON_THROW_ON_ERROR)]);\n    $response = curl_exec($curl);\n    $status = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n    curl_close($curl);\n    if ($response === false || $status \u003C 200 || $status >= 300) throw new RuntimeException($route . ': HTTP ' . $status);\n    return json_decode($response, true, 512, JSON_THROW_ON_ERROR);\n}\n$memory = post('remember', ['scopeId' => $scope, 'type' => 'preference', 'text' => 'Aster ' . bin2hex(random_bytes(8)) . ' prefers weekly support email.', 'privacyClass' => 'tenant']);\ntry {\n    if (empty($memory['accepted']) || empty($memory['memoryId'])) throw new RuntimeException('Remember not accepted');\n    $pack = post('agent-context', ['scopeIds' => [$scope], 'task' => 'Find the support email preference', 'include' => ['preferences'], 'privacyClasses' => ['tenant'], 'tokenBudget' => 400]);\n    echo $pack['promptContext'] . PHP_EOL;\n} finally {\n    $result = post('forget', ['scopeId' => $scope, 'memoryId' => $memory['memoryId'], 'reason' => 'evaluation_cleanup']);\n    if (empty($result['tombstoned'])) throw new RuntimeException('Confirm cleanup in your evaluation Scope');\n}\n","php",[300,1354,1355,1360,1365,1370,1375,1380,1385,1390,1395,1400,1405,1410,1415,1420,1425,1430,1435,1440,1444,1449,1454,1459,1464,1469,1474,1480,1486],{"__ignoreMap":350},[354,1356,1357],{"class":356,"line":357},[354,1358,1359],{},"\u003C?php\n",[354,1361,1362],{"class":356,"line":391},[354,1363,1364],{},"declare(strict_types=1);\n",[354,1366,1367],{"class":356,"line":447},[354,1368,1369],{},"$token = getenv('NEUTRON_API_TOKEN');\n",[354,1371,1372],{"class":356,"line":503},[354,1373,1374],{},"$nucleus = getenv('NEUTRON_NUCLEUS_ID');\n",[354,1376,1377],{"class":356,"line":536},[354,1378,1379],{},"$scope = getenv('NEUTRON_SCOPE_ID');\n",[354,1381,1382],{"class":356,"line":573},[354,1383,1384],{},"if (!$token || !$nucleus || !$scope) throw new RuntimeException('Set the three NEUTRON environment variables');\n",[354,1386,1387],{"class":356,"line":636},[354,1388,1389],{},"function post(string $route, array $body): array {\n",[354,1391,1392],{"class":356,"line":711},[354,1393,1394],{},"    global $token, $nucleus;\n",[354,1396,1397],{"class":356,"line":721},[354,1398,1399],{},"    $curl = curl_init('https:\u002F\u002Fneutronai.dev\u002Fapi\u002Fv1\u002Fmemory\u002F' . $route);\n",[354,1401,1402],{"class":356,"line":775},[354,1403,1404],{},"    curl_setopt_array($curl, [CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 15,\n",[354,1406,1407],{"class":356,"line":793},[354,1408,1409],{},"        CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $token, 'Content-Type: application\u002Fjson'],\n",[354,1411,1412],{"class":356,"line":799},[354,1413,1414],{},"        CURLOPT_POSTFIELDS => json_encode(['nucleusId' => $nucleus] + $body, JSON_THROW_ON_ERROR)]);\n",[354,1416,1417],{"class":356,"line":890},[354,1418,1419],{},"    $response = curl_exec($curl);\n",[354,1421,1422],{"class":356,"line":898},[354,1423,1424],{},"    $status = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n",[354,1426,1427],{"class":356,"line":948},[354,1428,1429],{},"    curl_close($curl);\n",[354,1431,1432],{"class":356,"line":1054},[354,1433,1434],{},"    if ($response === false || $status \u003C 200 || $status >= 300) throw new RuntimeException($route . ': HTTP ' . $status);\n",[354,1436,1437],{"class":356,"line":1078},[354,1438,1439],{},"    return json_decode($response, true, 512, JSON_THROW_ON_ERROR);\n",[354,1441,1442],{"class":356,"line":1088},[354,1443,1192],{},[354,1445,1446],{"class":356,"line":1151},[354,1447,1448],{},"$memory = post('remember', ['scopeId' => $scope, 'type' => 'preference', 'text' => 'Aster ' . bin2hex(random_bytes(8)) . ' prefers weekly support email.', 'privacyClass' => 'tenant']);\n",[354,1450,1451],{"class":356,"line":1189},[354,1452,1453],{},"try {\n",[354,1455,1456],{"class":356,"line":1312},[354,1457,1458],{},"    if (empty($memory['accepted']) || empty($memory['memoryId'])) throw new RuntimeException('Remember not accepted');\n",[354,1460,1461],{"class":356,"line":1318},[354,1462,1463],{},"    $pack = post('agent-context', ['scopeIds' => [$scope], 'task' => 'Find the support email preference', 'include' => ['preferences'], 'privacyClasses' => ['tenant'], 'tokenBudget' => 400]);\n",[354,1465,1466],{"class":356,"line":1324},[354,1467,1468],{},"    echo $pack['promptContext'] . PHP_EOL;\n",[354,1470,1471],{"class":356,"line":1330},[354,1472,1473],{},"} finally {\n",[354,1475,1477],{"class":356,"line":1476},25,[354,1478,1479],{},"    $result = post('forget', ['scopeId' => $scope, 'memoryId' => $memory['memoryId'], 'reason' => 'evaluation_cleanup']);\n",[354,1481,1483],{"class":356,"line":1482},26,[354,1484,1485],{},"    if (empty($result['tombstoned'])) throw new RuntimeException('Confirm cleanup in your evaluation Scope');\n",[354,1487,1489],{"class":356,"line":1488},27,[354,1490,1192],{},[331,1492,118],{"id":1493},"go",[291,1495,336,1496,1499,1500,1503,1504,1507],{},[300,1497,1498],{},"main.go"," in an empty directory, run ",[300,1501,1502],{},"go mod init example.com\u002Fneutron-evaluation",", then ",[300,1505,1506],{},"go run ."," with Go 1.25+. Imports, HTTP timeouts and error handling are included.",[345,1509,1512],{"className":1510,"code":1511,"language":1493,"meta":350,"style":350},"language-go shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","package main\n\nimport (\n    \"bytes\"\n    \"encoding\u002Fjson\"\n    \"fmt\"\n    \"net\u002Fhttp\"\n    \"os\"\n    \"time\"\n)\n\nfunc run() error {\n    token, nucleus, scope := os.Getenv(\"NEUTRON_API_TOKEN\"), os.Getenv(\"NEUTRON_NUCLEUS_ID\"), os.Getenv(\"NEUTRON_SCOPE_ID\")\n    if token == \"\" || nucleus == \"\" || scope == \"\" { return fmt.Errorf(\"set the three NEUTRON environment variables\") }\n    client := &http.Client{Timeout: 15 * time.Second, CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }}\n    post := func(route string, body map[string]any) (map[string]any, error) {\n        body[\"nucleusId\"] = nucleus\n        payload, err := json.Marshal(body); if err != nil { return nil, err }\n        req, err := http.NewRequest(http.MethodPost, \"https:\u002F\u002Fneutronai.dev\u002Fapi\u002Fv1\u002Fmemory\u002F\"+route, bytes.NewReader(payload)); if err != nil { return nil, err }\n        req.Header.Set(\"Authorization\", \"Bearer \"+token); req.Header.Set(\"Content-Type\", \"application\u002Fjson\")\n        response, err := client.Do(req); if err != nil { return nil, err }; defer response.Body.Close()\n        if response.StatusCode \u003C 200 || response.StatusCode >= 300 { return nil, fmt.Errorf(\"%s: HTTP %d\", route, response.StatusCode) }\n        var result map[string]any; err = json.NewDecoder(response.Body).Decode(&result); return result, err\n    }\n    memory, err := post(\"remember\", map[string]any{\"scopeId\": scope, \"type\": \"preference\", \"text\": fmt.Sprintf(\"Aster %d prefers weekly support email.\", time.Now().UnixNano()), \"privacyClass\": \"tenant\"})\n    if err != nil { return err }\n    id, ok := memory[\"memoryId\"].(string); if !ok || memory[\"accepted\"] != true { return fmt.Errorf(\"remember not accepted\") }\n    pack, contextErr := post(\"agent-context\", map[string]any{\"scopeIds\": []string{scope}, \"task\": \"Find the support email preference\", \"include\": []string{\"preferences\"}, \"privacyClasses\": []string{\"tenant\"}, \"tokenBudget\": 400})\n    cleanup, cleanupErr := post(\"forget\", map[string]any{\"scopeId\": scope, \"memoryId\": id, \"reason\": \"evaluation_cleanup\"})\n    if cleanupErr != nil { return cleanupErr }; if cleanup[\"tombstoned\"] != true { return fmt.Errorf(\"confirm cleanup in your evaluation Scope\") }\n    if contextErr != nil { return contextErr }\n    fmt.Println(pack[\"promptContext\"]); return nil\n}\nfunc main() { if err := run(); err != nil { fmt.Fprintln(os.Stderr, err); os.Exit(1) } }\n",[300,1513,1514,1519,1523,1528,1533,1538,1543,1548,1553,1558,1563,1567,1572,1577,1582,1587,1592,1597,1602,1607,1612,1617,1622,1627,1632,1637,1642,1647,1653,1659,1665,1671,1677,1682],{"__ignoreMap":350},[354,1515,1516],{"class":356,"line":357},[354,1517,1518],{},"package main\n",[354,1520,1521],{"class":356,"line":391},[354,1522,1226],{"emptyLinePlaceholder":1225},[354,1524,1525],{"class":356,"line":447},[354,1526,1527],{},"import (\n",[354,1529,1530],{"class":356,"line":503},[354,1531,1532],{},"    \"bytes\"\n",[354,1534,1535],{"class":356,"line":536},[354,1536,1537],{},"    \"encoding\u002Fjson\"\n",[354,1539,1540],{"class":356,"line":573},[354,1541,1542],{},"    \"fmt\"\n",[354,1544,1545],{"class":356,"line":636},[354,1546,1547],{},"    \"net\u002Fhttp\"\n",[354,1549,1550],{"class":356,"line":711},[354,1551,1552],{},"    \"os\"\n",[354,1554,1555],{"class":356,"line":721},[354,1556,1557],{},"    \"time\"\n",[354,1559,1560],{"class":356,"line":775},[354,1561,1562],{},")\n",[354,1564,1565],{"class":356,"line":793},[354,1566,1226],{"emptyLinePlaceholder":1225},[354,1568,1569],{"class":356,"line":799},[354,1570,1571],{},"func run() error {\n",[354,1573,1574],{"class":356,"line":890},[354,1575,1576],{},"    token, nucleus, scope := os.Getenv(\"NEUTRON_API_TOKEN\"), os.Getenv(\"NEUTRON_NUCLEUS_ID\"), os.Getenv(\"NEUTRON_SCOPE_ID\")\n",[354,1578,1579],{"class":356,"line":898},[354,1580,1581],{},"    if token == \"\" || nucleus == \"\" || scope == \"\" { return fmt.Errorf(\"set the three NEUTRON environment variables\") }\n",[354,1583,1584],{"class":356,"line":948},[354,1585,1586],{},"    client := &http.Client{Timeout: 15 * time.Second, CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }}\n",[354,1588,1589],{"class":356,"line":1054},[354,1590,1591],{},"    post := func(route string, body map[string]any) (map[string]any, error) {\n",[354,1593,1594],{"class":356,"line":1078},[354,1595,1596],{},"        body[\"nucleusId\"] = nucleus\n",[354,1598,1599],{"class":356,"line":1088},[354,1600,1601],{},"        payload, err := json.Marshal(body); if err != nil { return nil, err }\n",[354,1603,1604],{"class":356,"line":1151},[354,1605,1606],{},"        req, err := http.NewRequest(http.MethodPost, \"https:\u002F\u002Fneutronai.dev\u002Fapi\u002Fv1\u002Fmemory\u002F\"+route, bytes.NewReader(payload)); if err != nil { return nil, err }\n",[354,1608,1609],{"class":356,"line":1189},[354,1610,1611],{},"        req.Header.Set(\"Authorization\", \"Bearer \"+token); req.Header.Set(\"Content-Type\", \"application\u002Fjson\")\n",[354,1613,1614],{"class":356,"line":1312},[354,1615,1616],{},"        response, err := client.Do(req); if err != nil { return nil, err }; defer response.Body.Close()\n",[354,1618,1619],{"class":356,"line":1318},[354,1620,1621],{},"        if response.StatusCode \u003C 200 || response.StatusCode >= 300 { return nil, fmt.Errorf(\"%s: HTTP %d\", route, response.StatusCode) }\n",[354,1623,1624],{"class":356,"line":1324},[354,1625,1626],{},"        var result map[string]any; err = json.NewDecoder(response.Body).Decode(&result); return result, err\n",[354,1628,1629],{"class":356,"line":1330},[354,1630,1631],{},"    }\n",[354,1633,1634],{"class":356,"line":1476},[354,1635,1636],{},"    memory, err := post(\"remember\", map[string]any{\"scopeId\": scope, \"type\": \"preference\", \"text\": fmt.Sprintf(\"Aster %d prefers weekly support email.\", time.Now().UnixNano()), \"privacyClass\": \"tenant\"})\n",[354,1638,1639],{"class":356,"line":1482},[354,1640,1641],{},"    if err != nil { return err }\n",[354,1643,1644],{"class":356,"line":1488},[354,1645,1646],{},"    id, ok := memory[\"memoryId\"].(string); if !ok || memory[\"accepted\"] != true { return fmt.Errorf(\"remember not accepted\") }\n",[354,1648,1650],{"class":356,"line":1649},28,[354,1651,1652],{},"    pack, contextErr := post(\"agent-context\", map[string]any{\"scopeIds\": []string{scope}, \"task\": \"Find the support email preference\", \"include\": []string{\"preferences\"}, \"privacyClasses\": []string{\"tenant\"}, \"tokenBudget\": 400})\n",[354,1654,1656],{"class":356,"line":1655},29,[354,1657,1658],{},"    cleanup, cleanupErr := post(\"forget\", map[string]any{\"scopeId\": scope, \"memoryId\": id, \"reason\": \"evaluation_cleanup\"})\n",[354,1660,1662],{"class":356,"line":1661},30,[354,1663,1664],{},"    if cleanupErr != nil { return cleanupErr }; if cleanup[\"tombstoned\"] != true { return fmt.Errorf(\"confirm cleanup in your evaluation Scope\") }\n",[354,1666,1668],{"class":356,"line":1667},31,[354,1669,1670],{},"    if contextErr != nil { return contextErr }\n",[354,1672,1674],{"class":356,"line":1673},32,[354,1675,1676],{},"    fmt.Println(pack[\"promptContext\"]); return nil\n",[354,1678,1680],{"class":356,"line":1679},33,[354,1681,1192],{},[354,1683,1685],{"class":356,"line":1684},34,[354,1686,1687],{},"func main() { if err := run(); err != nil { fmt.Fprintln(os.Stderr, err); os.Exit(1) } }\n",[331,1689,122],{"id":1690},"rust",[291,1692,1693,1694,1697,1698,1701,1702,1705],{},"Create a Rust 2024 binary with Rust 1.85+ and this ",[300,1695,1696],{},"Cargo.toml","; put the program in ",[300,1699,1700],{},"src\u002Fmain.rs",", then run ",[300,1703,1704],{},"cargo run",". Only the general HTTP\u002FJSON runtime dependencies below are needed.",[345,1707,1711],{"className":1708,"code":1709,"language":1710,"meta":350,"style":350},"language-toml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","[package]\nname = \"neutron-evaluation\"\nversion = \"0.1.0\"\nedition = \"2024\"\n\n[dependencies]\nreqwest = { version = \"0.13.4\", default-features = false, features = [\"json\", \"rustls\"] }\nserde_json = \"1.0\"\ntokio = { version = \"1.53\", features = [\"macros\", \"rt-multi-thread\"] }\n","toml",[300,1712,1713,1718,1723,1728,1733,1737,1742,1747,1752],{"__ignoreMap":350},[354,1714,1715],{"class":356,"line":357},[354,1716,1717],{},"[package]\n",[354,1719,1720],{"class":356,"line":391},[354,1721,1722],{},"name = \"neutron-evaluation\"\n",[354,1724,1725],{"class":356,"line":447},[354,1726,1727],{},"version = \"0.1.0\"\n",[354,1729,1730],{"class":356,"line":503},[354,1731,1732],{},"edition = \"2024\"\n",[354,1734,1735],{"class":356,"line":536},[354,1736,1226],{"emptyLinePlaceholder":1225},[354,1738,1739],{"class":356,"line":573},[354,1740,1741],{},"[dependencies]\n",[354,1743,1744],{"class":356,"line":636},[354,1745,1746],{},"reqwest = { version = \"0.13.4\", default-features = false, features = [\"json\", \"rustls\"] }\n",[354,1748,1749],{"class":356,"line":711},[354,1750,1751],{},"serde_json = \"1.0\"\n",[354,1753,1754],{"class":356,"line":721},[354,1755,1756],{},"tokio = { version = \"1.53\", features = [\"macros\", \"rt-multi-thread\"] }\n",[345,1758,1761],{"className":1759,"code":1760,"language":1690,"meta":350,"style":350},"language-rust shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","use serde_json::{json, Value};\nuse std::{env, error::Error, time::{Duration, SystemTime, UNIX_EPOCH}};\n\nasync fn post(client: &reqwest::Client, token: &str, nucleus: &str, route: &str, mut body: Value) -> Result\u003CValue, Box\u003Cdyn Error>> {\n    body[\"nucleusId\"] = json!(nucleus);\n    let response = client.post(format!(\"https:\u002F\u002Fneutronai.dev\u002Fapi\u002Fv1\u002Fmemory\u002F{route}\"))\n        .bearer_auth(token).json(&body).send().await?;\n    Ok(response.error_for_status()?.json().await?)\n}\n#[tokio::main]\nasync fn main() -> Result\u003C(), Box\u003Cdyn Error>> {\n    let token = env::var(\"NEUTRON_API_TOKEN\")?;\n    let nucleus = env::var(\"NEUTRON_NUCLEUS_ID\")?;\n    let scope = env::var(\"NEUTRON_SCOPE_ID\")?;\n    let client = reqwest::Client::builder().timeout(Duration::from_secs(15)).redirect(reqwest::redirect::Policy::none()).build()?;\n    let nonce = SystemTime::now().duration_since(UNIX_EPOCH)?.as_nanos();\n    let memory = post(&client, &token, &nucleus, \"remember\", json!({\"scopeId\":scope,\"type\":\"preference\",\"text\":format!(\"Aster {nonce} prefers weekly support email.\"),\"privacyClass\":\"tenant\"})).await?;\n    let id = memory[\"memoryId\"].as_str().ok_or(\"remember returned no memoryId\")?;\n    let context = post(&client, &token, &nucleus, \"agent-context\", json!({\"scopeIds\":[scope],\"task\":\"Find the support email preference\",\"include\":[\"preferences\"],\"privacyClasses\":[\"tenant\"],\"tokenBudget\":400})).await;\n    let cleanup = post(&client, &token, &nucleus, \"forget\", json!({\"scopeId\":scope,\"memoryId\":id,\"reason\":\"evaluation_cleanup\"})).await?;\n    if cleanup[\"tombstoned\"] != true { return Err(\"confirm cleanup in your evaluation Scope\".into()); }\n    println!(\"{}\", context?[\"promptContext\"]); Ok(())\n}\n",[300,1762,1763,1768,1773,1777,1782,1787,1792,1797,1802,1806,1811,1816,1821,1826,1831,1836,1841,1846,1851,1856,1861,1866,1871],{"__ignoreMap":350},[354,1764,1765],{"class":356,"line":357},[354,1766,1767],{},"use serde_json::{json, Value};\n",[354,1769,1770],{"class":356,"line":391},[354,1771,1772],{},"use std::{env, error::Error, time::{Duration, SystemTime, UNIX_EPOCH}};\n",[354,1774,1775],{"class":356,"line":447},[354,1776,1226],{"emptyLinePlaceholder":1225},[354,1778,1779],{"class":356,"line":503},[354,1780,1781],{},"async fn post(client: &reqwest::Client, token: &str, nucleus: &str, route: &str, mut body: Value) -> Result\u003CValue, Box\u003Cdyn Error>> {\n",[354,1783,1784],{"class":356,"line":536},[354,1785,1786],{},"    body[\"nucleusId\"] = json!(nucleus);\n",[354,1788,1789],{"class":356,"line":573},[354,1790,1791],{},"    let response = client.post(format!(\"https:\u002F\u002Fneutronai.dev\u002Fapi\u002Fv1\u002Fmemory\u002F{route}\"))\n",[354,1793,1794],{"class":356,"line":636},[354,1795,1796],{},"        .bearer_auth(token).json(&body).send().await?;\n",[354,1798,1799],{"class":356,"line":711},[354,1800,1801],{},"    Ok(response.error_for_status()?.json().await?)\n",[354,1803,1804],{"class":356,"line":721},[354,1805,1192],{},[354,1807,1808],{"class":356,"line":775},[354,1809,1810],{},"#[tokio::main]\n",[354,1812,1813],{"class":356,"line":793},[354,1814,1815],{},"async fn main() -> Result\u003C(), Box\u003Cdyn Error>> {\n",[354,1817,1818],{"class":356,"line":799},[354,1819,1820],{},"    let token = env::var(\"NEUTRON_API_TOKEN\")?;\n",[354,1822,1823],{"class":356,"line":890},[354,1824,1825],{},"    let nucleus = env::var(\"NEUTRON_NUCLEUS_ID\")?;\n",[354,1827,1828],{"class":356,"line":898},[354,1829,1830],{},"    let scope = env::var(\"NEUTRON_SCOPE_ID\")?;\n",[354,1832,1833],{"class":356,"line":948},[354,1834,1835],{},"    let client = reqwest::Client::builder().timeout(Duration::from_secs(15)).redirect(reqwest::redirect::Policy::none()).build()?;\n",[354,1837,1838],{"class":356,"line":1054},[354,1839,1840],{},"    let nonce = SystemTime::now().duration_since(UNIX_EPOCH)?.as_nanos();\n",[354,1842,1843],{"class":356,"line":1078},[354,1844,1845],{},"    let memory = post(&client, &token, &nucleus, \"remember\", json!({\"scopeId\":scope,\"type\":\"preference\",\"text\":format!(\"Aster {nonce} prefers weekly support email.\"),\"privacyClass\":\"tenant\"})).await?;\n",[354,1847,1848],{"class":356,"line":1088},[354,1849,1850],{},"    let id = memory[\"memoryId\"].as_str().ok_or(\"remember returned no memoryId\")?;\n",[354,1852,1853],{"class":356,"line":1151},[354,1854,1855],{},"    let context = post(&client, &token, &nucleus, \"agent-context\", json!({\"scopeIds\":[scope],\"task\":\"Find the support email preference\",\"include\":[\"preferences\"],\"privacyClasses\":[\"tenant\"],\"tokenBudget\":400})).await;\n",[354,1857,1858],{"class":356,"line":1189},[354,1859,1860],{},"    let cleanup = post(&client, &token, &nucleus, \"forget\", json!({\"scopeId\":scope,\"memoryId\":id,\"reason\":\"evaluation_cleanup\"})).await?;\n",[354,1862,1863],{"class":356,"line":1312},[354,1864,1865],{},"    if cleanup[\"tombstoned\"] != true { return Err(\"confirm cleanup in your evaluation Scope\".into()); }\n",[354,1867,1868],{"class":356,"line":1318},[354,1869,1870],{},"    println!(\"{}\", context?[\"promptContext\"]); Ok(())\n",[354,1872,1873],{"class":356,"line":1324},[354,1874,1192],{},[331,1876,1878],{"id":1877},"check-the-result-and-failure-boundary","Check the result and failure boundary",[291,1880,1881],{},"These fixtures exercise the same remember\u002Fcontext\u002Fforget REST contract. They print synthetic supporting context; do not reuse that logging with private records. A timeout can leave a write accepted without a confirmed response: inspect the evaluation Scope before retrying. Process termination can interrupt cleanup.",[291,1883,1884,1885,322],{},"On 401, verify the full Nucleus token; on 403, check Nucleus ownership and policy; on 402, stop and inspect allowance\u002Fcredit. Keep the same application model and compare observed outcomes before migrating. For multi-language typed clients and newer knowledge\u002Fdecision methods, consult the ",[295,1886,1887],{"href":34},"SDK readiness and parity guidance",[1889,1890,1891],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}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":350,"searchDepth":391,"depth":391,"links":1893},[1894,1895,1896,1897,1898,1899],{"id":333,"depth":391,"text":106},{"id":1195,"depth":391,"text":110},{"id":1336,"depth":391,"text":1337},{"id":1493,"depth":391,"text":118},{"id":1690,"depth":391,"text":122},{"id":1877,"depth":391,"text":1878},"Run a complete server-side REST memory workflow in TypeScript or JavaScript, Python, PHP, Go and Rust.","md",{},{"title":45,"description":1900},"6tKJxeK4952Vf4IJnmE0o_zcIyt-GDGhtXR-GKOnUQs",[1906,1907],{"title":41,"path":42,"stem":43,"children":-1},{"title":49,"path":50,"stem":51,"children":-1},1793097097635]