[{"data":1,"prerenderedAt":648},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fv2\u002Fagent\u002Fdata":3},{"id":4,"title":5,"body":6,"description":639,"extension":640,"meta":641,"navigation":643,"path":644,"seo":645,"stem":646,"__hash__":647},"docs\u002Fdocs\u002Fv2\u002Fagent\u002Fdata.md","data\u002F",{"type":7,"value":8,"toc":630},"minimark",[9,13,20,97,107,112,121,223,226,230,233,293,299,310,314,317,365,371,375,378,418,430,433,437,440,470,480,545,558,562,565,596,599,603,618,626],[10,11,5],"h1",{"id":12},"data",[14,15,16,19],"p",{},[17,18,5],"code",{}," is the durable storage root for everything that grows, changes, or gets written\nduring execution — material the agent accumulates over time rather than authored behavior.",[21,22,27],"pre",{"className":23,"code":24,"language":25,"meta":26,"style":26},"language-bash shiki shiki-themes dark-plus","data\u002F\n├── knowledge\u002F      # reference material the agent reads\n├── modules\u002F        # module-managed persistent state\n├── sessions\u002F       # thread history — written by Axon\n├── state\u002F          # persistent working state across sessions\n└── workspace\u002F      # scratch space: cloned repos, working trees, temp output\n","bash","",[17,28,29,38,52,63,74,85],{"__ignoreMap":26},[30,31,34],"span",{"class":32,"line":33},"line",1,[30,35,37],{"class":36},"sCudf","data\u002F\n",[30,39,41,44,48],{"class":32,"line":40},2,[30,42,43],{"class":36},"├──",[30,45,47],{"class":46},"sKc5r"," knowledge\u002F",[30,49,51],{"class":50},"sOLPB","      # reference material the agent reads\n",[30,53,55,57,60],{"class":32,"line":54},3,[30,56,43],{"class":36},[30,58,59],{"class":46}," modules\u002F",[30,61,62],{"class":50},"        # module-managed persistent state\n",[30,64,66,68,71],{"class":32,"line":65},4,[30,67,43],{"class":36},[30,69,70],{"class":46}," sessions\u002F",[30,72,73],{"class":50},"       # thread history — written by Axon\n",[30,75,77,79,82],{"class":32,"line":76},5,[30,78,43],{"class":36},[30,80,81],{"class":46}," state\u002F",[30,83,84],{"class":50},"          # persistent working state across sessions\n",[30,86,88,91,94],{"class":32,"line":87},6,[30,89,90],{"class":36},"└──",[30,92,93],{"class":46}," workspace\u002F",[30,95,96],{"class":50},"      # scratch space: cloned repos, working trees, temp output\n",[14,98,99,100,103,104,106],{},"Keep the distinction clean: if a file tells the agent who it is or how to behave, it\nbelongs in ",[17,101,102],{},"src\u002F",". If a file is durable material the agent consults or writes during work,\nit belongs in ",[17,105,5],{},".",[108,109,111],"h2",{"id":110},"axon_home","AXON_HOME",[14,113,114,115,117,118,120],{},"Every capsule gets ",[17,116,111],{}," injected automatically — the absolute path to the agent's\nown directory. Use it to construct stable paths to ",[17,119,5],{}," from anywhere in your tools\nor scripts, regardless of what working directory the capsule happens to be in.",[21,122,126],{"className":123,"code":124,"language":125,"meta":26,"style":26},"language-ts shiki shiki-themes dark-plus","const dataPath = `${process.env.AXON_HOME}\u002Fdata`\nconst workspacePath = `${process.env.AXON_HOME}\u002Fdata\u002Fworkspace`\nconst statePath = `${process.env.AXON_HOME}\u002Fdata\u002Fstate`\n","ts",[17,127,128,167,195],{"__ignoreMap":26},[30,129,130,134,138,142,145,148,152,154,157,159,161,164],{"class":32,"line":33},[30,131,133],{"class":132},"scz_3","const",[30,135,137],{"class":136},"s9McN"," dataPath",[30,139,141],{"class":140},"sTNBD"," = ",[30,143,144],{"class":46},"`",[30,146,147],{"class":132},"${",[30,149,151],{"class":150},"s3F5K","process",[30,153,106],{"class":140},[30,155,156],{"class":150},"env",[30,158,106],{"class":140},[30,160,111],{"class":136},[30,162,163],{"class":132},"}",[30,165,166],{"class":46},"\u002Fdata`\n",[30,168,169,171,174,176,178,180,182,184,186,188,190,192],{"class":32,"line":40},[30,170,133],{"class":132},[30,172,173],{"class":136}," workspacePath",[30,175,141],{"class":140},[30,177,144],{"class":46},[30,179,147],{"class":132},[30,181,151],{"class":150},[30,183,106],{"class":140},[30,185,156],{"class":150},[30,187,106],{"class":140},[30,189,111],{"class":136},[30,191,163],{"class":132},[30,193,194],{"class":46},"\u002Fdata\u002Fworkspace`\n",[30,196,197,199,202,204,206,208,210,212,214,216,218,220],{"class":32,"line":54},[30,198,133],{"class":132},[30,200,201],{"class":136}," statePath",[30,203,141],{"class":140},[30,205,144],{"class":46},[30,207,147],{"class":132},[30,209,151],{"class":150},[30,211,106],{"class":140},[30,213,156],{"class":150},[30,215,106],{"class":140},[30,217,111],{"class":136},[30,219,163],{"class":132},[30,221,222],{"class":46},"\u002Fdata\u002Fstate`\n",[14,224,225],{},"This means agents always know where home is — in local dev, in deployment, across reboots.",[108,227,229],{"id":228},"knowledge","knowledge\u002F",[14,231,232],{},"Reference material the agent can read. Commit anything here that should be available\nacross sessions: architecture docs, API contracts, codebase conventions, runbooks,\ndecision logs.",[21,234,236],{"className":23,"code":235,"language":25,"meta":26,"style":26},"data\u002Fknowledge\u002F\n├── decisions\u002F\n│   ├── 2025-05-auth-flow.md\n│   └── 2025-06-db-schema.md\n├── api-contracts.md\n├── architecture.md\n└── conventions.md\n",[17,237,238,243,250,261,271,278,285],{"__ignoreMap":26},[30,239,240],{"class":32,"line":33},[30,241,242],{"class":36},"data\u002Fknowledge\u002F\n",[30,244,245,247],{"class":32,"line":40},[30,246,43],{"class":36},[30,248,249],{"class":46}," decisions\u002F\n",[30,251,252,255,258],{"class":32,"line":54},[30,253,254],{"class":36},"│",[30,256,257],{"class":46},"   ├──",[30,259,260],{"class":46}," 2025-05-auth-flow.md\n",[30,262,263,265,268],{"class":32,"line":65},[30,264,254],{"class":36},[30,266,267],{"class":46},"   └──",[30,269,270],{"class":46}," 2025-06-db-schema.md\n",[30,272,273,275],{"class":32,"line":76},[30,274,43],{"class":36},[30,276,277],{"class":46}," api-contracts.md\n",[30,279,280,282],{"class":32,"line":87},[30,281,43],{"class":36},[30,283,284],{"class":46}," architecture.md\n",[30,286,288,290],{"class":32,"line":287},7,[30,289,90],{"class":36},[30,291,292],{"class":46}," conventions.md\n",[14,294,295,296,298],{},"The agent doesn't automatically read everything in ",[17,297,229],{}," — a prompt or script\ndirects it to read specific files when relevant. The value is having authoritative\nreference material on disk, in the repo, versioned with the codebase.",[14,300,301,302,305,306,309],{},"In the ",[17,303,304],{},".agents\u002F"," workspace layer, ",[17,307,308],{},"data\u002Fknowledge\u002F"," is the canonical location for\nproject-level reference material shared across all agents in the repo.",[108,311,313],{"id":312},"sessions","sessions\u002F",[14,315,316],{},"Written entirely by Axon. Thread logs, conversation history, and continuity data live\nhere, organised by session and thread ID.",[21,318,320],{"className":23,"code":319,"language":25,"meta":26,"style":26},"data\u002Fsessions\u002F\n└── \u003Csession-id>\u002F\n    └── threads\u002F\n        └── \u003Cthread-id>\u002F\n",[17,321,322,327,343,351],{"__ignoreMap":26},[30,323,324],{"class":32,"line":33},[30,325,326],{"class":36},"data\u002Fsessions\u002F\n",[30,328,329,331,334,337,340],{"class":32,"line":40},[30,330,90],{"class":36},[30,332,333],{"class":140}," \u003C",[30,335,336],{"class":46},"session-i",[30,338,339],{"class":140},"d>",[30,341,342],{"class":46},"\u002F\n",[30,344,345,348],{"class":32,"line":54},[30,346,347],{"class":36},"    └──",[30,349,350],{"class":46}," threads\u002F\n",[30,352,353,356,358,361,363],{"class":32,"line":65},[30,354,355],{"class":36},"        └──",[30,357,333],{"class":140},[30,359,360],{"class":46},"thread-i",[30,362,339],{"class":140},[30,364,342],{"class":46},[14,366,367,368,370],{},"Don't write to ",[17,369,313],{}," manually. Don't depend on its internal structure in your code.\nAxon manages it — the format may change between versions.",[108,372,374],{"id":373},"state","state\u002F",[14,376,377],{},"Persistent working state the agent writes and reads across sessions. Use this for anything\nthat needs to survive a reboot but isn't reference material — scan results, open proposals,\nsync cursors, computed summaries.",[21,379,381],{"className":23,"code":380,"language":25,"meta":26,"style":26},"data\u002Fstate\u002F\n├── coverage.json       # last known coverage snapshot\n├── last-run.json       # metadata about the last execution\n└── proposals.json      # open proposals awaiting human review\n",[17,382,383,388,398,408],{"__ignoreMap":26},[30,384,385],{"class":32,"line":33},[30,386,387],{"class":36},"data\u002Fstate\u002F\n",[30,389,390,392,395],{"class":32,"line":40},[30,391,43],{"class":36},[30,393,394],{"class":46}," coverage.json",[30,396,397],{"class":50},"       # last known coverage snapshot\n",[30,399,400,402,405],{"class":32,"line":54},[30,401,43],{"class":36},[30,403,404],{"class":46}," last-run.json",[30,406,407],{"class":50},"       # metadata about the last execution\n",[30,409,410,412,415],{"class":32,"line":65},[30,411,90],{"class":36},[30,413,414],{"class":46}," proposals.json",[30,416,417],{"class":50},"      # open proposals awaiting human review\n",[14,419,420,421,423,424,426,427,429],{},"Unlike ",[17,422,313],{}," (managed by Axon) and ",[17,425,229],{}," (written by humans), ",[17,428,374],{}," is\nowned by the agent. It reads and writes it freely as part of its work.",[14,431,432],{},"The human can inspect it at any time — keep it in plain JSON or Markdown so it's readable\nwithout tooling.",[108,434,436],{"id":435},"workspace","workspace\u002F",[14,438,439],{},"The agent's scratch space. Clone repos here, check out working trees, write intermediate\noutput, run builds. Anything that needs a real filesystem path during a work session.",[21,441,443],{"className":23,"code":442,"language":25,"meta":26,"style":26},"data\u002Fworkspace\u002F\n├── audit-output\u002F       # intermediate files from a multi-step run\n└── my-target-repo\u002F     # cloned for the current task\n",[17,444,445,450,460],{"__ignoreMap":26},[30,446,447],{"class":32,"line":33},[30,448,449],{"class":36},"data\u002Fworkspace\u002F\n",[30,451,452,454,457],{"class":32,"line":40},[30,453,43],{"class":36},[30,455,456],{"class":46}," audit-output\u002F",[30,458,459],{"class":50},"       # intermediate files from a multi-step run\n",[30,461,462,464,467],{"class":32,"line":54},[30,463,90],{"class":36},[30,465,466],{"class":46}," my-target-repo\u002F",[30,468,469],{"class":50},"     # cloned for the current task\n",[14,471,472,473,476,477,479],{},"Think of it as the agent's equivalent of a developer's ",[17,474,475],{},"~\u002Fprojects\u002F"," — a place to put\nthings being actively worked on. Use ",[17,478,111],{}," to anchor paths here:",[21,481,483],{"className":123,"code":482,"language":125,"meta":26,"style":26},"const repoPath = `${process.env.AXON_HOME}\u002Fdata\u002Fworkspace\u002Fmy-target-repo`\nawait process.run(`git clone https:\u002F\u002Fgithub.com\u002Forg\u002Frepo ${repoPath}`)\n",[17,484,485,513],{"__ignoreMap":26},[30,486,487,489,492,494,496,498,500,502,504,506,508,510],{"class":32,"line":33},[30,488,133],{"class":132},[30,490,491],{"class":136}," repoPath",[30,493,141],{"class":140},[30,495,144],{"class":46},[30,497,147],{"class":132},[30,499,151],{"class":150},[30,501,106],{"class":140},[30,503,156],{"class":150},[30,505,106],{"class":140},[30,507,111],{"class":136},[30,509,163],{"class":132},[30,511,512],{"class":46},"\u002Fdata\u002Fworkspace\u002Fmy-target-repo`\n",[30,514,515,519,522,524,527,530,533,535,538,540,542],{"class":32,"line":40},[30,516,518],{"class":517},"sYbnZ","await",[30,520,521],{"class":150}," process",[30,523,106],{"class":140},[30,525,526],{"class":36},"run",[30,528,529],{"class":140},"(",[30,531,532],{"class":46},"`git clone https:\u002F\u002Fgithub.com\u002Forg\u002Frepo ",[30,534,147],{"class":132},[30,536,537],{"class":150},"repoPath",[30,539,163],{"class":132},[30,541,144],{"class":46},[30,543,544],{"class":140},")\n",[14,546,547,549,550,552,553,555,556,106],{},[17,548,436],{}," is not committed. It's ephemeral relative to ",[17,551,5],{}," as a whole — the agent\ncan treat it as a temp dir that persists across sessions but is safe to delete and\nregenerate. Don't put anything irreplaceable here; put irreplaceable output in ",[17,554,374],{},"\nor ",[17,557,229],{},[108,559,561],{"id":560},"modules","modules\u002F",[14,563,564],{},"Module-managed persistent state, namespaced by module name. If an installed module needs\nto persist data — a cache, a sync cursor, indexed content — it writes here.",[21,566,568],{"className":23,"code":567,"language":25,"meta":26,"style":26},"data\u002Fmodules\u002F\n└── @axon\u002F\n    └── github\u002F\n        └── webhook-cursor.json\n",[17,569,570,575,582,589],{"__ignoreMap":26},[30,571,572],{"class":32,"line":33},[30,573,574],{"class":36},"data\u002Fmodules\u002F\n",[30,576,577,579],{"class":32,"line":40},[30,578,90],{"class":36},[30,580,581],{"class":46}," @axon\u002F\n",[30,583,584,586],{"class":32,"line":54},[30,585,347],{"class":36},[30,587,588],{"class":46}," github\u002F\n",[30,590,591,593],{"class":32,"line":65},[30,592,355],{"class":36},[30,594,595],{"class":46}," webhook-cursor.json\n",[14,597,598],{},"Each module owns its subdirectory. Don't write to another module's namespace.",[108,600,602],{"id":601},"persistence-in-deployment","Persistence in deployment",[14,604,605,606,608,609,611,612,614,615,617],{},"In local agents, ",[17,607,5],{}," is files on disk. In deployed agents on Axon Cloud, ",[17,610,5],{}," is\nbacked by durable storage — every write the agent makes inside ",[17,613,5],{}," persists across\nrestarts and redeployments. Self-hosted deployments need to mount persistent storage to\nthe ",[17,616,5],{}," directory to get the same behaviour.",[14,619,620,621,623,624,106],{},"Anything written outside ",[17,622,5],{}," during execution is ephemeral in deployed environments.\nWrite durable output to ",[17,625,5],{},[627,628,629],"style",{},"html pre.shiki code .sCudf, html code.shiki .sCudf{--shiki-default:#DCDCAA}html pre.shiki code .sKc5r, html code.shiki .sKc5r{--shiki-default:#CE9178}html pre.shiki code .sOLPB, html code.shiki .sOLPB{--shiki-default:#6A9955}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 .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 pre.shiki code .sYbnZ, html code.shiki .sYbnZ{--shiki-default:#C586C0}",{"title":26,"searchDepth":40,"depth":40,"links":631},[632,633,634,635,636,637,638],{"id":110,"depth":40,"text":111},{"id":228,"depth":40,"text":229},{"id":312,"depth":40,"text":313},{"id":373,"depth":40,"text":374},{"id":435,"depth":40,"text":436},{"id":560,"depth":40,"text":561},{"id":601,"depth":40,"text":602},"data\u002F is the durable storage root for everything that grows, changes, or gets written\nduring execution — material the agent accumulates over time rather than authored behavior.","md",{"icon":642},"vscode-icons:default-folder",true,"\u002Fdocs\u002Fv2\u002Fagent\u002Fdata",{"title":5,"description":639},"docs\u002Fv2\u002Fagent\u002Fdata","9_fd-CXvs_GSLdS_5R1_05HHGAl2b0RpqR2ZmgQTdOw",1785671805828]