[{"data":1,"prerenderedAt":435},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fv2\u002Ffleet":3},{"id":4,"title":5,"body":6,"description":16,"extension":429,"meta":430,"navigation":107,"path":431,"seo":432,"stem":433,"__hash__":434},"docs\u002Fdocs\u002Fv2\u002Ffleet\u002Findex.md","Working with Agents",{"type":7,"value":8,"toc":420},"minimark",[9,13,17,215,218,223,230,233,242,246,256,262,268,275,279,294,298,305,320,329,332,341,350,359,368,371,380,389,398,407,410,416],[10,11,5],"h1",{"id":12},"working-with-agents",[14,15,16],"p",{},"Most of these docs describe one agent. This section is about more than one — running them\ntogether, how they talk, and how you debug a system made of several minds.",[18,19,24],"pre",{"className":20,"code":21,"language":22,"meta":23,"style":23},"language-ts shiki shiki-themes dark-plus","\u002F\u002F review.axon.ts\nconst { barry, checker } = await Fleet({\n    barry:   \"..\u002Fbarry\",\n    checker: \"..\u002Fchecker\",\n})\n\nconst review  = await barry.request(\"review the changes on this branch\")\nconst verdict = await checker.request(`is this review fair?\\n\\n${review.text}`)\n\nconsole.log(verdict.text)\n","ts","",[25,26,27,36,71,85,96,102,109,140,188,193],"code",{"__ignoreMap":23},[28,29,32],"span",{"class":30,"line":31},"line",1,[28,33,35],{"class":34},"sOLPB","\u002F\u002F review.axon.ts\n",[28,37,39,43,47,51,54,57,60,64,68],{"class":30,"line":38},2,[28,40,42],{"class":41},"scz_3","const",[28,44,46],{"class":45},"sTNBD"," { ",[28,48,50],{"class":49},"s9McN","barry",[28,52,53],{"class":45},", ",[28,55,56],{"class":49},"checker",[28,58,59],{"class":45}," } = ",[28,61,63],{"class":62},"sYbnZ","await",[28,65,67],{"class":66},"sCudf"," Fleet",[28,69,70],{"class":45},"({\n",[28,72,74,78,82],{"class":30,"line":73},3,[28,75,77],{"class":76},"s3F5K","    barry:",[28,79,81],{"class":80},"sKc5r","   \"..\u002Fbarry\"",[28,83,84],{"class":45},",\n",[28,86,88,91,94],{"class":30,"line":87},4,[28,89,90],{"class":76},"    checker:",[28,92,93],{"class":80}," \"..\u002Fchecker\"",[28,95,84],{"class":45},[28,97,99],{"class":30,"line":98},5,[28,100,101],{"class":45},"})\n",[28,103,105],{"class":30,"line":104},6,[28,106,108],{"emptyLinePlaceholder":107},true,"\n",[28,110,112,114,117,120,122,125,128,131,134,137],{"class":30,"line":111},7,[28,113,42],{"class":41},[28,115,116],{"class":49}," review",[28,118,119],{"class":45},"  = ",[28,121,63],{"class":62},[28,123,124],{"class":76}," barry",[28,126,127],{"class":45},".",[28,129,130],{"class":66},"request",[28,132,133],{"class":45},"(",[28,135,136],{"class":80},"\"review the changes on this branch\"",[28,138,139],{"class":45},")\n",[28,141,143,145,148,151,153,156,158,160,162,165,169,172,175,177,180,183,186],{"class":30,"line":142},8,[28,144,42],{"class":41},[28,146,147],{"class":49}," verdict",[28,149,150],{"class":45}," = ",[28,152,63],{"class":62},[28,154,155],{"class":76}," checker",[28,157,127],{"class":45},[28,159,130],{"class":66},[28,161,133],{"class":45},[28,163,164],{"class":80},"`is this review fair?",[28,166,168],{"class":167},"svVle","\\n\\n",[28,170,171],{"class":41},"${",[28,173,174],{"class":76},"review",[28,176,127],{"class":45},[28,178,179],{"class":76},"text",[28,181,182],{"class":41},"}",[28,184,185],{"class":80},"`",[28,187,139],{"class":45},[28,189,191],{"class":30,"line":190},9,[28,192,108],{"emptyLinePlaceholder":107},[28,194,196,199,201,204,206,209,211,213],{"class":30,"line":195},10,[28,197,198],{"class":76},"console",[28,200,127],{"class":45},[28,202,203],{"class":66},"log",[28,205,133],{"class":45},[28,207,208],{"class":76},"verdict",[28,210,127],{"class":45},[28,212,179],{"class":76},[28,214,139],{"class":45},[14,216,217],{},"Two agents, two policies, two toolsets, two isolated memories, in one ordinary TypeScript\nfile.",[219,220,222],"h2",{"id":221},"agents-are-whole-not-parts","Agents are whole, not parts",[14,224,225,226],{},"Everything here follows from one rule: ",[227,228,229],"strong",{},"an agent is a complete, bounded thing, and the\nonly way in or out is the stimulus protocol.",[14,231,232],{},"Agents never reach into each other — no subscribing to another's hooks, no reading its\nsession, no borrowing its tools. They boot independently and talk once they are up, the\nway two machines on a network do.",[14,234,235,236,241],{},"That constraint is what keeps every agent independently installable, deployable, and\nreplaceable. ",[237,238,240],"a",{"href":239},"\u002Fdocs\u002Fv2\u002Ffleet\u002Fboundary","The Boundary"," makes the case in full.",[219,243,245],{"id":244},"three-scales","Three scales",[14,247,248,251,252,255],{},[227,249,250],{},"A script boots them."," A ",[25,253,254],{},"*.axon.ts"," file constructs the agents it needs, composes them\nin plain TypeScript, and exits. The scratch form — start here.",[14,257,258,261],{},[227,259,260],{},"An agent orchestrates them."," When a workflow is worth publishing, deploying, or\nscheduling, it becomes an agent whose job is coordinating other agents.",[14,263,264,267],{},[227,265,266],{},"They run as a fleet."," Several agents live on your machine at once, each with its own\naddress, finding each other through the running directory.",[14,269,270,271,274],{},"All three are the same primitive: ",[25,272,273],{},"Axon()"," boots an agent and hands you a complete handle.\nWhat you build on top — a pipeline, a pool, a graph engine — is yours to write.",[219,276,278],{"id":277},"where-to-go-next","Where to go next",[14,280,281,282,285,286,289,290,293],{},"This section has three parts. ",[227,283,284],{},"Composition"," is agents in code. ",[227,287,288],{},"Management"," is agents\non your machine. ",[227,291,292],{},"Debugging"," is one run, in detail.",[295,296,284],"h3",{"id":297},"composition",[14,299,300,304],{},[227,301,302],{},[237,303,240],{"href":239}," — why agents only talk through stimuli.",[14,306,307,313,314,53,316,319],{},[227,308,309],{},[237,310,312],{"href":311},"\u002Fdocs\u002Fv2\u002Ffleet\u002Fcode","Agents in Code"," — ",[25,315,273],{},[25,317,318],{},"Fleet()",", and the script they live\nin.",[14,321,322,328],{},[227,323,324],{},[237,325,327],{"href":326},"\u002Fdocs\u002Fv2\u002Ffleet\u002Flifecycle","Lifecycle"," — how a reference becomes a running agent, and\nwhen it stops.",[295,330,288],{"id":331},"management",[14,333,334,340],{},[227,335,336],{},[237,337,339],{"href":338},"\u002Fdocs\u002Fv2\u002Ffleet\u002Fmanagement","Managing Agents"," — the editor surface: what can do work,\nand what needs doing.",[14,342,343,349],{},[227,344,345],{},[237,346,348],{"href":347},"\u002Fdocs\u002Fv2\u002Ffleet\u002Fmanagement\u002Finstances","Running Instances"," — everything alive on the\nmachine, whoever started it.",[14,351,352,358],{},[227,353,354],{},[237,355,357],{"href":356},"\u002Fdocs\u002Fv2\u002Ffleet\u002Fmanagement\u002Fassets","Assets"," — agents and prompts, as things you\ndispatch.",[14,360,361,367],{},[227,362,363],{},[237,364,366],{"href":365},"\u002Fdocs\u002Fv2\u002Ffleet\u002Fmanagement\u002Fjobs","Jobs"," — work as markdown files in your repo.",[295,369,292],{"id":370},"debugging",[14,372,373,379],{},[227,374,375],{},[237,376,378],{"href":377},"\u002Fdocs\u002Fv2\u002Ffleet\u002Fdebugging","Debugging in Code"," — session IDs, live entries, isolating\none agent.",[14,381,382,388],{},[227,383,384],{},[237,385,387],{"href":386},"\u002Fdocs\u002Fv2\u002Ffleet\u002Fdebugging\u002Fconsole","The Console"," — four panes over one run, live or\nfinished.",[14,390,391,397],{},[227,392,393],{},[237,394,396],{"href":395},"\u002Fdocs\u002Fv2\u002Ffleet\u002Fdebugging\u002Fengine","The Engine Pane"," — the exact document the model\nreceived.",[14,399,400,406],{},[227,401,402],{},[237,403,405],{"href":404},"\u002Fdocs\u002Fv2\u002Ffleet\u002Fdebugging\u002Ftrace","Trace & Events"," — where the time went, and what\npolicy stopped.",[408,409],"hr",{},[14,411,412,413,415],{},"Next: ",[237,414,240],{"href":239}," — the rule everything else follows from.",[417,418,419],"style",{},"html pre.shiki code .sOLPB, html code.shiki .sOLPB{--shiki-default:#6A9955}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 .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 .s3F5K, html code.shiki .s3F5K{--shiki-default:#9CDCFE}html pre.shiki code .sKc5r, html code.shiki .sKc5r{--shiki-default:#CE9178}html pre.shiki code .svVle, html code.shiki .svVle{--shiki-default:#D7BA7D}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);}",{"title":23,"searchDepth":38,"depth":38,"links":421},[422,423,424],{"id":221,"depth":38,"text":222},{"id":244,"depth":38,"text":245},{"id":277,"depth":38,"text":278,"children":425},[426,427,428],{"id":297,"depth":73,"text":284},{"id":331,"depth":73,"text":288},{"id":370,"depth":73,"text":292},"md",{},"\u002Fdocs\u002Fv2\u002Ffleet",{"title":5,"description":16},"docs\u002Fv2\u002Ffleet\u002Findex","WwEsJRhk9SW1q8giNUgmLklqIZLx9JaOuMek5X9jNGE",1786104361099]