[{"data":1,"prerenderedAt":264},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fv2\u002Fmodules\u002Foverview":3},{"id":4,"title":5,"body":6,"description":16,"extension":257,"meta":258,"navigation":259,"path":260,"seo":261,"stem":262,"__hash__":263},"docs\u002Fdocs\u002Fv2\u002Fmodules\u002Foverview.md","Modules",{"type":7,"value":8,"toc":251},"minimark",[9,13,17,31,36,39,47,50,54,91,94,175,187,191,194,234,237,241,244,247],[10,11,5],"h1",{"id":12},"modules",[14,15,16],"p",{},"A module is a packaged capability. Install one and your agent gains tools,\nprompts, and integrations it didn't have before — without writing the glue\nyourself.",[14,18,19,20,24,25,30],{},"This section is about ",[21,22,23],"strong",{},"building"," one. If you just want to use a module\nsomeone else published, that is one command and it is covered in\n",[26,27,29],"a",{"href":28},"\u002Fdocs\u002Fv2\u002Fecosystem\u002Finstalling","Installing"," — you never need to read any\nfurther than that.",[32,33,35],"h2",{"id":34},"when-you-need-one","When you need one",[14,37,38],{},"A module reaches into the agent's build step and lifecycle. That is real power,\nand it is real surface area: you are working with how the runtime loads things,\nnot just what it does.",[14,40,41,42,46],{},"Most people don't need that. If what you want to share is a task — an\ninstruction someone else can run — a\n",[26,43,45],{"href":44},"\u002Fdocs\u002Fv2\u002Fecosystem\u002Fprompts","prompt package"," is text, has no build step, and\npublishes in two commands.",[14,48,49],{},"Reach for a module when a prompt genuinely isn't enough: when you need to\ncontribute tools the agent can call, receive webhooks, or connect an external\nservice at boot.",[32,51,53],{"id":52},"create-one","Create one",[55,56,61],"pre",{"className":57,"code":58,"language":59,"meta":60,"style":60},"language-bash shiki shiki-themes dark-plus","axon module init my-module\ncd my-module\n","bash","",[62,63,64,83],"code",{"__ignoreMap":60},[65,66,69,73,77,80],"span",{"class":67,"line":68},"line",1,[65,70,72],{"class":71},"sCudf","axon",[65,74,76],{"class":75},"sKc5r"," module",[65,78,79],{"class":75}," init",[65,81,82],{"class":75}," my-module\n",[65,84,86,89],{"class":67,"line":85},2,[65,87,88],{"class":71},"cd",[65,90,82],{"class":75},[14,92,93],{},"That scaffolds the package, installs the framework, and generates its types:",[55,95,97],{"className":57,"code":96,"language":59,"meta":60,"style":60},"my-module\u002F\n├── server\u002F\n│   └── api\u002F          # webhook handlers for external events\n├── src\u002F\n│   ├── prompts\u002F      # context templates\n│   └── tools\u002F        # async functions the agent can call\n└── module.config.ts  # identity, env keys, what it contributes\n",[62,98,99,104,112,128,136,150,163],{"__ignoreMap":60},[65,100,101],{"class":67,"line":68},[65,102,103],{"class":71},"my-module\u002F\n",[65,105,106,109],{"class":67,"line":85},[65,107,108],{"class":71},"├──",[65,110,111],{"class":75}," server\u002F\n",[65,113,115,118,121,124],{"class":67,"line":114},3,[65,116,117],{"class":71},"│",[65,119,120],{"class":75},"   └──",[65,122,123],{"class":75}," api\u002F",[65,125,127],{"class":126},"sOLPB","          # webhook handlers for external events\n",[65,129,131,133],{"class":67,"line":130},4,[65,132,108],{"class":71},[65,134,135],{"class":75}," src\u002F\n",[65,137,139,141,144,147],{"class":67,"line":138},5,[65,140,117],{"class":71},[65,142,143],{"class":75},"   ├──",[65,145,146],{"class":75}," prompts\u002F",[65,148,149],{"class":126},"      # context templates\n",[65,151,153,155,157,160],{"class":67,"line":152},6,[65,154,117],{"class":71},[65,156,120],{"class":75},[65,158,159],{"class":75}," tools\u002F",[65,161,162],{"class":126},"        # async functions the agent can call\n",[65,164,166,169,172],{"class":67,"line":165},7,[65,167,168],{"class":71},"└──",[65,170,171],{"class":75}," module.config.ts",[65,173,174],{"class":126},"  # identity, env keys, what it contributes\n",[14,176,177,178,181,182,186],{},"Fill in ",[62,179,180],{},"module.config.ts",", write a tool, and\n",[26,183,185],{"href":184},"\u002Fdocs\u002Fv2\u002Fmodules\u002Fpublishing","publish it"," when it's ready.",[32,188,190],{"id":189},"what-a-module-can-contribute","What a module can contribute",[14,192,193],{},"Any combination of:",[195,196,197,208,218,228],"ul",{},[198,199,200,203,204,207],"li",{},[21,201,202],{},"Tools"," — async functions in ",[62,205,206],{},"src\u002Ftools\u002F"," the agent can call",[198,209,210,213,214,217],{},[21,211,212],{},"Prompts"," — context templates in ",[62,215,216],{},"src\u002Fprompts\u002F"," for use at hook subscription sites",[198,219,220,223,224,227],{},[21,221,222],{},"Routes"," — webhook handlers in ",[62,225,226],{},"server\u002Fapi\u002F"," that receive external events",[198,229,230,233],{},[21,231,232],{},"Setup"," — boot-time lifecycle code that connects external services and emits hooks",[14,235,236],{},"One thing a module cannot do: touch the managed runtime directly. Policy, sessions,\nthe cognitive loop — those belong to Axon and the parent agent. Modules extend through\ndefined extension points only.",[32,238,240],{"id":239},"the-boundary","The boundary",[14,242,243],{},"A module can add tools, hooks, and routes — it cannot replace the capsule or the loop.\nPolicy, sessions, the cognitive loop — those belong to Axon and the parent agent. Modules\nextend through defined extension points only.",[14,245,246],{},"That boundary is what makes registry modules safe to install. They augment. They do\nnot take over.",[248,249,250],"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 .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}",{"title":60,"searchDepth":85,"depth":85,"links":252},[253,254,255,256],{"id":34,"depth":85,"text":35},{"id":52,"depth":85,"text":53},{"id":189,"depth":85,"text":190},{"id":239,"depth":85,"text":240},"md",{},true,"\u002Fdocs\u002Fv2\u002Fmodules\u002Foverview",{"title":5,"description":16},"docs\u002Fv2\u002Fmodules\u002Foverview","r-yCCJCQVoAKN8PJ2el-RIVGC_AlPxLwxVuDy5CoJTk",1785671806674]