[{"data":1,"prerenderedAt":547},["ShallowReactive",2],{"docs-navigation":3,"docs-page-\u002Fdocs\u002Fagents\u002Fmemory-consequence-agents\u002Fend-to-end":252,"docs-surround-\u002Fdocs\u002Fagents\u002Fmemory-consequence-agents\u002Fend-to-end":544},[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":165,"body":254,"description":538,"extension":539,"meta":540,"navigation":541,"path":166,"seo":542,"stem":167,"__hash__":543},"docs\u002Fdocs\u002F3.agents\u002F11.memory-consequence-agents\u002F2.end-to-end\u002F1.index.md",{"type":255,"value":256,"toc":531},"minimark",[257,262,266,271,355,358,362,365,438,441,445,453,469,473,476,503,507,527],[258,259,261],"h1",{"id":260},"end-to-end-memory-consequence-agent","End-to-End Memory + Consequence Agent",[263,264,265],"p",{},"This reference builds a release-support agent. It remembers reviewed operational history, retrieves bounded context, compares release options, records the selected scenario, waits for approval when required, observes the actual result, and creates a reviewable lesson.",[267,268,270],"h2",{"id":269},"reference-lifecycle","Reference lifecycle",[272,273,278],"pre",{"className":274,"code":275,"language":276,"meta":277,"style":277},"language-mermaid shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","flowchart LR\n  A[\"Install approved industry knowledge\"] --> B[\"Remember reviewed history\"]\n  B --> C[\"Build bounded agent context\"]\n  C --> D[\"Plan bounded scenarios\"]\n  D --> E[\"Record selected decision\"]\n  E --> F{\"Approval required?\"}\n  F -->|Yes| G[\"Authorized human approval\"]\n  F -->|No| H[\"Application acts separately\"]\n  G --> H\n  H --> I[\"Observe trusted outcome evidence\"]\n  I --> J[\"Reflect and review lesson\"]\n  J --> B\n","mermaid","",[279,280,281,289,295,301,307,313,319,325,331,337,343,349],"code",{"__ignoreMap":277},[282,283,286],"span",{"class":284,"line":285},"line",1,[282,287,288],{},"flowchart LR\n",[282,290,292],{"class":284,"line":291},2,[282,293,294],{},"  A[\"Install approved industry knowledge\"] --> B[\"Remember reviewed history\"]\n",[282,296,298],{"class":284,"line":297},3,[282,299,300],{},"  B --> C[\"Build bounded agent context\"]\n",[282,302,304],{"class":284,"line":303},4,[282,305,306],{},"  C --> D[\"Plan bounded scenarios\"]\n",[282,308,310],{"class":284,"line":309},5,[282,311,312],{},"  D --> E[\"Record selected decision\"]\n",[282,314,316],{"class":284,"line":315},6,[282,317,318],{},"  E --> F{\"Approval required?\"}\n",[282,320,322],{"class":284,"line":321},7,[282,323,324],{},"  F -->|Yes| G[\"Authorized human approval\"]\n",[282,326,328],{"class":284,"line":327},8,[282,329,330],{},"  F -->|No| H[\"Application acts separately\"]\n",[282,332,334],{"class":284,"line":333},9,[282,335,336],{},"  G --> H\n",[282,338,340],{"class":284,"line":339},10,[282,341,342],{},"  H --> I[\"Observe trusted outcome evidence\"]\n",[282,344,346],{"class":284,"line":345},11,[282,347,348],{},"  I --> J[\"Reflect and review lesson\"]\n",[282,350,352],{"class":284,"line":351},12,[282,353,354],{},"  J --> B\n",[263,356,357],{},"The agent never treats a recommendation as authorization. External action remains in the application and requires the existing identity, policy, approval, idempotency, and recovery controls.",[267,359,361],{"id":360},"implement-in-every-supported-language","Implement in every supported language",[263,363,364],{},"Each implementation covers the same release-support workflow. The official SDK handles memory calls. TypeScript exposes typed Consequence methods; Python, PHP, Go, and Rust call the same public Consequence REST endpoints through a small authenticated helper until those SDKs gain typed parity.",[366,367,368,381],"table",{},[369,370,371],"thead",{},[372,373,374,378],"tr",{},[375,376,377],"th",{},"Language",[375,379,380],{},"Implementation",[382,383,384,395,404,413,426],"tbody",{},[372,385,386,392],{},[387,388,389],"td",{},[390,391,82],"a",{"href":171},[387,393,394],{},"Official SDK for memory, industry installation, and Consequence",[372,396,397,401],{},[387,398,399],{},[390,400,86],{"href":174},[387,402,403],{},"Python SDK plus standard-library REST helper",[372,405,406,410],{},[387,407,408],{},[390,409,90],{"href":177},[387,411,412],{},"PHP SDK plus authenticated REST helper",[372,414,415,419],{},[387,416,417],{},[390,418,94],{"href":180},[387,420,421,422,425],{},"Go SDK plus ",[279,423,424],{},"net\u002Fhttp"," helper",[372,427,428,432],{},[387,429,430],{},[390,431,98],{"href":183},[387,433,434,435,425],{},"Rust SDK plus ",[279,436,437],{},"reqwest",[263,439,440],{},"Configuration-only examples—CLI commands, MCP manifests, JSON policy, and CI YAML—are language-neutral and are not duplicated across SDK languages.",[267,442,444],{"id":443},"shared-environment-contract","Shared environment contract",[272,446,451],{"className":447,"code":449,"language":450,"meta":277},[448],"language-text","NEUTRON_API_URL\nNEUTRON_WORKSPACE_API_KEY\nNEUTRON_API_TOKEN\nNEUTRON_APPROVER_TOKEN\nNEUTRON_INTERNAL_TOKEN\n","text",[279,452,449],{"__ignoreMap":277},[454,455,456,460,463,466],"ul",{},[457,458,459],"li",{},"Use the workspace key only to install approved industry content.",[457,461,462],{},"Use the Nucleus token for normal memory, context, planning, decision, and observation calls.",[457,464,465],{},"Use an approver token only after the application verifies the human approver's identity, role, scope, and current intent.",[457,467,468],{},"Use the internal token for reviewed reflection operations unavailable to lower-authority agents.",[267,470,472],{"id":471},"shared-release-decision-boundary","Shared release decision boundary",[263,474,475],{},"All implementations:",[454,477,478,485,488,491,494,497,500],{},[457,479,480,481,484],{},"use Nucleus ",[279,482,483],{},"checkout-platform",";",[457,486,487],{},"use stable scopes for industry knowledge, service state, release history, and production-change policy;",[457,489,490],{},"request a bounded depth-10 plan with at most eight scenarios and an eight-second runtime budget;",[457,492,493],{},"preserve rollback capability and the approved database lock threshold;",[457,495,496],{},"record the selected scenario but do not execute it;",[457,498,499],{},"attach only trusted observations after the separately authorized pilot;",[457,501,502],{},"review the reflection lesson before any durable memory promotion.",[267,504,506],{"id":505},"production-checklist","Production checklist",[454,508,509,512,515,518,521,524],{},[457,510,511],{},"Keep workspace installation, agent recall, human approval, internal reflection, and external execution credentials separate.",[457,513,514],{},"Use idempotency keys for retried plans and action adapters.",[457,516,517],{},"Keep depth, runtime, nodes, branches, model calls, scenarios, and cost bounded.",[457,519,520],{},"Require current source evidence and specialist solvers for safety-critical calculations.",[457,522,523],{},"Audit every decision, approval, observation, reflection, deletion, and external action.",[457,525,526],{},"Tombstone lifecycle data when its user, scope, or retention boundary requires deletion.",[528,529,530],"style",{},"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":277,"searchDepth":291,"depth":291,"links":532},[533,534,535,536,537],{"id":269,"depth":291,"text":270},{"id":360,"depth":291,"text":361},{"id":443,"depth":291,"text":444},{"id":471,"depth":291,"text":472},{"id":505,"depth":291,"text":506},"Build a scoped agent that recalls history, applies industry knowledge, records a decision, and learns from observed outcomes.","md",{},true,{"title":165,"description":538},"fbrQn5XylCwbbQG85P-C7EY4Q0LOW2pnejsCZUe--uM",[545,546],{"title":159,"path":160,"stem":161,"children":-1},{"title":82,"path":171,"stem":172,"children":-1},1786883755933]