[{"data":1,"prerenderedAt":737},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fv2\u002Fgetting-started\u002Ffirst-agent":3},{"id":4,"title":5,"body":6,"description":16,"extension":731,"meta":732,"navigation":330,"path":733,"seo":734,"stem":735,"__hash__":736},"docs\u002Fdocs\u002Fv2\u002Fgetting-started\u002Ffirst-agent.md","Your First Agent",{"type":7,"value":8,"toc":724},"minimark",[9,13,17,35,40,43,46,51,81,84,199,202,206,212,300,303,307,314,411,414,641,662,665,669,672,684,693,697,709,720],[10,11,5],"h1",{"id":12},"your-first-agent",[14,15,16],"p",{},"When Axon boots it connects to a default agent — a general-purpose assistant with access\nto your filesystem and shell. You can start talking to it immediately.",[18,19,24],"pre",{"className":20,"code":21,"language":22,"meta":23,"style":23},"language-bash shiki shiki-themes dark-plus","axon\n","bash","",[25,26,27],"code",{"__ignoreMap":23},[28,29,32],"span",{"class":30,"line":31},"line",1,[28,33,21],{"class":34},"sCudf",[36,37],"terminal-image",{"alt":38,"src":39},"Axon TUI showing a connected agent ready for input with tool count and thread ID visible in the header","\u002Ftui\u002Femptyaxonconnectedtogpt55ready.webp",[14,41,42],{},"Ask it to read a file. Watch it call a tool, reason over the result, and respond. That\nloop — prompt, tool call, result, response — is what every agent you build will run on.\nYou're seeing the runtime in action before you've written a line.",[14,44,45],{},"When you're ready to build your own, keep going.",[47,48,50],"h2",{"id":49},"scaffold","Scaffold",[18,52,54],{"className":20,"code":53,"language":22,"meta":23,"style":23},"axon init my-agent\ncd my-agent\naxon\n",[25,55,56,68,76],{"__ignoreMap":23},[28,57,58,61,65],{"class":30,"line":31},[28,59,60],{"class":34},"axon",[28,62,64],{"class":63},"sKc5r"," init",[28,66,67],{"class":63}," my-agent\n",[28,69,71,74],{"class":30,"line":70},2,[28,72,73],{"class":34},"cd",[28,75,67],{"class":63},[28,77,79],{"class":30,"line":78},3,[28,80,21],{"class":34},[14,82,83],{},"This creates a real agent — not a stub. It boots, accepts sessions, and runs scripts out\nof the box. Open the folder and you'll see why:",[18,85,87],{"className":20,"code":86,"language":22,"meta":23,"style":23},"my-agent\u002F\n├── data\u002F            # durable storage and knowledge\n├── modules\u002F         # installed capabilities\n├── server\u002F\n│   └── api\u002F         # HTTP routes (optional)\n├── src\u002F\n│   ├── scripts\u002F     # automations that orchestrate work\n│   ├── tools\u002F       # what it can do\n│   └── boot.vue     # who the agent is\n└── axon.config.ts   # identity, engine, policy\n",[25,88,89,94,106,116,124,139,147,161,174,187],{"__ignoreMap":23},[28,90,91],{"class":30,"line":31},[28,92,93],{"class":34},"my-agent\u002F\n",[28,95,96,99,102],{"class":30,"line":70},[28,97,98],{"class":34},"├──",[28,100,101],{"class":63}," data\u002F",[28,103,105],{"class":104},"sOLPB","            # durable storage and knowledge\n",[28,107,108,110,113],{"class":30,"line":78},[28,109,98],{"class":34},[28,111,112],{"class":63}," modules\u002F",[28,114,115],{"class":104},"         # installed capabilities\n",[28,117,119,121],{"class":30,"line":118},4,[28,120,98],{"class":34},[28,122,123],{"class":63}," server\u002F\n",[28,125,127,130,133,136],{"class":30,"line":126},5,[28,128,129],{"class":34},"│",[28,131,132],{"class":63},"   └──",[28,134,135],{"class":63}," api\u002F",[28,137,138],{"class":104},"         # HTTP routes (optional)\n",[28,140,142,144],{"class":30,"line":141},6,[28,143,98],{"class":34},[28,145,146],{"class":63}," src\u002F\n",[28,148,150,152,155,158],{"class":30,"line":149},7,[28,151,129],{"class":34},[28,153,154],{"class":63},"   ├──",[28,156,157],{"class":63}," scripts\u002F",[28,159,160],{"class":104},"     # automations that orchestrate work\n",[28,162,164,166,168,171],{"class":30,"line":163},8,[28,165,129],{"class":34},[28,167,154],{"class":63},[28,169,170],{"class":63}," tools\u002F",[28,172,173],{"class":104},"       # what it can do\n",[28,175,177,179,181,184],{"class":30,"line":176},9,[28,178,129],{"class":34},[28,180,132],{"class":63},[28,182,183],{"class":63}," boot.vue",[28,185,186],{"class":104},"     # who the agent is\n",[28,188,190,193,196],{"class":30,"line":189},10,[28,191,192],{"class":34},"└──",[28,194,195],{"class":63}," axon.config.ts",[28,197,198],{"class":104},"   # identity, engine, policy\n",[14,200,201],{},"The agent is the folder. The runtime reads it at boot, discovers every tool and script,\nand wires everything up. You never register handlers or configure a server — you edit files.",[47,203,205],{"id":204},"give-it-a-personality","Give it a personality",[14,207,208,211],{},[25,209,210],{},"src\u002Fboot.vue"," is the agent's standing system prompt — rendered once at boot and present\nfor every session, every thread, every invocation. This is where the agent gets its\ncharacter.",[18,213,217],{"className":214,"code":215,"language":216,"meta":23,"style":23},"language-vue shiki shiki-themes dark-plus","\u003C!-- src\u002Fboot.vue -->\n\u003Ctemplate>\n    \u003Ch1>My Agent\u003C\u002Fh1>\n    \u003Cp>You are a coding assistant working in this repository.\u003C\u002Fp>\n    \u003Cp>You have access to the filesystem and can run shell commands.\u003C\u002Fp>\n\u003C\u002Ftemplate>\n","vue",[25,218,219,224,237,258,275,292],{"__ignoreMap":23},[28,220,221],{"class":30,"line":31},[28,222,223],{"class":104},"\u003C!-- src\u002Fboot.vue -->\n",[28,225,226,230,234],{"class":30,"line":70},[28,227,229],{"class":228},"srRes","\u003C",[28,231,233],{"class":232},"scz_3","template",[28,235,236],{"class":228},">\n",[28,238,239,242,244,247,251,254,256],{"class":30,"line":78},[28,240,241],{"class":228},"    \u003C",[28,243,10],{"class":232},[28,245,246],{"class":228},">",[28,248,250],{"class":249},"sTNBD","My Agent",[28,252,253],{"class":228},"\u003C\u002F",[28,255,10],{"class":232},[28,257,236],{"class":228},[28,259,260,262,264,266,269,271,273],{"class":30,"line":118},[28,261,241],{"class":228},[28,263,14],{"class":232},[28,265,246],{"class":228},[28,267,268],{"class":249},"You are a coding assistant working in this repository.",[28,270,253],{"class":228},[28,272,14],{"class":232},[28,274,236],{"class":228},[28,276,277,279,281,283,286,288,290],{"class":30,"line":126},[28,278,241],{"class":228},[28,280,14],{"class":232},[28,282,246],{"class":228},[28,284,285],{"class":249},"You have access to the filesystem and can run shell commands.",[28,287,253],{"class":228},[28,289,14],{"class":232},[28,291,236],{"class":228},[28,293,294,296,298],{"class":30,"line":141},[28,295,253],{"class":228},[28,297,233],{"class":232},[28,299,236],{"class":228},[14,301,302],{},"Edit this and the next session picks it up automatically. No restart, no rebuild.",[47,304,306],{"id":305},"give-it-something-to-do","Give it something to do",[14,308,309,310,313],{},"Tools are async TypeScript functions in ",[25,311,312],{},"src\u002Ftools\u002F",". Export a function and the agent can\ncall it — Axon reads the signatures and JSDoc at boot and hands them to the model as\ntyped, documented capabilities.",[18,315,319],{"className":316,"code":317,"language":318,"meta":23,"style":23},"language-ts shiki shiki-themes dark-plus","\u002F\u002F src\u002Ftools\u002Ffs.ts\n\n\u002F** Read a file from the repository. *\u002F\nexport async function readFile(path: string): Promise\u003Cstring> {\n    return Bun.file(path).text()\n}\n","ts",[25,320,321,326,332,337,379,406],{"__ignoreMap":23},[28,322,323],{"class":30,"line":31},[28,324,325],{"class":104},"\u002F\u002F src\u002Ftools\u002Ffs.ts\n",[28,327,328],{"class":30,"line":70},[28,329,331],{"emptyLinePlaceholder":330},true,"\n",[28,333,334],{"class":30,"line":78},[28,335,336],{"class":104},"\u002F** Read a file from the repository. *\u002F\n",[28,338,339,343,346,349,352,355,359,362,366,369,372,374,376],{"class":30,"line":118},[28,340,342],{"class":341},"sYbnZ","export",[28,344,345],{"class":232}," async",[28,347,348],{"class":232}," function",[28,350,351],{"class":34}," readFile",[28,353,354],{"class":249},"(",[28,356,358],{"class":357},"s3F5K","path",[28,360,361],{"class":249},": ",[28,363,365],{"class":364},"sNl3T","string",[28,367,368],{"class":249},"): ",[28,370,371],{"class":364},"Promise",[28,373,229],{"class":249},[28,375,365],{"class":364},[28,377,378],{"class":249},"> {\n",[28,380,381,384,387,390,393,395,397,400,403],{"class":30,"line":126},[28,382,383],{"class":341},"    return",[28,385,386],{"class":357}," Bun",[28,388,389],{"class":249},".",[28,391,392],{"class":34},"file",[28,394,354],{"class":249},[28,396,358],{"class":357},[28,398,399],{"class":249},").",[28,401,402],{"class":34},"text",[28,404,405],{"class":249},"()\n",[28,407,408],{"class":30,"line":141},[28,409,410],{"class":249},"}\n",[14,412,413],{},"Scripts orchestrate the work. They load context, call the agent, process results — and\nthey run identically from the terminal, the TUI, an HTTP route, or another script.",[18,415,417],{"className":316,"code":416,"language":318,"meta":23,"style":23},"\u002F\u002F src\u002Fscripts\u002Freview.ts\nconst { file } = defineArgs\u003C{ file: string }>()\n\nconst content = await axon.tools.fs.readFile(file)\nconst prompt = await axon.prompt(\"review\", { file, content })\n\nconst { stream } = axon.stream({ prompt })\n\nfor await (const entry of stream) {\n    if (entry.type === \"text\") process.stdout.write(entry.content)\n}\n",[25,418,419,424,453,457,495,532,536,560,564,589,636],{"__ignoreMap":23},[28,420,421],{"class":30,"line":31},[28,422,423],{"class":104},"\u002F\u002F src\u002Fscripts\u002Freview.ts\n",[28,425,426,429,432,435,438,441,444,446,448,450],{"class":30,"line":70},[28,427,428],{"class":232},"const",[28,430,431],{"class":249}," { ",[28,433,392],{"class":434},"s9McN",[28,436,437],{"class":249}," } = ",[28,439,440],{"class":34},"defineArgs",[28,442,443],{"class":249},"\u003C{ ",[28,445,392],{"class":357},[28,447,361],{"class":249},[28,449,365],{"class":364},[28,451,452],{"class":249}," }>()\n",[28,454,455],{"class":30,"line":78},[28,456,331],{"emptyLinePlaceholder":330},[28,458,459,461,464,467,470,473,475,478,480,483,485,488,490,492],{"class":30,"line":118},[28,460,428],{"class":232},[28,462,463],{"class":434}," content",[28,465,466],{"class":249}," = ",[28,468,469],{"class":341},"await",[28,471,472],{"class":357}," axon",[28,474,389],{"class":249},[28,476,477],{"class":357},"tools",[28,479,389],{"class":249},[28,481,482],{"class":357},"fs",[28,484,389],{"class":249},[28,486,487],{"class":34},"readFile",[28,489,354],{"class":249},[28,491,392],{"class":357},[28,493,494],{"class":249},")\n",[28,496,497,499,502,504,506,508,510,513,515,518,521,523,526,529],{"class":30,"line":126},[28,498,428],{"class":232},[28,500,501],{"class":434}," prompt",[28,503,466],{"class":249},[28,505,469],{"class":341},[28,507,472],{"class":357},[28,509,389],{"class":249},[28,511,512],{"class":34},"prompt",[28,514,354],{"class":249},[28,516,517],{"class":63},"\"review\"",[28,519,520],{"class":249},", { ",[28,522,392],{"class":357},[28,524,525],{"class":249},", ",[28,527,528],{"class":357},"content",[28,530,531],{"class":249}," })\n",[28,533,534],{"class":30,"line":141},[28,535,331],{"emptyLinePlaceholder":330},[28,537,538,540,542,545,547,549,551,553,556,558],{"class":30,"line":149},[28,539,428],{"class":232},[28,541,431],{"class":249},[28,543,544],{"class":434},"stream",[28,546,437],{"class":249},[28,548,60],{"class":357},[28,550,389],{"class":249},[28,552,544],{"class":34},[28,554,555],{"class":249},"({ ",[28,557,512],{"class":357},[28,559,531],{"class":249},[28,561,562],{"class":30,"line":163},[28,563,331],{"emptyLinePlaceholder":330},[28,565,566,569,572,575,577,580,583,586],{"class":30,"line":176},[28,567,568],{"class":341},"for",[28,570,571],{"class":341}," await",[28,573,574],{"class":249}," (",[28,576,428],{"class":232},[28,578,579],{"class":434}," entry",[28,581,582],{"class":232}," of",[28,584,585],{"class":357}," stream",[28,587,588],{"class":249},") {\n",[28,590,591,594,596,599,601,604,607,610,613,616,618,621,623,626,628,630,632,634],{"class":30,"line":189},[28,592,593],{"class":341},"    if",[28,595,574],{"class":249},[28,597,598],{"class":357},"entry",[28,600,389],{"class":249},[28,602,603],{"class":357},"type",[28,605,606],{"class":249}," === ",[28,608,609],{"class":63},"\"text\"",[28,611,612],{"class":249},") ",[28,614,615],{"class":357},"process",[28,617,389],{"class":249},[28,619,620],{"class":357},"stdout",[28,622,389],{"class":249},[28,624,625],{"class":34},"write",[28,627,354],{"class":249},[28,629,598],{"class":357},[28,631,389],{"class":249},[28,633,528],{"class":357},[28,635,494],{"class":249},[28,637,639],{"class":30,"line":638},11,[28,640,410],{"class":249},[18,642,644],{"className":20,"code":643,"language":22,"meta":23,"style":23},"axon run review --file src\u002Findex.ts\n",[25,645,646],{"__ignoreMap":23},[28,647,648,650,653,656,659],{"class":30,"line":31},[28,649,60],{"class":34},[28,651,652],{"class":63}," run",[28,654,655],{"class":63}," review",[28,657,658],{"class":232}," --file",[28,660,661],{"class":63}," src\u002Findex.ts\n",[14,663,664],{},"The agent boots, the script runs, the agent exits. Fast feedback — no session required.",[47,666,668],{"id":667},"ship-it","Ship it",[14,670,671],{},"When the agent is worth keeping around, one command puts it in the cloud:",[18,673,675],{"className":20,"code":674,"language":22,"meta":23,"style":23},"axon deploy\n",[25,676,677],{"__ignoreMap":23},[28,678,679,681],{"class":30,"line":31},[28,680,60],{"class":34},[28,682,683],{"class":63}," deploy\n",[14,685,686,687,692],{},"Public URL, API key, durable storage. The same folder you've been editing, now a live\nservice — nothing about it changes. ",[688,689,691],"a",{"href":690},"\u002Fdocs\u002Fv2\u002Fdeploy","Deploy"," covers the full story\nwhen you're ready.",[47,694,696],{"id":695},"where-to-go-from-here","Where to go from here",[14,698,699,703,704,708],{},[700,701,702],"strong",{},"Building"," — ",[688,705,707],{"href":706},"\u002Fdocs\u002Fv2\u002Fagent","Agent"," is the full authoring surface. Identity, tools,\nscripts, policy, and the server layer — with real code throughout.",[14,710,711,714,715,719],{},[700,712,713],{},"Using"," — the ",[688,716,718],{"href":717},"\u002Fdocs\u002Fv2\u002Ftui","TUI"," is the full reference for the terminal interface.\nSessions, model switching, the palette, pages.",[721,722,723],"style",{},"html pre.shiki code .sCudf, html code.shiki .sCudf{--shiki-default:#DCDCAA}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 .sKc5r, html code.shiki .sKc5r{--shiki-default:#CE9178}html pre.shiki code .sOLPB, html code.shiki .sOLPB{--shiki-default:#6A9955}html pre.shiki code .srRes, html code.shiki .srRes{--shiki-default:#808080}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 .sYbnZ, html code.shiki .sYbnZ{--shiki-default:#C586C0}html pre.shiki code .s3F5K, html code.shiki .s3F5K{--shiki-default:#9CDCFE}html pre.shiki code .sNl3T, html code.shiki .sNl3T{--shiki-default:#4EC9B0}html pre.shiki code .s9McN, html code.shiki .s9McN{--shiki-default:#4FC1FF}",{"title":23,"searchDepth":70,"depth":70,"links":725},[726,727,728,729,730],{"id":49,"depth":70,"text":50},{"id":204,"depth":70,"text":205},{"id":305,"depth":70,"text":306},{"id":667,"depth":70,"text":668},{"id":695,"depth":70,"text":696},"md",{},"\u002Fdocs\u002Fv2\u002Fgetting-started\u002Ffirst-agent",{"title":5,"description":16},"docs\u002Fv2\u002Fgetting-started\u002Ffirst-agent","7H7tkI3gx_4LkJLXo8DXOgIStQ7qQwt88G1KdOuqhgI",1785671807846]