[{"data":1,"prerenderedAt":301},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fv2\u002Fapi\u002Fproc\u002Fenv":3},{"id":4,"title":5,"body":6,"description":293,"extension":294,"meta":295,"navigation":296,"path":297,"seo":298,"stem":299,"__hash__":300},"docs\u002Fdocs\u002Fv2\u002Fapi\u002Fproc\u002Fenv.md","process.env",{"type":7,"value":8,"toc":288},"minimark",[9,13,29,91,96,99,132,138,142,258,268,272,284],[10,11,5],"h1",{"id":12},"processenv",[14,15,16,17,20,21,24,25,28],"p",{},"The capsule subprocess inherits the agent's environment. ",[18,19,5],"code",{}," contains every\nkey declared in the agent's ",[18,22,23],{},".env"," file and resolved through ",[18,26,27],{},"axon.config.ts"," env\nconfiguration — available immediately, no imports required.",[30,31,36],"pre",{"className":32,"code":33,"language":34,"meta":35,"style":35},"language-ts shiki shiki-themes dark-plus","const token = process.env.GITHUB_TOKEN\nconst apiUrl = process.env.API_BASE_URL\n","ts","",[18,37,38,70],{"__ignoreMap":35},[39,40,43,47,51,55,59,62,65,67],"span",{"class":41,"line":42},"line",1,[39,44,46],{"class":45},"scz_3","const",[39,48,50],{"class":49},"s9McN"," token",[39,52,54],{"class":53},"sTNBD"," = ",[39,56,58],{"class":57},"s3F5K","process",[39,60,61],{"class":53},".",[39,63,64],{"class":57},"env",[39,66,61],{"class":53},[39,68,69],{"class":49},"GITHUB_TOKEN\n",[39,71,73,75,78,80,82,84,86,88],{"class":41,"line":72},2,[39,74,46],{"class":45},[39,76,77],{"class":49}," apiUrl",[39,79,54],{"class":53},[39,81,58],{"class":57},[39,83,61],{"class":53},[39,85,64],{"class":57},[39,87,61],{"class":53},[39,89,90],{"class":49},"API_BASE_URL\n",[92,93,95],"h2",{"id":94},"whats-in-it","What's in it",[14,97,98],{},"Keys come from three sources, in this order of precedence:",[100,101,102,111,122],"ol",{},[103,104,105,110],"li",{},[106,107,108],"strong",{},[18,109,23],{}," — agent-local secrets. Never committed, never published.",[103,112,113,118,119,121],{},[106,114,115],{},[18,116,117],{},"env.pass"," in ",[18,120,27],{}," — keys from the host machine's environment\nexplicitly passed into the capsule.",[103,123,124,118,129,131],{},[106,125,126],{},[18,127,128],{},"env.set",[18,130,27],{}," — static values baked into the config.",[14,133,134,135,137],{},"The capsule does not inherit the full host environment by default. Only keys declared\nin ",[18,136,117],{}," are forwarded. This is intentional — it prevents accidental leakage of\nhost secrets into the agent.",[92,139,141],{"id":140},"declaring-required-keys","Declaring required keys",[30,143,145],{"className":32,"code":144,"language":34,"meta":35,"style":35},"\u002F\u002F axon.config.ts\nexport default defineAgent({\n    env: {\n        needs: [\"GITHUB_TOKEN\", \"LINEAR_API_KEY\"],  \u002F\u002F documented as required\n        pass: [\"HOME\", \"PATH\"],                      \u002F\u002F forwarded from host\n        set: { NODE_ENV: \"production\" },             \u002F\u002F static values\n    },\n})\n",[18,146,147,153,169,178,203,225,246,252],{"__ignoreMap":35},[39,148,149],{"class":41,"line":42},[39,150,152],{"class":151},"sOLPB","\u002F\u002F axon.config.ts\n",[39,154,155,159,162,166],{"class":41,"line":72},[39,156,158],{"class":157},"sYbnZ","export",[39,160,161],{"class":157}," default",[39,163,165],{"class":164},"sCudf"," defineAgent",[39,167,168],{"class":53},"({\n",[39,170,172,175],{"class":41,"line":171},3,[39,173,174],{"class":57},"    env:",[39,176,177],{"class":53}," {\n",[39,179,181,184,187,191,194,197,200],{"class":41,"line":180},4,[39,182,183],{"class":57},"        needs:",[39,185,186],{"class":53}," [",[39,188,190],{"class":189},"sKc5r","\"GITHUB_TOKEN\"",[39,192,193],{"class":53},", ",[39,195,196],{"class":189},"\"LINEAR_API_KEY\"",[39,198,199],{"class":53},"],  ",[39,201,202],{"class":151},"\u002F\u002F documented as required\n",[39,204,206,209,211,214,216,219,222],{"class":41,"line":205},5,[39,207,208],{"class":57},"        pass:",[39,210,186],{"class":53},[39,212,213],{"class":189},"\"HOME\"",[39,215,193],{"class":53},[39,217,218],{"class":189},"\"PATH\"",[39,220,221],{"class":53},"],                      ",[39,223,224],{"class":151},"\u002F\u002F forwarded from host\n",[39,226,228,231,234,237,240,243],{"class":41,"line":227},6,[39,229,230],{"class":57},"        set:",[39,232,233],{"class":53}," { ",[39,235,236],{"class":57},"NODE_ENV:",[39,238,239],{"class":189}," \"production\"",[39,241,242],{"class":53}," },             ",[39,244,245],{"class":151},"\u002F\u002F static values\n",[39,247,249],{"class":41,"line":248},7,[39,250,251],{"class":53},"    },\n",[39,253,255],{"class":41,"line":254},8,[39,256,257],{"class":53},"})\n",[14,259,260,263,264,267],{},[18,261,262],{},"needs"," is documentation — it tells ",[18,265,266],{},"axon dev"," what to warn about if missing, and\nwhat gets listed when someone installs a published agent. It does not enforce presence\nat runtime.",[92,269,271],{"id":270},"in-cloud-deployments","In cloud deployments",[14,273,274,275,277,278,280,281,283],{},"Environment values from the agent project's ",[18,276,23],{}," are injected as environment variables\nat runtime. They appear in ",[18,279,5],{}," exactly as local ",[18,282,23],{}," keys do — the agent\nsource is identical between local and deployed. Values are not included in the\npublished source artifact or shown in deployment logs.",[285,286,287],"style",{},"html pre.shiki code .scz_3, html code.shiki .scz_3{--shiki-default:#569CD6}html pre.shiki code .s9McN, html code.shiki .s9McN{--shiki-default:#4FC1FF}html pre.shiki code .sTNBD, html code.shiki .sTNBD{--shiki-default:#D4D4D4}html pre.shiki code .s3F5K, html code.shiki .s3F5K{--shiki-default:#9CDCFE}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 pre.shiki code .sOLPB, html code.shiki .sOLPB{--shiki-default:#6A9955}html pre.shiki code .sYbnZ, html code.shiki .sYbnZ{--shiki-default:#C586C0}html pre.shiki code .sCudf, html code.shiki .sCudf{--shiki-default:#DCDCAA}html pre.shiki code .sKc5r, html code.shiki .sKc5r{--shiki-default:#CE9178}",{"title":35,"searchDepth":72,"depth":72,"links":289},[290,291,292],{"id":94,"depth":72,"text":95},{"id":140,"depth":72,"text":141},{"id":270,"depth":72,"text":271},"The capsule subprocess inherits the agent's environment. process.env contains every\nkey declared in the agent's .env file and resolved through axon.config.ts env\nconfiguration — available immediately, no imports required.","md",{},true,"\u002Fdocs\u002Fv2\u002Fapi\u002Fproc\u002Fenv",{"title":5,"description":293},"docs\u002Fv2\u002Fapi\u002Fproc\u002Fenv","DfCJcxVh7Sx_1PwCirybkzLrcO049waBoLRTdmYA7tM",1785671808340]