[{"data":1,"prerenderedAt":499},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fv2\u002Ffleet\u002Fapi\u002Faxon":3},{"id":4,"title":5,"body":6,"description":492,"extension":493,"meta":494,"navigation":193,"path":495,"seo":496,"stem":497,"__hash__":498},"docs\u002Fdocs\u002Fv2\u002Ffleet\u002Fapi\u002Faxon.md","Axon()",{"type":7,"value":8,"toc":486},"minimark",[9,13,26,79,84,123,156,159,163,251,254,282,286,291,433,440,444,450,462,468,482],[10,11,5],"h1",{"id":12},"axon",[14,15,16,17,21,22,25],"p",{},"Boots one agent and returns its runtime. A global in every ",[18,19,20],"code",{},"*.axon.ts"," script —\n",[18,23,24],{},"axon exec"," binds it for the run, so nothing is imported.",[27,28,33],"pre",{"className":29,"code":30,"language":31,"meta":32,"style":32},"language-ts shiki shiki-themes dark-plus","const { axon: barry } = await Axon(\"..\u002Fbarry\")\n","ts","",[18,34,35],{"__ignoreMap":32},[36,37,40,44,48,51,54,58,61,65,69,72,76],"span",{"class":38,"line":39},"line",1,[36,41,43],{"class":42},"scz_3","const",[36,45,47],{"class":46},"sTNBD"," { ",[36,49,12],{"class":50},"s3F5K",[36,52,53],{"class":46},": ",[36,55,57],{"class":56},"s9McN","barry",[36,59,60],{"class":46}," } = ",[36,62,64],{"class":63},"sYbnZ","await",[36,66,68],{"class":67},"sCudf"," Axon",[36,70,71],{"class":46},"(",[36,73,75],{"class":74},"sKc5r","\"..\u002Fbarry\"",[36,77,78],{"class":46},")\n",[80,81,83],"h2",{"id":82},"signature","Signature",[27,85,87],{"className":29,"code":86,"language":31,"meta":32,"style":32},"function Axon(ref?: string): Promise\u003CAxonRuntime>\n",[18,88,89],{"__ignoreMap":32},[36,90,91,94,96,98,101,104,108,111,114,117,120],{"class":38,"line":39},[36,92,93],{"class":42},"function",[36,95,68],{"class":67},[36,97,71],{"class":46},[36,99,100],{"class":50},"ref",[36,102,103],{"class":46},"?: ",[36,105,107],{"class":106},"sNl3T","string",[36,109,110],{"class":46},"): ",[36,112,113],{"class":106},"Promise",[36,115,116],{"class":46},"\u003C",[36,118,119],{"class":106},"AxonRuntime",[36,121,122],{"class":46},">\n",[14,124,125,130,131,133,134,137,138,141,142,145,146,149,150,155],{},[126,127,128],"strong",{},[18,129,100],{}," — an agent reference: a path (",[18,132,75],{},", ",[18,135,136],{},"\"~\u002Fagents\u002Fdave\"","), a bare name\nresolved from watch paths (",[18,139,140],{},"\"scout\"","), or a registry package (",[18,143,144],{},"\"@axon\u002Fzeno\"",",\n",[18,147,148],{},"\"@axon\u002Fzeno@1.4.0\"","). See ",[151,152,154],"a",{"href":153},"\u002Fdocs\u002Fv2\u002Ffleet\u002Flifecycle","Lifecycle",".",[14,157,158],{},"Omitted, it walks up from the script and boots the agent folder it finds. Throws if\nthere is none.",[80,160,162],{"id":161},"the-returned-runtime","The returned runtime",[27,164,166],{"className":29,"code":165,"language":31,"meta":32,"style":32},"const runtime = await Axon(\"..\u002Fbarry\")\n\nruntime.axon        \u002F\u002F the agent handle — what you normally want\nruntime.blueprint   \u002F\u002F the resolved agent configuration\nruntime.session     \u002F\u002F the session log\nruntime.shutdown()  \u002F\u002F teardown (the CLI calls this for you)\n",[18,167,168,188,195,209,222,235],{"__ignoreMap":32},[36,169,170,172,175,178,180,182,184,186],{"class":38,"line":39},[36,171,43],{"class":42},[36,173,174],{"class":56}," runtime",[36,176,177],{"class":46}," = ",[36,179,64],{"class":63},[36,181,68],{"class":67},[36,183,71],{"class":46},[36,185,75],{"class":74},[36,187,78],{"class":46},[36,189,191],{"class":38,"line":190},2,[36,192,194],{"emptyLinePlaceholder":193},true,"\n",[36,196,198,201,203,205],{"class":38,"line":197},3,[36,199,200],{"class":50},"runtime",[36,202,155],{"class":46},[36,204,12],{"class":50},[36,206,208],{"class":207},"sOLPB","        \u002F\u002F the agent handle — what you normally want\n",[36,210,212,214,216,219],{"class":38,"line":211},4,[36,213,200],{"class":50},[36,215,155],{"class":46},[36,217,218],{"class":50},"blueprint",[36,220,221],{"class":207},"   \u002F\u002F the resolved agent configuration\n",[36,223,225,227,229,232],{"class":38,"line":224},5,[36,226,200],{"class":50},[36,228,155],{"class":46},[36,230,231],{"class":50},"session",[36,233,234],{"class":207},"     \u002F\u002F the session log\n",[36,236,238,240,242,245,248],{"class":38,"line":237},6,[36,239,200],{"class":50},[36,241,155],{"class":46},[36,243,244],{"class":67},"shutdown",[36,246,247],{"class":46},"()  ",[36,249,250],{"class":207},"\u002F\u002F teardown (the CLI calls this for you)\n",[14,252,253],{},"Destructure the handle on the way out and name it for this script:",[27,255,256],{"className":29,"code":30,"language":31,"meta":32,"style":32},[18,257,258],{"__ignoreMap":32},[36,259,260,262,264,266,268,270,272,274,276,278,280],{"class":38,"line":39},[36,261,43],{"class":42},[36,263,47],{"class":46},[36,265,12],{"class":50},[36,267,53],{"class":46},[36,269,57],{"class":56},[36,271,60],{"class":46},[36,273,64],{"class":63},[36,275,68],{"class":67},[36,277,71],{"class":46},[36,279,75],{"class":74},[36,281,78],{"class":46},[80,283,285],{"id":284},"the-handle","The handle",[14,287,288,290],{},[18,289,12],{}," is the same handle an agent-scoped script has as a global.",[27,292,294],{"className":29,"code":293,"language":31,"meta":32,"style":32},"await barry.request(input)       \u002F\u002F run to completion → { text, entries }\nbarry.stream(input)              \u002F\u002F live stream → { stream }\nawait barry.prompt(name, data)   \u002F\u002F render one of this agent's prompts\nbarry.tools.ns.fn(args)          \u002F\u002F call one of this agent's tools\nbarry.session.entries            \u002F\u002F this agent's entry log\nawait barry.update(partial)      \u002F\u002F hot-reload this agent\n",[18,295,296,319,338,365,395,411],{"__ignoreMap":32},[36,297,298,300,303,305,308,310,313,316],{"class":38,"line":39},[36,299,64],{"class":63},[36,301,302],{"class":50}," barry",[36,304,155],{"class":46},[36,306,307],{"class":67},"request",[36,309,71],{"class":46},[36,311,312],{"class":50},"input",[36,314,315],{"class":46},")       ",[36,317,318],{"class":207},"\u002F\u002F run to completion → { text, entries }\n",[36,320,321,323,325,328,330,332,335],{"class":38,"line":190},[36,322,57],{"class":50},[36,324,155],{"class":46},[36,326,327],{"class":67},"stream",[36,329,71],{"class":46},[36,331,312],{"class":50},[36,333,334],{"class":46},")              ",[36,336,337],{"class":207},"\u002F\u002F live stream → { stream }\n",[36,339,340,342,344,346,349,351,354,356,359,362],{"class":38,"line":197},[36,341,64],{"class":63},[36,343,302],{"class":50},[36,345,155],{"class":46},[36,347,348],{"class":67},"prompt",[36,350,71],{"class":46},[36,352,353],{"class":50},"name",[36,355,133],{"class":46},[36,357,358],{"class":50},"data",[36,360,361],{"class":46},")   ",[36,363,364],{"class":207},"\u002F\u002F render one of this agent's prompts\n",[36,366,367,369,371,374,376,379,381,384,386,389,392],{"class":38,"line":211},[36,368,57],{"class":50},[36,370,155],{"class":46},[36,372,373],{"class":50},"tools",[36,375,155],{"class":46},[36,377,378],{"class":50},"ns",[36,380,155],{"class":46},[36,382,383],{"class":67},"fn",[36,385,71],{"class":46},[36,387,388],{"class":50},"args",[36,390,391],{"class":46},")          ",[36,393,394],{"class":207},"\u002F\u002F call one of this agent's tools\n",[36,396,397,399,401,403,405,408],{"class":38,"line":224},[36,398,57],{"class":50},[36,400,155],{"class":46},[36,402,231],{"class":50},[36,404,155],{"class":46},[36,406,407],{"class":50},"entries",[36,409,410],{"class":207},"            \u002F\u002F this agent's entry log\n",[36,412,413,415,417,419,422,424,427,430],{"class":38,"line":237},[36,414,64],{"class":63},[36,416,302],{"class":50},[36,418,155],{"class":46},[36,420,421],{"class":67},"update",[36,423,71],{"class":46},[36,425,426],{"class":50},"partial",[36,428,429],{"class":46},")      ",[36,431,432],{"class":207},"\u002F\u002F hot-reload this agent\n",[14,434,435,436,155],{},"Full reference: ",[151,437,439],{"href":438},"\u002Fdocs\u002Fv2\u002Fapi","axon handle",[80,441,443],{"id":442},"notes","Notes",[14,445,446,449],{},[126,447,448],{},"Boot is not free."," A capsule subprocess starts, a session opens, and every declared\nmodule runs its setup. Boot once and reuse the handle.",[14,451,452,455,456,155],{},[126,453,454],{},"Instances are independent."," Booting the same agent twice gives two conversations —\nand runs its module setup twice. For several agents at once, use\n",[151,457,459],{"href":458},"\u002Fdocs\u002Fv2\u002Ffleet\u002Fapi\u002Ffleet",[18,460,461],{},"Fleet()",[14,463,464,467],{},[126,465,466],{},"Context is continuous."," Consecutive calls on one handle share full history. One\nagent is one conversation for the life of the handle.",[14,469,470,473,474,477,478,481],{},[126,471,472],{},"Shutdown is the CLI's."," ",[18,475,476],{},"axon run"," tears down everything the script booted, including\non failure. Call ",[18,479,480],{},"runtime.shutdown()"," yourself only when embedding Axon in a process you\nown.",[483,484,485],"style",{},"html pre.shiki code .scz_3, html code.shiki .scz_3{--shiki-default:#569CD6}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 .s9McN, html code.shiki .s9McN{--shiki-default:#4FC1FF}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}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 .sNl3T, html code.shiki .sNl3T{--shiki-default:#4EC9B0}html pre.shiki code .sOLPB, html code.shiki .sOLPB{--shiki-default:#6A9955}",{"title":32,"searchDepth":190,"depth":190,"links":487},[488,489,490,491],{"id":82,"depth":190,"text":83},{"id":161,"depth":190,"text":162},{"id":284,"depth":190,"text":285},{"id":442,"depth":190,"text":443},"Boots one agent and returns its runtime. A global in every *.axon.ts script —\naxon exec binds it for the run, so nothing is imported.","md",{},"\u002Fdocs\u002Fv2\u002Ffleet\u002Fapi\u002Faxon",{"title":5,"description":492},"docs\u002Fv2\u002Ffleet\u002Fapi\u002Faxon","ReilmK3ya62AGpnieDpbtE8ofAgulHoXAQ2T_Sz_c10",1786104361193]