[{"data":1,"prerenderedAt":1359},["ShallowReactive",2],{"docs-navigation":3,"docs-page-\u002Fdocs\u002Ffundamentals\u002Fdata-placement\u002Fphp":252,"docs-surround-\u002Fdocs\u002Ffundamentals\u002Fdata-placement\u002Fphp":1356},[4],{"title":5,"path":6,"stem":7,"children":8,"page":251},"Docs","\u002Fdocs","docs",[9,36,101,197,232],{"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],{"title":15,"path":11,"stem":12},"Welcome",{"title":17,"path":18,"stem":19},"Quickstart","\u002Fdocs\u002Fget-started\u002Fquickstart","docs\u002F1.get-started\u002F2.quickstart",{"title":21,"path":22,"stem":23},"API","\u002Fdocs\u002Fget-started\u002Fapi","docs\u002F1.get-started\u002F3.api",{"title":25,"path":26,"stem":27},"SDKs and CLI","\u002Fdocs\u002Fget-started\u002Fsdks-cli","docs\u002F1.get-started\u002F4.sdks-cli",{"title":29,"path":30,"stem":31},"Sandbox testing","\u002Fdocs\u002Fget-started\u002Flocal-development","docs\u002F1.get-started\u002F5.local-development",{"title":33,"path":34,"stem":35},"Authentication","\u002Fdocs\u002Fget-started\u002Fauthentication","docs\u002F1.get-started\u002F6.authentication",{"title":37,"path":38,"stem":39,"children":40},"FUNDAMENTALS","\u002Fdocs\u002Ffundamentals","docs\u002F2.fundamentals\u002F01.index",[41,43,47,51,55,59,63,67,71,75],{"title":42,"path":38,"stem":39},"Fundamentals",{"title":44,"path":45,"stem":46},"Architecture","\u002Fdocs\u002Ffundamentals\u002Farchitecture","docs\u002F2.fundamentals\u002F02.architecture",{"title":48,"path":49,"stem":50},"Memory model","\u002Fdocs\u002Ffundamentals\u002Fmemory-model","docs\u002F2.fundamentals\u002F03.memory-model",{"title":52,"path":53,"stem":54},"Compression","\u002Fdocs\u002Ffundamentals\u002Fcompression","docs\u002F2.fundamentals\u002F04.compression",{"title":56,"path":57,"stem":58},"RAG and cached context","\u002Fdocs\u002Ffundamentals\u002Frag-cag","docs\u002F2.fundamentals\u002F05.rag-cag",{"title":60,"path":61,"stem":62},"Context cache","\u002Fdocs\u002Ffundamentals\u002Fcontext-cache","docs\u002F2.fundamentals\u002F06.context-cache",{"title":64,"path":65,"stem":66},"Security","\u002Fdocs\u002Ffundamentals\u002Fsecurity","docs\u002F2.fundamentals\u002F07.security",{"title":68,"path":69,"stem":70},"Languages","\u002Fdocs\u002Ffundamentals\u002Flanguages","docs\u002F2.fundamentals\u002F08.languages",{"title":72,"path":73,"stem":74},"UI patterns","\u002Fdocs\u002Ffundamentals\u002Fui","docs\u002F2.fundamentals\u002F09.ui",{"title":76,"path":77,"stem":78,"children":79},"Global, Regional, and Jurisdictional Memory","\u002Fdocs\u002Ffundamentals\u002Fdata-placement","docs\u002F2.fundamentals\u002F10.data-placement\u002F1.index",[80,81,85,89,93,97],{"title":76,"path":77,"stem":78},{"title":82,"path":83,"stem":84},"TypeScript \u002F JavaScript","\u002Fdocs\u002Ffundamentals\u002Fdata-placement\u002Ftypescript","docs\u002F2.fundamentals\u002F10.data-placement\u002F2.typescript",{"title":86,"path":87,"stem":88},"Python","\u002Fdocs\u002Ffundamentals\u002Fdata-placement\u002Fpython","docs\u002F2.fundamentals\u002F10.data-placement\u002F3.python",{"title":90,"path":91,"stem":92},"PHP","\u002Fdocs\u002Ffundamentals\u002Fdata-placement\u002Fphp","docs\u002F2.fundamentals\u002F10.data-placement\u002F4.php",{"title":94,"path":95,"stem":96},"Go","\u002Fdocs\u002Ffundamentals\u002Fdata-placement\u002Fgo","docs\u002F2.fundamentals\u002F10.data-placement\u002F5.go",{"title":98,"path":99,"stem":100},"Rust","\u002Fdocs\u002Ffundamentals\u002Fdata-placement\u002Frust","docs\u002F2.fundamentals\u002F10.data-placement\u002F6.rust",{"title":102,"path":103,"stem":104,"children":105},"AGENTS & CODE NUCLEI","\u002Fdocs\u002Fagents","docs\u002F3.agents\u002F01.index",[106,108,112,116,120,124,128,132,136,140,158,193],{"title":107,"path":103,"stem":104},"Agents",{"title":109,"path":110,"stem":111},"Codex Code Nucleus","\u002Fdocs\u002Fagents\u002Fcodex-code-nucleus","docs\u002F3.agents\u002F02.codex-code-nucleus",{"title":113,"path":114,"stem":115},"Claude Code Nucleus","\u002Fdocs\u002Fagents\u002Fclaude-code-nucleus","docs\u002F3.agents\u002F03.claude-code-nucleus",{"title":117,"path":118,"stem":119},"Google Gemini Code Nucleus","\u002Fdocs\u002Fagents\u002Fgoogle-gemini-code-nucleus","docs\u002F3.agents\u002F04.google-gemini-code-nucleus",{"title":121,"path":122,"stem":123},"GitHub Copilot Code Nucleus","\u002Fdocs\u002Fagents\u002Fgithub-copilot-code-nucleus","docs\u002F3.agents\u002F05.github-copilot-code-nucleus",{"title":125,"path":126,"stem":127},"Cursor Code Nucleus","\u002Fdocs\u002Fagents\u002Fcursor-code-nucleus","docs\u002F3.agents\u002F06.cursor-code-nucleus",{"title":129,"path":130,"stem":131},"Windsurf Code Nucleus","\u002Fdocs\u002Fagents\u002Fwindsurf-code-nucleus","docs\u002F3.agents\u002F07.windsurf-code-nucleus",{"title":133,"path":134,"stem":135},"Agent skills","\u002Fdocs\u002Fagents\u002Fagent-skills","docs\u002F3.agents\u002F08.agent-skills",{"title":137,"path":138,"stem":139},"Admin UI prompt","\u002Fdocs\u002Fagents\u002Fadmin-ui-prompt","docs\u002F3.agents\u002F09.admin-ui-prompt",{"title":141,"path":142,"stem":143,"children":144},"Team Code Governance","\u002Fdocs\u002Fagents\u002Fcode-governance","docs\u002F3.agents\u002F10.code-governance\u002F1.index",[145,146,150,154],{"title":141,"path":142,"stem":143},{"title":147,"path":148,"stem":149},"Local Team Setup","\u002Fdocs\u002Fagents\u002Fcode-governance\u002Flocal-team-setup","docs\u002F3.agents\u002F10.code-governance\u002F2.local-team-setup",{"title":151,"path":152,"stem":153},"Language Governance Packs","\u002Fdocs\u002Fagents\u002Fcode-governance\u002Flanguage-packs","docs\u002F3.agents\u002F10.code-governance\u002F3.language-packs",{"title":155,"path":156,"stem":157},"GitHub CI\u002FCD Governance","\u002Fdocs\u002Fagents\u002Fcode-governance\u002Fgithub-cicd","docs\u002F3.agents\u002F10.code-governance\u002F4.github-cicd",{"title":159,"path":160,"stem":161,"children":162},"Memory + Consequence Agents","\u002Fdocs\u002Fagents\u002Fmemory-consequence-agents","docs\u002F3.agents\u002F11.memory-consequence-agents\u002F1.index",[163,164,185,189],{"title":159,"path":160,"stem":161},{"title":165,"path":166,"stem":167,"children":168},"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",[169,170,173,176,179,182],{"title":165,"path":166,"stem":167},{"title":82,"path":171,"stem":172},"\u002Fdocs\u002Fagents\u002Fmemory-consequence-agents\u002Fend-to-end\u002Ftypescript","docs\u002F3.agents\u002F11.memory-consequence-agents\u002F2.end-to-end\u002F2.typescript",{"title":86,"path":174,"stem":175},"\u002Fdocs\u002Fagents\u002Fmemory-consequence-agents\u002Fend-to-end\u002Fpython","docs\u002F3.agents\u002F11.memory-consequence-agents\u002F2.end-to-end\u002F3.python",{"title":90,"path":177,"stem":178},"\u002Fdocs\u002Fagents\u002Fmemory-consequence-agents\u002Fend-to-end\u002Fphp","docs\u002F3.agents\u002F11.memory-consequence-agents\u002F2.end-to-end\u002F4.php",{"title":94,"path":180,"stem":181},"\u002Fdocs\u002Fagents\u002Fmemory-consequence-agents\u002Fend-to-end\u002Fgo","docs\u002F3.agents\u002F11.memory-consequence-agents\u002F2.end-to-end\u002F5.go",{"title":98,"path":183,"stem":184},"\u002Fdocs\u002Fagents\u002Fmemory-consequence-agents\u002Fend-to-end\u002Frust","docs\u002F3.agents\u002F11.memory-consequence-agents\u002F2.end-to-end\u002F6.rust",{"title":186,"path":187,"stem":188},"Industry Agent Use Cases","\u002Fdocs\u002Fagents\u002Fmemory-consequence-agents\u002Findustry-use-cases","docs\u002F3.agents\u002F11.memory-consequence-agents\u002F3.industry-use-cases",{"title":190,"path":191,"stem":192},"Historical Actions and Learning","\u002Fdocs\u002Fagents\u002Fmemory-consequence-agents\u002Fhistorical-learning","docs\u002F3.agents\u002F11.memory-consequence-agents\u002F4.historical-learning",{"title":194,"path":195,"stem":196},"Consequence decision support","\u002Fdocs\u002Fagents\u002Fconsequence","docs\u002F3.agents\u002F12.consequence",{"title":198,"path":199,"stem":200,"children":201},"MODEL PROVIDERS","\u002Fdocs\u002Fproviders","docs\u002F4.providers\u002F1.index",[202,204,208,212,216,220,224,228],{"title":203,"path":199,"stem":200},"Providers",{"title":205,"path":206,"stem":207},"OpenAI and Azure OpenAI","\u002Fdocs\u002Fproviders\u002Fopenai","docs\u002F4.providers\u002F2.openai",{"title":209,"path":210,"stem":211},"Anthropic Claude","\u002Fdocs\u002Fproviders\u002Fanthropic","docs\u002F4.providers\u002F3.anthropic",{"title":213,"path":214,"stem":215},"Google Gemini and Vertex AI","\u002Fdocs\u002Fproviders\u002Fgoogle-gemini","docs\u002F4.providers\u002F4.google-gemini",{"title":217,"path":218,"stem":219},"OpenAI-compatible providers","\u002Fdocs\u002Fproviders\u002Fopenai-compatible","docs\u002F4.providers\u002F5.openai-compatible",{"title":221,"path":222,"stem":223},"Groq","\u002Fdocs\u002Fproviders\u002Fgroq","docs\u002F4.providers\u002F6.groq",{"title":225,"path":226,"stem":227},"Cohere","\u002Fdocs\u002Fproviders\u002Fcohere","docs\u002F4.providers\u002F7.cohere",{"title":229,"path":230,"stem":231},"Amazon Bedrock","\u002Fdocs\u002Fproviders\u002Famazon-bedrock","docs\u002F4.providers\u002F8.amazon-bedrock",{"title":233,"path":234,"stem":235,"children":236},"CHANGELOG","\u002Fdocs\u002Fchangelog","docs\u002F5.changelog\u002F1.index",[237,239,243,247],{"title":238,"path":234,"stem":235},"Changelog",{"title":240,"path":241,"stem":242},"Roadmap","\u002Fdocs\u002Fchangelog\u002Froadmap","docs\u002F5.changelog\u002F2.roadmap",{"title":244,"path":245,"stem":246},"Release notes","\u002Fdocs\u002Fchangelog\u002Frelease-runbook","docs\u002F5.changelog\u002F3.release-runbook",{"title":248,"path":249,"stem":250},"Testing","\u002Fdocs\u002Fchangelog\u002Ftesting","docs\u002F5.changelog\u002F4.testing",false,{"id":253,"title":90,"body":254,"description":1351,"extension":1352,"meta":1353,"navigation":317,"path":91,"seo":1354,"stem":92,"__hash__":1355},"docs\u002Fdocs\u002F2.fundamentals\u002F10.data-placement\u002F4.php.md",{"type":255,"value":256,"toc":1345},"minimark",[257,262,266,292,295,300,850,853,857,1124,1127,1131,1224,1231,1235,1333,1341],[258,259,261],"h1",{"id":260},"php-data-placement","PHP Data Placement",[263,264,265],"p",{},"Install the PHP 8.2+ SDK and enable the cURL extension for the control-plane helper:",[267,268,273],"pre",{"className":269,"code":270,"language":271,"meta":272,"style":272},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","composer require neutron-ai\u002Fsdk\n","bash","",[274,275,276],"code",{"__ignoreMap":272},[277,278,281,285,289],"span",{"class":279,"line":280},"line",1,[277,282,284],{"class":283},"sBMFI","composer",[277,286,288],{"class":287},"sfazB"," require",[277,290,291],{"class":287}," neutron-ai\u002Fsdk\n",[263,293,294],{},"The official SDK handles runtime memory operations. The helper below calls the public Nucleus REST endpoints for provisioning and readiness checks.",[296,297,299],"h2",{"id":298},"provision-the-three-nuclei","Provision the three Nuclei",[267,301,305],{"className":302,"code":303,"language":304,"meta":272,"style":272},"language-php shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003C?php\n\ndeclare(strict_types=1);\n\nfunction requiredEnv(string $name): string\n{\n    $value = getenv($name);\n    if ($value === false || trim($value) === '') {\n        throw new RuntimeException(\"{$name} is required\");\n    }\n    return $value;\n}\n\nfunction neutronRequest(\n    string $token,\n    string $method,\n    string $path,\n    ?array $body = null,\n): array {\n    $base_url = rtrim(requiredEnv('NEUTRON_API_URL'), '\u002F');\n    $curl = curl_init($base_url . $path);\n    if ($curl === false) {\n        throw new RuntimeException('Unable to initialize cURL');\n    }\n\n    curl_setopt_array($curl, [\n        CURLOPT_CUSTOMREQUEST => $method,\n        CURLOPT_HTTPHEADER => [\n            'authorization: Bearer ' . $token,\n            'content-type: application\u002Fjson',\n        ],\n        CURLOPT_POSTFIELDS => $body === null ? null : json_encode($body, JSON_THROW_ON_ERROR),\n        CURLOPT_RETURNTRANSFER => true,\n        CURLOPT_TIMEOUT => 30,\n    ]);\n\n    $raw_body = curl_exec($curl);\n    $status = (int) curl_getinfo($curl, CURLINFO_RESPONSE_CODE);\n    $error = curl_error($curl);\n    curl_close($curl);\n\n    if ($raw_body === false) {\n        throw new RuntimeException($error ?: 'Neutron request failed');\n    }\n    $decoded = $raw_body === '' ? [] : json_decode($raw_body, true, flags: JSON_THROW_ON_ERROR);\n    if ($status >= 400) {\n        throw new RuntimeException(\"Neutron request failed with HTTP {$status}\");\n    }\n    return is_array($decoded) ? $decoded : [];\n}\n\n$profiles = [\n    [\n        'nucleusId' => 'product-knowledge-global',\n        'name' => 'Global product knowledge',\n        'placement' => [\n            'mode' => 'global',\n            'guarantee' => 'none',\n            'notes' => ['Approved global knowledge; no jurisdictional storage guarantee.'],\n        ],\n    ],\n    [\n        'nucleusId' => 'support-operations-weur',\n        'name' => 'Western Europe support operations',\n        'placement' => [\n            'mode' => 'regional',\n            'regionHint' => 'weur',\n            'r2LocationHint' => 'weur',\n            'guarantee' => 'best_effort_regional',\n            'notes' => ['Latency preference only; not a legal residency boundary.'],\n        ],\n    ],\n    [\n        'nucleusId' => 'regulated-cases-eu',\n        'name' => 'EU regulated case memory',\n        'placement' => [\n            'mode' => 'jurisdictional',\n            'jurisdiction' => 'eu',\n            'regionalServicesRequired' => true,\n            'metadataBoundaryRequired' => true,\n            'geoKeyManagerRequired' => false,\n            'guarantee' => 'jurisdictional_storage',\n            'notes' => [\n                'Requires the EU Durable Object jurisdiction and matching EU archive binding.',\n                'Processing, logs, metadata, keys, retention, and contracts require separate verification.',\n            ],\n        ],\n    ],\n];\n\n$workspace_key = requiredEnv('NEUTRON_WORKSPACE_API_KEY');\nforeach ($profiles as $profile) {\n    neutronRequest($workspace_key, 'POST', '\u002Fv1\u002Fnuclei', $profile);\n}\n","php",[274,306,307,312,319,325,330,336,342,348,354,360,366,372,378,383,389,395,401,407,413,419,425,431,437,443,448,453,459,465,471,477,483,489,495,501,507,513,518,524,530,536,542,547,553,559,564,570,576,582,587,593,598,603,609,615,621,627,633,639,645,651,656,662,667,673,679,684,690,696,702,708,714,719,724,729,735,741,746,752,758,764,770,776,782,788,794,800,806,811,816,822,827,833,839,845],{"__ignoreMap":272},[277,308,309],{"class":279,"line":280},[277,310,311],{},"\u003C?php\n",[277,313,315],{"class":279,"line":314},2,[277,316,318],{"emptyLinePlaceholder":317},true,"\n",[277,320,322],{"class":279,"line":321},3,[277,323,324],{},"declare(strict_types=1);\n",[277,326,328],{"class":279,"line":327},4,[277,329,318],{"emptyLinePlaceholder":317},[277,331,333],{"class":279,"line":332},5,[277,334,335],{},"function requiredEnv(string $name): string\n",[277,337,339],{"class":279,"line":338},6,[277,340,341],{},"{\n",[277,343,345],{"class":279,"line":344},7,[277,346,347],{},"    $value = getenv($name);\n",[277,349,351],{"class":279,"line":350},8,[277,352,353],{},"    if ($value === false || trim($value) === '') {\n",[277,355,357],{"class":279,"line":356},9,[277,358,359],{},"        throw new RuntimeException(\"{$name} is required\");\n",[277,361,363],{"class":279,"line":362},10,[277,364,365],{},"    }\n",[277,367,369],{"class":279,"line":368},11,[277,370,371],{},"    return $value;\n",[277,373,375],{"class":279,"line":374},12,[277,376,377],{},"}\n",[277,379,381],{"class":279,"line":380},13,[277,382,318],{"emptyLinePlaceholder":317},[277,384,386],{"class":279,"line":385},14,[277,387,388],{},"function neutronRequest(\n",[277,390,392],{"class":279,"line":391},15,[277,393,394],{},"    string $token,\n",[277,396,398],{"class":279,"line":397},16,[277,399,400],{},"    string $method,\n",[277,402,404],{"class":279,"line":403},17,[277,405,406],{},"    string $path,\n",[277,408,410],{"class":279,"line":409},18,[277,411,412],{},"    ?array $body = null,\n",[277,414,416],{"class":279,"line":415},19,[277,417,418],{},"): array {\n",[277,420,422],{"class":279,"line":421},20,[277,423,424],{},"    $base_url = rtrim(requiredEnv('NEUTRON_API_URL'), '\u002F');\n",[277,426,428],{"class":279,"line":427},21,[277,429,430],{},"    $curl = curl_init($base_url . $path);\n",[277,432,434],{"class":279,"line":433},22,[277,435,436],{},"    if ($curl === false) {\n",[277,438,440],{"class":279,"line":439},23,[277,441,442],{},"        throw new RuntimeException('Unable to initialize cURL');\n",[277,444,446],{"class":279,"line":445},24,[277,447,365],{},[277,449,451],{"class":279,"line":450},25,[277,452,318],{"emptyLinePlaceholder":317},[277,454,456],{"class":279,"line":455},26,[277,457,458],{},"    curl_setopt_array($curl, [\n",[277,460,462],{"class":279,"line":461},27,[277,463,464],{},"        CURLOPT_CUSTOMREQUEST => $method,\n",[277,466,468],{"class":279,"line":467},28,[277,469,470],{},"        CURLOPT_HTTPHEADER => [\n",[277,472,474],{"class":279,"line":473},29,[277,475,476],{},"            'authorization: Bearer ' . $token,\n",[277,478,480],{"class":279,"line":479},30,[277,481,482],{},"            'content-type: application\u002Fjson',\n",[277,484,486],{"class":279,"line":485},31,[277,487,488],{},"        ],\n",[277,490,492],{"class":279,"line":491},32,[277,493,494],{},"        CURLOPT_POSTFIELDS => $body === null ? null : json_encode($body, JSON_THROW_ON_ERROR),\n",[277,496,498],{"class":279,"line":497},33,[277,499,500],{},"        CURLOPT_RETURNTRANSFER => true,\n",[277,502,504],{"class":279,"line":503},34,[277,505,506],{},"        CURLOPT_TIMEOUT => 30,\n",[277,508,510],{"class":279,"line":509},35,[277,511,512],{},"    ]);\n",[277,514,516],{"class":279,"line":515},36,[277,517,318],{"emptyLinePlaceholder":317},[277,519,521],{"class":279,"line":520},37,[277,522,523],{},"    $raw_body = curl_exec($curl);\n",[277,525,527],{"class":279,"line":526},38,[277,528,529],{},"    $status = (int) curl_getinfo($curl, CURLINFO_RESPONSE_CODE);\n",[277,531,533],{"class":279,"line":532},39,[277,534,535],{},"    $error = curl_error($curl);\n",[277,537,539],{"class":279,"line":538},40,[277,540,541],{},"    curl_close($curl);\n",[277,543,545],{"class":279,"line":544},41,[277,546,318],{"emptyLinePlaceholder":317},[277,548,550],{"class":279,"line":549},42,[277,551,552],{},"    if ($raw_body === false) {\n",[277,554,556],{"class":279,"line":555},43,[277,557,558],{},"        throw new RuntimeException($error ?: 'Neutron request failed');\n",[277,560,562],{"class":279,"line":561},44,[277,563,365],{},[277,565,567],{"class":279,"line":566},45,[277,568,569],{},"    $decoded = $raw_body === '' ? [] : json_decode($raw_body, true, flags: JSON_THROW_ON_ERROR);\n",[277,571,573],{"class":279,"line":572},46,[277,574,575],{},"    if ($status >= 400) {\n",[277,577,579],{"class":279,"line":578},47,[277,580,581],{},"        throw new RuntimeException(\"Neutron request failed with HTTP {$status}\");\n",[277,583,585],{"class":279,"line":584},48,[277,586,365],{},[277,588,590],{"class":279,"line":589},49,[277,591,592],{},"    return is_array($decoded) ? $decoded : [];\n",[277,594,596],{"class":279,"line":595},50,[277,597,377],{},[277,599,601],{"class":279,"line":600},51,[277,602,318],{"emptyLinePlaceholder":317},[277,604,606],{"class":279,"line":605},52,[277,607,608],{},"$profiles = [\n",[277,610,612],{"class":279,"line":611},53,[277,613,614],{},"    [\n",[277,616,618],{"class":279,"line":617},54,[277,619,620],{},"        'nucleusId' => 'product-knowledge-global',\n",[277,622,624],{"class":279,"line":623},55,[277,625,626],{},"        'name' => 'Global product knowledge',\n",[277,628,630],{"class":279,"line":629},56,[277,631,632],{},"        'placement' => [\n",[277,634,636],{"class":279,"line":635},57,[277,637,638],{},"            'mode' => 'global',\n",[277,640,642],{"class":279,"line":641},58,[277,643,644],{},"            'guarantee' => 'none',\n",[277,646,648],{"class":279,"line":647},59,[277,649,650],{},"            'notes' => ['Approved global knowledge; no jurisdictional storage guarantee.'],\n",[277,652,654],{"class":279,"line":653},60,[277,655,488],{},[277,657,659],{"class":279,"line":658},61,[277,660,661],{},"    ],\n",[277,663,665],{"class":279,"line":664},62,[277,666,614],{},[277,668,670],{"class":279,"line":669},63,[277,671,672],{},"        'nucleusId' => 'support-operations-weur',\n",[277,674,676],{"class":279,"line":675},64,[277,677,678],{},"        'name' => 'Western Europe support operations',\n",[277,680,682],{"class":279,"line":681},65,[277,683,632],{},[277,685,687],{"class":279,"line":686},66,[277,688,689],{},"            'mode' => 'regional',\n",[277,691,693],{"class":279,"line":692},67,[277,694,695],{},"            'regionHint' => 'weur',\n",[277,697,699],{"class":279,"line":698},68,[277,700,701],{},"            'r2LocationHint' => 'weur',\n",[277,703,705],{"class":279,"line":704},69,[277,706,707],{},"            'guarantee' => 'best_effort_regional',\n",[277,709,711],{"class":279,"line":710},70,[277,712,713],{},"            'notes' => ['Latency preference only; not a legal residency boundary.'],\n",[277,715,717],{"class":279,"line":716},71,[277,718,488],{},[277,720,722],{"class":279,"line":721},72,[277,723,661],{},[277,725,727],{"class":279,"line":726},73,[277,728,614],{},[277,730,732],{"class":279,"line":731},74,[277,733,734],{},"        'nucleusId' => 'regulated-cases-eu',\n",[277,736,738],{"class":279,"line":737},75,[277,739,740],{},"        'name' => 'EU regulated case memory',\n",[277,742,744],{"class":279,"line":743},76,[277,745,632],{},[277,747,749],{"class":279,"line":748},77,[277,750,751],{},"            'mode' => 'jurisdictional',\n",[277,753,755],{"class":279,"line":754},78,[277,756,757],{},"            'jurisdiction' => 'eu',\n",[277,759,761],{"class":279,"line":760},79,[277,762,763],{},"            'regionalServicesRequired' => true,\n",[277,765,767],{"class":279,"line":766},80,[277,768,769],{},"            'metadataBoundaryRequired' => true,\n",[277,771,773],{"class":279,"line":772},81,[277,774,775],{},"            'geoKeyManagerRequired' => false,\n",[277,777,779],{"class":279,"line":778},82,[277,780,781],{},"            'guarantee' => 'jurisdictional_storage',\n",[277,783,785],{"class":279,"line":784},83,[277,786,787],{},"            'notes' => [\n",[277,789,791],{"class":279,"line":790},84,[277,792,793],{},"                'Requires the EU Durable Object jurisdiction and matching EU archive binding.',\n",[277,795,797],{"class":279,"line":796},85,[277,798,799],{},"                'Processing, logs, metadata, keys, retention, and contracts require separate verification.',\n",[277,801,803],{"class":279,"line":802},86,[277,804,805],{},"            ],\n",[277,807,809],{"class":279,"line":808},87,[277,810,488],{},[277,812,814],{"class":279,"line":813},88,[277,815,661],{},[277,817,819],{"class":279,"line":818},89,[277,820,821],{},"];\n",[277,823,825],{"class":279,"line":824},90,[277,826,318],{"emptyLinePlaceholder":317},[277,828,830],{"class":279,"line":829},91,[277,831,832],{},"$workspace_key = requiredEnv('NEUTRON_WORKSPACE_API_KEY');\n",[277,834,836],{"class":279,"line":835},92,[277,837,838],{},"foreach ($profiles as $profile) {\n",[277,840,842],{"class":279,"line":841},93,[277,843,844],{},"    neutronRequest($workspace_key, 'POST', '\u002Fv1\u002Fnuclei', $profile);\n",[277,846,848],{"class":279,"line":847},94,[277,849,377],{},[263,851,852],{},"Treat an already-existing Nucleus as deployment state. Never retry creation with a different placement profile.",[296,854,856],{"id":855},"build-the-memory-router","Build the memory router",[267,858,860],{"className":302,"code":859,"language":304,"meta":272,"style":272},"\u003C?php\n\nuse NeutronAI\\NeutronAIClient;\n\n$base_url = requiredEnv('NEUTRON_API_URL');\n$global_memory = new NeutronAIClient(\n    base_url: $base_url,\n    token: requiredEnv('NEUTRON_GLOBAL_TOKEN'),\n    nucleus_id: 'product-knowledge-global',\n);\n$western_europe_memory = new NeutronAIClient(\n    base_url: $base_url,\n    token: requiredEnv('NEUTRON_WEUR_TOKEN'),\n    nucleus_id: 'support-operations-weur',\n);\n$eu_regulated_memory = new NeutronAIClient(\n    base_url: $base_url,\n    token: requiredEnv('NEUTRON_EU_TOKEN'),\n    nucleus_id: 'regulated-cases-eu',\n);\n\nfunction storeGlobalProductKnowledge(NeutronAIClient $client, string $text): array\n{\n    return $client->remember([\n        'scopeId' => 'kb:approved-products',\n        'type' => 'knowledge',\n        'privacyClass' => 'public',\n        'text' => $text,\n    ]);\n}\n\nfunction storeWesternEuropeSupportLesson(NeutronAIClient $client, string $text): array\n{\n    return $client->remember([\n        'scopeId' => 'history:support-resolutions',\n        'type' => 'tool_lesson',\n        'privacyClass' => 'tenant',\n        'text' => $text,\n    ]);\n}\n\nfunction storeEuRegulatedCase(\n    NeutronAIClient $client,\n    string $case_id,\n    string $minimized_summary,\n): array {\n    return $client->remember([\n        'scopeId' => \"case:{$case_id}\",\n        'type' => 'experience',\n        'privacyClass' => 'user_private',\n        'text' => $minimized_summary,\n        'metadata' => [\n            'dataClass' => 'eu-regulated-case',\n            'source' => 'approved-case-summary',\n        ],\n    ]);\n}\n",[274,861,862,866,870,875,879,884,889,894,899,904,909,914,918,923,928,932,937,941,946,951,955,959,964,968,973,978,983,988,993,997,1001,1005,1010,1014,1018,1023,1028,1033,1037,1041,1045,1049,1054,1059,1064,1069,1073,1077,1082,1087,1092,1097,1102,1107,1112,1116,1120],{"__ignoreMap":272},[277,863,864],{"class":279,"line":280},[277,865,311],{},[277,867,868],{"class":279,"line":314},[277,869,318],{"emptyLinePlaceholder":317},[277,871,872],{"class":279,"line":321},[277,873,874],{},"use NeutronAI\\NeutronAIClient;\n",[277,876,877],{"class":279,"line":327},[277,878,318],{"emptyLinePlaceholder":317},[277,880,881],{"class":279,"line":332},[277,882,883],{},"$base_url = requiredEnv('NEUTRON_API_URL');\n",[277,885,886],{"class":279,"line":338},[277,887,888],{},"$global_memory = new NeutronAIClient(\n",[277,890,891],{"class":279,"line":344},[277,892,893],{},"    base_url: $base_url,\n",[277,895,896],{"class":279,"line":350},[277,897,898],{},"    token: requiredEnv('NEUTRON_GLOBAL_TOKEN'),\n",[277,900,901],{"class":279,"line":356},[277,902,903],{},"    nucleus_id: 'product-knowledge-global',\n",[277,905,906],{"class":279,"line":362},[277,907,908],{},");\n",[277,910,911],{"class":279,"line":368},[277,912,913],{},"$western_europe_memory = new NeutronAIClient(\n",[277,915,916],{"class":279,"line":374},[277,917,893],{},[277,919,920],{"class":279,"line":380},[277,921,922],{},"    token: requiredEnv('NEUTRON_WEUR_TOKEN'),\n",[277,924,925],{"class":279,"line":385},[277,926,927],{},"    nucleus_id: 'support-operations-weur',\n",[277,929,930],{"class":279,"line":391},[277,931,908],{},[277,933,934],{"class":279,"line":397},[277,935,936],{},"$eu_regulated_memory = new NeutronAIClient(\n",[277,938,939],{"class":279,"line":403},[277,940,893],{},[277,942,943],{"class":279,"line":409},[277,944,945],{},"    token: requiredEnv('NEUTRON_EU_TOKEN'),\n",[277,947,948],{"class":279,"line":415},[277,949,950],{},"    nucleus_id: 'regulated-cases-eu',\n",[277,952,953],{"class":279,"line":421},[277,954,908],{},[277,956,957],{"class":279,"line":427},[277,958,318],{"emptyLinePlaceholder":317},[277,960,961],{"class":279,"line":433},[277,962,963],{},"function storeGlobalProductKnowledge(NeutronAIClient $client, string $text): array\n",[277,965,966],{"class":279,"line":439},[277,967,341],{},[277,969,970],{"class":279,"line":445},[277,971,972],{},"    return $client->remember([\n",[277,974,975],{"class":279,"line":450},[277,976,977],{},"        'scopeId' => 'kb:approved-products',\n",[277,979,980],{"class":279,"line":455},[277,981,982],{},"        'type' => 'knowledge',\n",[277,984,985],{"class":279,"line":461},[277,986,987],{},"        'privacyClass' => 'public',\n",[277,989,990],{"class":279,"line":467},[277,991,992],{},"        'text' => $text,\n",[277,994,995],{"class":279,"line":473},[277,996,512],{},[277,998,999],{"class":279,"line":479},[277,1000,377],{},[277,1002,1003],{"class":279,"line":485},[277,1004,318],{"emptyLinePlaceholder":317},[277,1006,1007],{"class":279,"line":491},[277,1008,1009],{},"function storeWesternEuropeSupportLesson(NeutronAIClient $client, string $text): array\n",[277,1011,1012],{"class":279,"line":497},[277,1013,341],{},[277,1015,1016],{"class":279,"line":503},[277,1017,972],{},[277,1019,1020],{"class":279,"line":509},[277,1021,1022],{},"        'scopeId' => 'history:support-resolutions',\n",[277,1024,1025],{"class":279,"line":515},[277,1026,1027],{},"        'type' => 'tool_lesson',\n",[277,1029,1030],{"class":279,"line":520},[277,1031,1032],{},"        'privacyClass' => 'tenant',\n",[277,1034,1035],{"class":279,"line":526},[277,1036,992],{},[277,1038,1039],{"class":279,"line":532},[277,1040,512],{},[277,1042,1043],{"class":279,"line":538},[277,1044,377],{},[277,1046,1047],{"class":279,"line":544},[277,1048,318],{"emptyLinePlaceholder":317},[277,1050,1051],{"class":279,"line":549},[277,1052,1053],{},"function storeEuRegulatedCase(\n",[277,1055,1056],{"class":279,"line":555},[277,1057,1058],{},"    NeutronAIClient $client,\n",[277,1060,1061],{"class":279,"line":561},[277,1062,1063],{},"    string $case_id,\n",[277,1065,1066],{"class":279,"line":566},[277,1067,1068],{},"    string $minimized_summary,\n",[277,1070,1071],{"class":279,"line":572},[277,1072,418],{},[277,1074,1075],{"class":279,"line":578},[277,1076,972],{},[277,1078,1079],{"class":279,"line":584},[277,1080,1081],{},"        'scopeId' => \"case:{$case_id}\",\n",[277,1083,1084],{"class":279,"line":589},[277,1085,1086],{},"        'type' => 'experience',\n",[277,1088,1089],{"class":279,"line":595},[277,1090,1091],{},"        'privacyClass' => 'user_private',\n",[277,1093,1094],{"class":279,"line":600},[277,1095,1096],{},"        'text' => $minimized_summary,\n",[277,1098,1099],{"class":279,"line":605},[277,1100,1101],{},"        'metadata' => [\n",[277,1103,1104],{"class":279,"line":611},[277,1105,1106],{},"            'dataClass' => 'eu-regulated-case',\n",[277,1108,1109],{"class":279,"line":617},[277,1110,1111],{},"            'source' => 'approved-case-summary',\n",[277,1113,1114],{"class":279,"line":623},[277,1115,488],{},[277,1117,1118],{"class":279,"line":629},[277,1119,512],{},[277,1121,1122],{"class":279,"line":635},[277,1123,377],{},[263,1125,1126],{},"Expose only these domain-specific operations to application code. Do not accept placement or unrestricted scope values from an agent, browser, or request body.",[296,1128,1130],{"id":1129},"recall-eu-case-context","Recall EU case context",[267,1132,1134],{"className":302,"code":1133,"language":304,"meta":272,"style":272},"$eu_case_context = $eu_regulated_memory->agentContext([\n    'scopeIds' => [\n        'case:case-4821',\n        'policy:eu-case-handling',\n        'kb:approved-products',\n    ],\n    'agentId' => 'agent:eu-case-support',\n    'task' => 'Prepare the next authorized case-support step.',\n    'privacyClasses' => ['tenant', 'user_private'],\n    'tokenBudget' => 1_200,\n    'cachePolicy' => [\n        'mode' => 'prefer_cache',\n        'keyMode' => 'intent_profile',\n        'ttlSeconds' => 120,\n        'includeDynamicRag' => true,\n        'allowSensitive' => false,\n    ],\n]);\n",[274,1135,1136,1141,1146,1151,1156,1161,1165,1170,1175,1180,1185,1190,1195,1200,1205,1210,1215,1219],{"__ignoreMap":272},[277,1137,1138],{"class":279,"line":280},[277,1139,1140],{},"$eu_case_context = $eu_regulated_memory->agentContext([\n",[277,1142,1143],{"class":279,"line":314},[277,1144,1145],{},"    'scopeIds' => [\n",[277,1147,1148],{"class":279,"line":321},[277,1149,1150],{},"        'case:case-4821',\n",[277,1152,1153],{"class":279,"line":327},[277,1154,1155],{},"        'policy:eu-case-handling',\n",[277,1157,1158],{"class":279,"line":332},[277,1159,1160],{},"        'kb:approved-products',\n",[277,1162,1163],{"class":279,"line":338},[277,1164,661],{},[277,1166,1167],{"class":279,"line":344},[277,1168,1169],{},"    'agentId' => 'agent:eu-case-support',\n",[277,1171,1172],{"class":279,"line":350},[277,1173,1174],{},"    'task' => 'Prepare the next authorized case-support step.',\n",[277,1176,1177],{"class":279,"line":356},[277,1178,1179],{},"    'privacyClasses' => ['tenant', 'user_private'],\n",[277,1181,1182],{"class":279,"line":362},[277,1183,1184],{},"    'tokenBudget' => 1_200,\n",[277,1186,1187],{"class":279,"line":368},[277,1188,1189],{},"    'cachePolicy' => [\n",[277,1191,1192],{"class":279,"line":374},[277,1193,1194],{},"        'mode' => 'prefer_cache',\n",[277,1196,1197],{"class":279,"line":380},[277,1198,1199],{},"        'keyMode' => 'intent_profile',\n",[277,1201,1202],{"class":279,"line":385},[277,1203,1204],{},"        'ttlSeconds' => 120,\n",[277,1206,1207],{"class":279,"line":391},[277,1208,1209],{},"        'includeDynamicRag' => true,\n",[277,1211,1212],{"class":279,"line":397},[277,1213,1214],{},"        'allowSensitive' => false,\n",[277,1216,1217],{"class":279,"line":403},[277,1218,661],{},[277,1220,1221],{"class":279,"line":409},[277,1222,1223],{},"]);\n",[263,1225,1226,1227,1230],{},"All requested scopes resolve inside ",[274,1228,1229],{},"regulated-cases-eu","; the call cannot cross into another Nucleus.",[296,1232,1234],{"id":1233},"verify-jurisdictional-readiness","Verify jurisdictional readiness",[267,1236,1238],{"className":302,"code":1237,"language":304,"meta":272,"style":272},"$eu_token = requiredEnv('NEUTRON_EU_TOKEN');\n$placement = neutronRequest(\n    $eu_token,\n    'GET',\n    '\u002Fv1\u002Fnuclei\u002Fregulated-cases-eu\u002Fplacement',\n);\n$health = neutronRequest(\n    $eu_token,\n    'GET',\n    '\u002Fv1\u002Fnuclei\u002Fregulated-cases-eu\u002Fhealth',\n);\n\n$blocking_warnings = [\n    'jurisdictional_do_subnamespace_unavailable',\n    'jurisdictional_archive_bucket_missing',\n];\n$active_warnings = $health['warnings'] ?? [];\nif (array_intersect($blocking_warnings, $active_warnings) !== []) {\n    throw new RuntimeException('EU Nucleus is not ready');\n}\n",[274,1239,1240,1245,1250,1255,1260,1265,1269,1274,1278,1282,1287,1291,1295,1300,1305,1310,1314,1319,1324,1329],{"__ignoreMap":272},[277,1241,1242],{"class":279,"line":280},[277,1243,1244],{},"$eu_token = requiredEnv('NEUTRON_EU_TOKEN');\n",[277,1246,1247],{"class":279,"line":314},[277,1248,1249],{},"$placement = neutronRequest(\n",[277,1251,1252],{"class":279,"line":321},[277,1253,1254],{},"    $eu_token,\n",[277,1256,1257],{"class":279,"line":327},[277,1258,1259],{},"    'GET',\n",[277,1261,1262],{"class":279,"line":332},[277,1263,1264],{},"    '\u002Fv1\u002Fnuclei\u002Fregulated-cases-eu\u002Fplacement',\n",[277,1266,1267],{"class":279,"line":338},[277,1268,908],{},[277,1270,1271],{"class":279,"line":344},[277,1272,1273],{},"$health = neutronRequest(\n",[277,1275,1276],{"class":279,"line":350},[277,1277,1254],{},[277,1279,1280],{"class":279,"line":356},[277,1281,1259],{},[277,1283,1284],{"class":279,"line":362},[277,1285,1286],{},"    '\u002Fv1\u002Fnuclei\u002Fregulated-cases-eu\u002Fhealth',\n",[277,1288,1289],{"class":279,"line":368},[277,1290,908],{},[277,1292,1293],{"class":279,"line":374},[277,1294,318],{"emptyLinePlaceholder":317},[277,1296,1297],{"class":279,"line":380},[277,1298,1299],{},"$blocking_warnings = [\n",[277,1301,1302],{"class":279,"line":385},[277,1303,1304],{},"    'jurisdictional_do_subnamespace_unavailable',\n",[277,1306,1307],{"class":279,"line":391},[277,1308,1309],{},"    'jurisdictional_archive_bucket_missing',\n",[277,1311,1312],{"class":279,"line":397},[277,1313,821],{},[277,1315,1316],{"class":279,"line":403},[277,1317,1318],{},"$active_warnings = $health['warnings'] ?? [];\n",[277,1320,1321],{"class":279,"line":409},[277,1322,1323],{},"if (array_intersect($blocking_warnings, $active_warnings) !== []) {\n",[277,1325,1326],{"class":279,"line":415},[277,1327,1328],{},"    throw new RuntimeException('EU Nucleus is not ready');\n",[277,1330,1331],{"class":279,"line":421},[277,1332,377],{},[263,1334,1335,1336,1340],{},"Return to the ",[1337,1338,1339],"a",{"href":77},"placement architecture and production checklist",".",[1342,1343,1344],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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":272,"searchDepth":314,"depth":314,"links":1346},[1347,1348,1349,1350],{"id":298,"depth":314,"text":299},{"id":855,"depth":314,"text":856},{"id":1129,"depth":314,"text":1130},{"id":1233,"depth":314,"text":1234},"Implement global, regional, and jurisdictional Neutron memory with the PHP SDK.","md",{},{"title":90,"description":1351},"2I6o7zTCLSZgn94M18KODKEUHVDpzEWjMsvXZeTI4mc",[1357,1358],{"title":86,"path":87,"stem":88,"children":-1},{"title":94,"path":95,"stem":96,"children":-1},1786883757428]