[{"data":1,"prerenderedAt":595},["ShallowReactive",2],{"navigation_docs":3,"-guide-codebase-structure":168,"-guide-codebase-structure-surround":591},[4,146],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":36},"Guide","i-lucide-book-open","\u002Fguide","1.guide",[10,14,37,55,59,63,67,71,75,79,83,87,109,134,138,142],{"title":11,"path":12,"stem":13},"What is Agent Zero?","\u002Fguide\u002Fintroduction","1.guide\u002F1.introduction",{"title":15,"icon":16,"path":17,"stem":18,"children":19,"page":36},"API","i-lucide-plug","\u002Fguide\u002Fapi","1.guide\u002F10.api",[20,24,28,32],{"title":21,"path":22,"stem":23},"API overview","\u002Fguide\u002Fapi\u002Foverview","1.guide\u002F10.api\u002F1.overview",{"title":25,"path":26,"stem":27},"Define endpoints","\u002Fguide\u002Fapi\u002Fdefine-endpoints","1.guide\u002F10.api\u002F2.define-endpoints",{"title":29,"path":30,"stem":31},"Use the API from a client","\u002Fguide\u002Fapi\u002Fuse-from-client","1.guide\u002F10.api\u002F3.use-from-client",{"title":33,"path":34,"stem":35},"Protect endpoints","\u002Fguide\u002Fapi\u002Fprotect-endpoints","1.guide\u002F10.api\u002F4.protect-endpoints",false,{"title":38,"icon":39,"path":40,"stem":41,"children":42,"page":36},"Authentication","i-lucide-lock","\u002Fguide\u002Fauthentication","1.guide\u002F11.authentication",[43,47,51],{"title":44,"path":45,"stem":46},"Authentication overview","\u002Fguide\u002Fauthentication\u002Foverview","1.guide\u002F11.authentication\u002F1.overview",{"title":48,"path":49,"stem":50},"GitHub OAuth","\u002Fguide\u002Fauthentication\u002Foauth","1.guide\u002F11.authentication\u002F2.oauth",{"title":52,"path":53,"stem":54},"Permissions","\u002Fguide\u002Fauthentication\u002Fpermissions","1.guide\u002F11.authentication\u002F3.permissions",{"title":56,"path":57,"stem":58},"Organizations","\u002Fguide\u002Forganizations","1.guide\u002F12.organizations",{"title":60,"path":61,"stem":62},"Frontend","\u002Fguide\u002Ffrontend","1.guide\u002F13.frontend",{"title":64,"path":65,"stem":66},"Mails","\u002Fguide\u002Fmails","1.guide\u002F14.mails",{"title":68,"path":69,"stem":70},"Internationalization","\u002Fguide\u002Finternationalization","1.guide\u002F15.internationalization",{"title":72,"path":73,"stem":74},"Deployment","\u002Fguide\u002Fdeployment","1.guide\u002F16.deployment",{"title":76,"path":77,"stem":78},"Tech stack","\u002Fguide\u002Ftech-stack","1.guide\u002F2.tech-stack",{"title":80,"path":81,"stem":82},"Installation","\u002Fguide\u002Finstallation","1.guide\u002F3.installation",{"title":84,"path":85,"stem":86},"Environment variables","\u002Fguide\u002Fenvironment-variables","1.guide\u002F4.environment-variables",{"title":88,"icon":89,"path":90,"stem":91,"children":92,"page":36},"Codebase","i-lucide-folder-tree","\u002Fguide\u002Fcodebase","1.guide\u002F5.codebase",[93,97,101,105],{"title":94,"path":95,"stem":96},"Codebase structure","\u002Fguide\u002Fcodebase\u002Fstructure","1.guide\u002F5.codebase\u002F1.structure",{"title":98,"path":99,"stem":100},"Dependencies","\u002Fguide\u002Fcodebase\u002Fdependencies","1.guide\u002F5.codebase\u002F2.dependencies",{"title":102,"path":103,"stem":104},"Formatting and linting","\u002Fguide\u002Fcodebase\u002Fformatting-linting","1.guide\u002F5.codebase\u002F3.formatting-linting",{"title":106,"path":107,"stem":108},"Agent Skills","\u002Fguide\u002Fcodebase\u002Fagent-skills","1.guide\u002F5.codebase\u002F4.agent-skills",{"title":110,"icon":111,"path":112,"stem":113,"children":114,"page":36},"Architecture","i-lucide-layers","\u002Fguide\u002Farchitecture","1.guide\u002F6.architecture",[115,118,122,126,130],{"title":110,"path":116,"stem":117},"\u002Fguide\u002Farchitecture\u002Foverview","1.guide\u002F6.architecture\u002F1.overview",{"title":119,"path":120,"stem":121},"State machine","\u002Fguide\u002Farchitecture\u002Fstate-machine","1.guide\u002F6.architecture\u002F2.state-machine",{"title":123,"path":124,"stem":125},"Execution boundary","\u002Fguide\u002Farchitecture\u002Fexecution-boundary","1.guide\u002F6.architecture\u002F3.execution-boundary",{"title":127,"path":128,"stem":129},"Issue-to-PR workflow","\u002Fguide\u002Farchitecture\u002Fissue-to-pr","1.guide\u002F6.architecture\u002F4.issue-to-pr",{"title":131,"path":132,"stem":133},"Adding a capability","\u002Fguide\u002Farchitecture\u002Fadding-a-capability","1.guide\u002F6.architecture\u002F5.adding-a-capability",{"title":135,"path":136,"stem":137},"Repository policy","\u002Fguide\u002Fconfiguration","1.guide\u002F7.configuration",{"title":139,"path":140,"stem":141},"Safety model","\u002Fguide\u002Fsafety","1.guide\u002F8.safety",{"title":143,"path":144,"stem":145},"Database","\u002Fguide\u002Fdatabase","1.guide\u002F9.database",{"title":147,"icon":148,"path":149,"stem":150,"children":151,"page":36},"Reference","i-lucide-book-marked","\u002Freference","2.reference",[152,156,160,164],{"title":153,"path":154,"stem":155},"CLI","\u002Freference\u002Fcli","2.reference\u002F1.cli",{"title":157,"path":158,"stem":159},"Model providers","\u002Freference\u002Fmodel-providers","2.reference\u002F2.model-providers",{"title":161,"path":162,"stem":163},"Source-control providers","\u002Freference\u002Fsource-control-providers","2.reference\u002F3.source-control-providers",{"title":165,"path":166,"stem":167},"Sandbox providers","\u002Freference\u002Fsandbox-providers","2.reference\u002F4.sandbox-providers",{"id":169,"title":94,"body":170,"description":584,"extension":585,"links":586,"meta":587,"navigation":588,"path":95,"seo":589,"stem":96,"__hash__":590},"docs\u002F1.guide\u002F5.codebase\u002F1.structure.md",{"type":171,"value":172,"toc":578},"minimark",[173,203,213,218,418,422,425,455,461,465],[174,175,176,177,184,185,190,191,184,195,198,199,202],"p",{},"Agent Zero is a dependency-directed monorepo managed with ",[178,179,183],"a",{"href":180,"rel":181},"https:\u002F\u002Fturborepo.dev",[182],"nofollow","Turborepo"," and ",[178,186,189],{"href":187,"rel":188},"https:\u002F\u002Faube.jdx.dev",[182],"aube",". Workspaces live under ",[192,193,194],"code",{},"apps\u002F*",[192,196,197],{},"packages\u002F*"," (declared in ",[192,200,201],{},"pnpm-workspace.yaml",").",[204,205,211],"pre",{"className":206,"code":208,"language":209,"meta":210},[207],"language-text","agent-zero\n├── apps\n│   ├── dashboard        # the single deployable app (Nuxt)\n│   ├── docs             # this documentation site (Docus)\n│   └── mail-preview     # dev-only Maizzle preview for packages\u002Fmail templates\n├── packages\n│   ├── agent            # orchestration and state transitions\n│   ├── api              # oRPC router and control-plane operations\n│   ├── auth             # authentication policy and Better Auth options factory\n│   ├── cli              # argument parsing and terminal presentation\n│   ├── config           # configuration parsing and policy\n│   ├── database         # the schema, the Drizzle client, and the migrations\n│   ├── i18n             # locale definitions and translation tooling\n│   ├── mail             # transactional email templates and providers\n│   ├── models           # model-provider abstractions\n│   ├── runner           # the only boundary that executes commands\n│   ├── shared           # stable cross-package contracts\n│   └── source-control   # provider-neutral source-control contracts and adapters\n├── docs                 # canonical architecture and provider references\n├── scripts              # repository checks and the shared tsdown config\n└── .skills              # Agent Skills for coding agents\n","text","",[192,212,208],{"__ignoreMap":210},[214,215,217],"h2",{"id":216},"package-responsibilities","Package responsibilities",[219,220,221,234],"table",{},[222,223,224],"thead",{},[225,226,227,231],"tr",{},[228,229,230],"th",{},"Package",[228,232,233],{},"Responsibility",[235,236,237,248,258,272,282,296,306,320,330,343,353,363,373,395,405],"tbody",{},[225,238,239,245],{},[240,241,242],"td",{},[192,243,244],{},"packages\u002Fagent",[240,246,247],{},"Orchestration and state transitions only. Knows nothing of HTTP or terminals.",[225,249,250,255],{},[240,251,252],{},[192,253,254],{},"packages\u002Frunner",[240,256,257],{},"The only boundary allowed to execute repository commands or mutate a checkout.",[225,259,260,265],{},[240,261,262],{},[192,263,264],{},"packages\u002Fmodels",[240,266,267,268,271],{},"Model-provider abstractions: one ",[192,269,270],{},"ModelProvider"," contract over OpenAI, Anthropic, Google, AI Gateway, and OpenAI-compatible endpoints.",[225,273,274,279],{},[240,275,276],{},[192,277,278],{},"packages\u002Fsource-control",[240,280,281],{},"Provider-neutral source-control contracts, with GitHub, GitLab, Bitbucket, and Gitea adapters underneath.",[225,283,284,289],{},[240,285,286],{},[192,287,288],{},"packages\u002Fconfig",[240,290,291,292,295],{},"Configuration parsing and policy for ",[192,293,294],{},".agent-zero.yml",".",[225,297,298,303],{},[240,299,300],{},[192,301,302],{},"packages\u002Fshared",[240,304,305],{},"Stable cross-package contracts. Zero dependencies; must not import feature packages.",[225,307,308,313],{},[240,309,310],{},[192,311,312],{},"packages\u002Fcli",[240,314,315,316,319],{},"Argument parsing and terminal presentation for the ",[192,317,318],{},"zero"," binary.",[225,321,322,327],{},[240,323,324],{},[192,325,326],{},"packages\u002Fdatabase",[240,328,329],{},"The schema, the Drizzle client, and the checked-in migrations. The only package that talks to Postgres. No policy, no HTTP, no runtime imports.",[225,331,332,337],{},[240,333,334],{},[192,335,336],{},"packages\u002Fauth",[240,338,339,340,342],{},"Authentication policy and the Better Auth options factory. Reads the store through ",[192,341,326],{},". No HTTP server, no runtime imports.",[225,344,345,350],{},[240,346,347],{},[192,348,349],{},"packages\u002Fapi",[240,351,352],{},"The oRPC router and control-plane operations. The only package that composes the runtime, source-control, models, and config adapters into one API surface. Holds no HTTP host of its own.",[225,354,355,360],{},[240,356,357],{},[192,358,359],{},"packages\u002Fi18n",[240,361,362],{},"Locale definitions (English, Italian) plus translation status tooling.",[225,364,365,370],{},[240,366,367],{},[192,368,369],{},"packages\u002Fmail",[240,371,372],{},"Maizzle-based transactional email templates and delivery providers.",[225,374,375,380],{},[240,376,377],{},[192,378,379],{},"apps\u002Fdashboard",[240,381,382,383,386,387,390,391,394],{},"The single deployable app and composition root: UI, ",[192,384,385],{},"\u002Frpc\u002F**"," + ",[192,388,389],{},"\u002Fapi\u002Fv1\u002F**",", ",[192,392,393],{},"\u002Fapi\u002Fauth\u002F**",", and the only persistence layer.",[225,396,397,402],{},[240,398,399],{},[192,400,401],{},"apps\u002Fdocs",[240,403,404],{},"This documentation site.",[225,406,407,412],{},[240,408,409],{},[192,410,411],{},"apps\u002Fmail-preview",[240,413,414,415,417],{},"Dev-only Maizzle preview server for ",[192,416,369],{}," templates. Not deployed.",[214,419,421],{"id":420},"dependency-direction","Dependency direction",[174,423,424],{},"The core decides what should happen; adapters decide how external systems communicate with it; the runner controls what is allowed to happen to a checkout.",[426,427,428,436,442,450],"ul",{},[429,430,431,432,295],"li",{},"Adapters depend on the runtime; ",[433,434,435],"strong",{},"the runtime must not depend on adapters",[429,437,438,441],{},[192,439,440],{},"shared"," contains stable data contracts and must not import feature packages.",[429,443,444,446,447,295],{},[192,445,349],{}," may depend on the runtime, source-control, models, and config packages; none of them may depend on it. It does not depend on ",[192,448,449],{},"auth",[429,451,452,454],{},[192,453,379],{}," is the composition root and the only component with HTTP capability and a database connection.",[174,456,457,458,295],{},"If a change would create a reverse dependency, move the shared contract inward instead of importing an adapter into the runtime. The full rules live in ",[178,459,460],{"href":116},"Architecture overview",[214,462,464],{"id":463},"choose-the-right-package","Choose the right package",[219,466,467,477],{},[222,468,469],{},[225,470,471,474],{},[228,472,473],{},"Change",[228,475,476],{},"Location",[235,478,479,488,497,506,515,524,533,542,551,560,569],{},[225,480,481,484],{},[240,482,483],{},"Agent lifecycle and decisions",[240,485,486],{},[192,487,244],{},[225,489,490,493],{},[240,491,492],{},"Commands and repository mutation",[240,494,495],{},[192,496,254],{},[225,498,499,502],{},[240,500,501],{},"LLM providers",[240,503,504],{},[192,505,264],{},[225,507,508,511],{},[240,509,510],{},"Source-control provider adapters",[240,512,513],{},[192,514,278],{},[225,516,517,520],{},[240,518,519],{},"Configuration and policy",[240,521,522],{},[192,523,288],{},[225,525,526,529],{},[240,527,528],{},"Shared contracts",[240,530,531],{},[192,532,302],{},[225,534,535,538],{},[240,536,537],{},"CLI parsing and presentation",[240,539,540],{},[192,541,312],{},[225,543,544,547],{},[240,545,546],{},"Database schema and migrations",[240,548,549],{},[192,550,326],{},[225,552,553,556],{},[240,554,555],{},"Authentication policy",[240,557,558],{},[192,559,336],{},[225,561,562,565],{},[240,563,564],{},"oRPC router and control-plane operations",[240,566,567],{},[192,568,349],{},[225,570,571,574],{},[240,572,573],{},"UI, HTTP host (RPC, OpenAPI, auth, dashboard routes)",[240,575,576],{},[192,577,379],{},{"title":210,"searchDepth":579,"depth":579,"links":580},2,[581,582,583],{"id":216,"depth":579,"text":217},{"id":420,"depth":579,"text":421},{"id":463,"depth":579,"text":464},"Agent Zero is a dependency-directed monorepo managed with Turborepo and aube. Workspaces live under apps\u002F* and packages\u002F* (declared in pnpm-workspace.yaml).","md",null,{},true,{"title":94,"description":584},"qqAYVzwNUVpGssvEO-mmCCbkX8EG-S4HP7XvRAeFsTc",[592,594],{"title":84,"path":85,"stem":86,"description":593,"children":-1},"Agent Zero reads credentials and deployment policy exclusively from the environment. Endpoint URLs and credentials can never be named or embedded in .agent-zero.yml, so untrusted repository policy cannot redirect a secret.",{"title":98,"path":99,"stem":100,"description":210,"children":-1},1787482151981]