[{"data":1,"prerenderedAt":650},["ShallowReactive",2],{"navigation_docs":3,"-reference-http-api":270,"-reference-http-api-surround":645},[4,28,51,110,243],{"title":5,"path":6,"stem":7,"children":8},"Get started","\u002Fget-started","1.get-started",[9,12,16,20,24],{"title":10,"path":6,"stem":11},"Overview","1.get-started\u002Findex",{"title":13,"path":14,"stem":15},"Why Kraft","\u002Fget-started\u002Fwhy-kraft","1.get-started\u002F0.why-kraft",{"title":17,"path":18,"stem":19},"Install","\u002Fget-started\u002Finstall","1.get-started\u002F1.install",{"title":21,"path":22,"stem":23},"Your first work item","\u002Fget-started\u002Ffirst-work-item","1.get-started\u002F2.first-work-item",{"title":25,"path":26,"stem":27},"Troubleshooting and FAQ","\u002Fget-started\u002Ftroubleshooting","1.get-started\u002F3.troubleshooting",{"title":29,"path":30,"stem":31,"children":32},"Concepts","\u002Fconcepts","2.concepts",[33,35,39,43,47],{"title":10,"path":30,"stem":34},"2.concepts\u002Findex",{"title":36,"path":37,"stem":38},"Vocabulary","\u002Fconcepts\u002Fvocabulary","2.concepts\u002F1.vocabulary",{"title":40,"path":41,"stem":42},"How a work item runs","\u002Fconcepts\u002Fhow-a-work-item-runs","2.concepts\u002F2.how-a-work-item-runs",{"title":44,"path":45,"stem":46},"Caps and budgets","\u002Fconcepts\u002Fcaps-and-budgets","2.concepts\u002F3.caps-and-budgets",{"title":48,"path":49,"stem":50},"Why a permission gate","\u002Fconcepts\u002Fpermission-gate","2.concepts\u002F4.permission-gate",{"title":52,"path":53,"stem":54,"children":55},"Guides","\u002Fguides","3.guides",[56,58,62,66,70,74,78,82,86,90,94,98,102,106],{"title":10,"path":53,"stem":57},"3.guides\u002Findex",{"title":59,"path":60,"stem":61},"Use Kraft from your agent","\u002Fguides\u002Fagent-integration","3.guides\u002F01.agent-integration",{"title":63,"path":64,"stem":65},"Kraft Lite","\u002Fguides\u002Fkraft-lite","3.guides\u002F02.kraft-lite",{"title":67,"path":68,"stem":69},"Remote access","\u002Fguides\u002Fremote-access","3.guides\u002F03.remote-access",{"title":71,"path":72,"stem":73},"Add or override a harness","\u002Fguides\u002Fadding-a-harness","3.guides\u002F04.adding-a-harness",{"title":75,"path":76,"stem":77},"Schedule or webhook work","\u002Fguides\u002Fschedule-and-webhook-work","3.guides\u002F05.schedule-and-webhook-work",{"title":79,"path":80,"stem":81},"Add a security review or a gate reviewer","\u002Fguides\u002Fadd-review-agents","3.guides\u002F06.add-review-agents",{"title":83,"path":84,"stem":85},"Kraft for VS Code","\u002Fguides\u002Fvscode","3.guides\u002F07.vscode",{"title":87,"path":88,"stem":89},"Reviewing a change","\u002Fguides\u002Freview-a-change","3.guides\u002F08.review-a-change",{"title":91,"path":92,"stem":93},"Write your own chain","\u002Fguides\u002Fwrite-your-own-chain","3.guides\u002F09.write-your-own-chain",{"title":95,"path":96,"stem":97},"Switch a harness","\u002Fguides\u002Fswitch-harness","3.guides\u002F10.switch-harness",{"title":99,"path":100,"stem":101},"Upgrade your templates","\u002Fguides\u002Fupgrading-templates","3.guides\u002F11.upgrading-templates",{"title":103,"path":104,"stem":105},"Operations","\u002Fguides\u002Foperations","3.guides\u002F12.operations",{"title":107,"path":108,"stem":109},"Worker Kit","\u002Fguides\u002Fworker-kit","3.guides\u002F13.worker-kit",{"title":111,"path":112,"stem":113,"children":114},"Reference","\u002Freference","4.reference",[115,117,139,183,201,205,227,231,235,239],{"title":10,"path":112,"stem":116},"4.reference\u002Findex",{"title":118,"path":119,"stem":120,"children":121},"CLI","\u002Freference\u002Fcli","4.reference\u002F1.cli\u002Findex",[122,123,127,131,135],{"title":10,"path":119,"stem":120},{"title":124,"path":125,"stem":126},"Item verbs","\u002Freference\u002Fcli\u002Fitem","4.reference\u002F1.cli\u002F2.item",{"title":128,"path":129,"stem":130},"View verbs","\u002Freference\u002Fcli\u002Fview","4.reference\u002F1.cli\u002F3.view",{"title":132,"path":133,"stem":134},"Repo verbs","\u002Freference\u002Fcli\u002Frepo","4.reference\u002F1.cli\u002F4.repo",{"title":136,"path":137,"stem":138},"Admin verbs","\u002Freference\u002Fcli\u002Fadmin","4.reference\u002F1.cli\u002F5.admin",{"title":140,"path":141,"stem":142,"children":143},"Configuration","\u002Freference\u002Fconfiguration","4.reference\u002F2.configuration\u002Findex",[144,145,155,159,163,167,171,175,179],{"title":10,"path":141,"stem":142},{"title":146,"path":147,"stem":148,"children":149},"Repos","\u002Freference\u002Fconfiguration\u002Frepos","4.reference\u002F2.configuration\u002F2.repos\u002Findex",[150,151],{"title":10,"path":147,"stem":148},{"title":152,"path":153,"stem":154},"Workspaces","\u002Freference\u002Fconfiguration\u002Frepos\u002Fworkspaces","4.reference\u002F2.configuration\u002F2.repos\u002F3.workspaces",{"title":156,"path":157,"stem":158},"Policy","\u002Freference\u002Fconfiguration\u002Fpolicy","4.reference\u002F2.configuration\u002F3.policy",{"title":160,"path":161,"stem":162},"Library and chains","\u002Freference\u002Fconfiguration\u002Flibrary-and-chains","4.reference\u002F2.configuration\u002F4.library-and-chains",{"title":164,"path":165,"stem":166},"Harnesses file","\u002Freference\u002Fconfiguration\u002Fharnesses-file","4.reference\u002F2.configuration\u002F5.harnesses-file",{"title":168,"path":169,"stem":170},"Access","\u002Freference\u002Fconfiguration\u002Faccess","4.reference\u002F2.configuration\u002F6.access",{"title":172,"path":173,"stem":174},"Intake","\u002Freference\u002Fconfiguration\u002Fintake","4.reference\u002F2.configuration\u002F7.intake",{"title":176,"path":177,"stem":178},"Sandbox host","\u002Freference\u002Fconfiguration\u002Fsandbox","4.reference\u002F2.configuration\u002F8.sandbox",{"title":180,"path":181,"stem":182},"Environment variables","\u002Freference\u002Fconfiguration\u002Fenvironment-variables","4.reference\u002F2.configuration\u002F9.environment-variables",{"title":184,"path":185,"stem":186,"children":187},"Chain nodes","\u002Freference\u002Fchain-nodes","4.reference\u002F3.chain-nodes\u002Findex",[188,189,193,197],{"title":10,"path":185,"stem":186},{"title":190,"path":191,"stem":192},"Subprocess tasks","\u002Freference\u002Fchain-nodes\u002Fsubprocess-tasks","4.reference\u002F3.chain-nodes\u002F2.subprocess-tasks",{"title":194,"path":195,"stem":196},"Fix loop and judge","\u002Freference\u002Fchain-nodes\u002Ffix-loop","4.reference\u002F3.chain-nodes\u002F3.fix-loop",{"title":198,"path":199,"stem":200},"Result file","\u002Freference\u002Fchain-nodes\u002Fresult-file","4.reference\u002F3.chain-nodes\u002F4.result-file",{"title":202,"path":203,"stem":204},"Permission gate","\u002Freference\u002Fpermissions","4.reference\u002F4.permissions",{"title":206,"path":207,"stem":208,"children":209},"Agent harnesses","\u002Freference\u002Fharnesses","4.reference\u002F5.harnesses\u002Findex",[210,211,215,219,223],{"title":10,"path":207,"stem":208},{"title":212,"path":213,"stem":214},"Unattended runs","\u002Freference\u002Fharnesses\u002Funattended-runs","4.reference\u002F5.harnesses\u002F2.unattended-runs",{"title":216,"path":217,"stem":218},"Agent profiles","\u002Freference\u002Fharnesses\u002Fagent-profiles","4.reference\u002F5.harnesses\u002F3.agent-profiles",{"title":220,"path":221,"stem":222},"Harness files","\u002Freference\u002Fharnesses\u002Fharness-files","4.reference\u002F5.harnesses\u002F4.harness-files",{"title":224,"path":225,"stem":226},"Fallback and escalation","\u002Freference\u002Fharnesses\u002Ffallback-and-escalation","4.reference\u002F5.harnesses\u002F5.fallback-and-escalation",{"title":228,"path":229,"stem":230},"Inbound triggers","\u002Freference\u002Ftriggers","4.reference\u002F6.triggers",{"title":232,"path":233,"stem":234},"HTTP API","\u002Freference\u002Fhttp-api","4.reference\u002F7.http-api",{"title":236,"path":237,"stem":238},"MCP tools","\u002Freference\u002Fmcp-tools","4.reference\u002F8.mcp-tools",{"title":240,"path":241,"stem":242},"Events","\u002Freference\u002Fevents","4.reference\u002F9.events",{"title":244,"path":245,"stem":246,"children":247},"Project","\u002Fproject","5.project",[248,250,254,258,262,266],{"title":10,"path":245,"stem":249},"5.project\u002Findex",{"title":251,"path":252,"stem":253},"Architecture","\u002Fproject\u002Farchitecture","5.project\u002F1.architecture",{"title":255,"path":256,"stem":257},"Contributing","\u002Fproject\u002Fcontributing","5.project\u002F2.contributing",{"title":259,"path":260,"stem":261},"Security","\u002Fproject\u002Fsecurity","5.project\u002F3.security",{"title":263,"path":264,"stem":265},"Data and privacy","\u002Fproject\u002Fdata-and-privacy","5.project\u002F4.data-and-privacy",{"title":267,"path":268,"stem":269},"Status and support","\u002Fproject\u002Fstatus-and-support","5.project\u002F5.status-and-support",{"id":271,"title":232,"body":272,"description":638,"extension":639,"links":640,"meta":641,"navigation":642,"path":233,"seo":643,"stem":234,"__hash__":644},"docs\u002F4.reference\u002F7.http-api.md",{"type":273,"value":274,"toc":632},"minimark",[275,288,293,302,371,389,438,442,445,489,530,541,545,608,628],[276,277,278,279,283,284,287],"p",{},"The Kraft server serves its board, and the JSON API behind it, on one port\n(",[280,281,282],"code",{},"127.0.0.1:8765"," by default). The ",[280,285,286],{},"kraft"," command and the MCP server are\nclients of that API.",[289,290,292],"h2",{"id":291},"stable-routes","Stable routes",[276,294,295,296,301],{},"Only two routes are meant for other programs, and only these keep their shape\nbetween minor releases. See\n",[297,298,300],"a",{"href":299},"\u002Fproject\u002Fstatus-and-support#versioning-and-stability","Versioning and stability",".",[303,304,305,318],"table",{},[306,307,308],"thead",{},[309,310,311,315],"tr",{},[312,313,314],"th",{},"Route",[312,316,317],{},"Use",[319,320,321,335],"tbody",{},[309,322,323,329],{},[324,325,326],"td",{},[280,327,328],{},"POST \u002Fapi\u002Ftriggers",[324,330,331,332,301],{},"File a work item from a webhook or script. See ",[297,333,228],{"href":334},"\u002Freference\u002Ftriggers#post-apitriggers",[309,336,337,342],{},[324,338,339],{},[280,340,341],{},"GET \u002Fapi\u002Fhealth",[324,343,344,345,348,349,352,353,356,357,360,361,360,364,360,367,370],{},"Check that the server is up. Answers ",[280,346,347],{},"status"," (",[280,350,351],{},"ok"," or ",[280,354,355],{},"degraded","), the reasons it is degraded, and which instance this is (",[280,358,359],{},"run_dir",", ",[280,362,363],{},"pid",[280,365,366],{},"bind",[280,368,369],{},"port","). Needs no login.",[276,372,373,374,377,378,381,382,384,385,388],{},"Every other route under ",[280,375,376],{},"\u002Fapi\u002F",", and the ",[280,379,380],{},"\u002Fapi\u002Fws\u002Fevents"," WebSocket, exists\nfor the board and can change in any release. For those, prefer the ",[280,383,286],{},"\ncommand with ",[280,386,387],{},"--json",", which is stable.",[276,390,391,394,395,398,399,402,403,406,407,410,411,414,415,360,418,420,421,423,424,427,428,352,431,434,435,301],{},[280,392,393],{},"POST \u002Fapi\u002Fwork-items",", the board's create route, files the item paused unless\nthe body sets ",[280,396,397],{},"autostart: true",", like ",[280,400,401],{},"kraft item create"," without\n",[280,404,405],{},"--autostart",". A body with no ",[280,408,409],{},"chain_template"," gets the repo's\n",[280,412,413],{},"default_chain_template",". Every repo path you send must be absolute: the\nserver would read a relative one against its own directory, not yours.\n",[280,416,417],{},"POST \u002Fapi\u002Frepos",[280,419,393],{}," and ",[280,422,328],{}," refuse it\nwith a ",[280,425,426],{},"422",", and ",[280,429,430],{},"PATCH",[280,432,433],{},"DELETE \u002Fapi\u002Frepos?path="," answer ",[280,436,437],{},"404",[289,439,441],{"id":440},"the-schema","The schema",[276,443,444],{},"FastAPI generates a schema of every route:",[303,446,447,457],{},[306,448,449],{},[309,450,451,454],{},[312,452,453],{},"Path",[312,455,456],{},"What it serves",[319,458,459,469,479],{},[309,460,461,466],{},[324,462,463],{},[280,464,465],{},"\u002Fopenapi.json",[324,467,468],{},"The OpenAPI schema, as JSON.",[309,470,471,476],{},[324,472,473],{},[280,474,475],{},"\u002Fdocs",[324,477,478],{},"Swagger UI for that schema.",[309,480,481,486],{},[324,482,483],{},[280,484,485],{},"\u002Fredoc",[324,487,488],{},"ReDoc for that schema.",[490,491,496],"pre",{"className":492,"code":493,"language":494,"meta":495,"style":495},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","curl -s http:\u002F\u002F127.0.0.1:8765\u002Fopenapi.json | jq '.paths | keys'\n","bash","",[280,497,498],{"__ignoreMap":495},[499,500,503,507,511,514,518,521,524,527],"span",{"class":501,"line":502},"line",1,[499,504,506],{"class":505},"sBMFI","curl",[499,508,510],{"class":509},"sfazB"," -s",[499,512,513],{"class":509}," http:\u002F\u002F127.0.0.1:8765\u002Fopenapi.json",[499,515,517],{"class":516},"sMK4o"," |",[499,519,520],{"class":505}," jq",[499,522,523],{"class":516}," '",[499,525,526],{"class":509},".paths | keys",[499,528,529],{"class":516},"'\n",[276,531,532,533,352,535,537,538,540],{},"These three paths need no login. Open ",[280,534,475],{},[280,536,485],{}," in a browser to read\nthe API there. Both pages load their scripts from a public CDN, so on a machine\nwithout internet access, load ",[280,539,465],{}," into your own OpenAPI viewer.",[289,542,544],{"id":543},"who-may-call","Who may call",[303,546,547,557],{},[306,548,549],{},[309,550,551,554],{},[312,552,553],{},"Caller",[312,555,556],{},"What it needs",[319,558,559,567,582,597],{},[309,560,561,564],{},[324,562,563],{},"A process on the same machine, while Kraft is bound to loopback",[324,565,566],{},"Nothing.",[309,568,569,572],{},[324,570,571],{},"Anyone, once Kraft is bound off loopback",[324,573,574,575,578,579,301],{},"A browser session from the login page, or the MCP bearer token in ",[280,576,577],{},"$KRAFT_HOME\u002Frun\u002Fmcp-token",", sent as ",[280,580,581],{},"Authorization: Bearer \u003Ctoken>",[309,583,584,587],{},[324,585,586],{},"A trigger sender, once Kraft is bound off loopback",[324,588,589,590,592,593,596],{},"For ",[280,591,328],{}," only, the trigger token in ",[280,594,595],{},"$KRAFT_HOME\u002Frun\u002Ftrigger-token",", sent the same way.",[309,598,599,602],{},[324,600,601],{},"A remote caller while no password is set",[324,603,604,605,301],{},"Nothing works. Kraft answers ",[280,606,607],{},"403",[276,609,610,611,614,615,618,619,621,622,624,625,627],{},"A request without valid credentials gets ",[280,612,613],{},"401",". A browser request whose ",[280,616,617],{},"Host","\nis not an allowed name, or a cross-site write, gets ",[280,620,607],{},". The MCP bearer token is\na full-access credential. See ",[297,623,259],{"href":260}," for the whole\nmodel, and ",[297,626,67],{"href":68}," to set a password.",[629,630,631],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}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 .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":495,"searchDepth":633,"depth":633,"links":634},2,[635,636,637],{"id":291,"depth":633,"text":292},{"id":440,"depth":633,"text":441},{"id":543,"depth":633,"text":544},"Which of Kraft's HTTP routes are stable, where the full schema is, and who may call them.","md",null,{},true,{"title":232,"description":638},"WncYO29DMHM4UtOcC-Yz5kcV7lXwxJr-m0I1bdQ52vY",[646,648],{"title":228,"path":229,"stem":230,"description":647,"children":-1},"The trigger fields in policy.yaml and the POST \u002Fapi\u002Ftriggers contract for starting a chain from a schedule or a webhook.",{"title":236,"path":237,"stem":238,"description":649,"children":-1},"Every tool the kraft MCP server serves, with its parameters and the kraft command that does the same.",1790824541942]