[{"data":1,"prerenderedAt":443},["ShallowReactive",2],{"docs-navigation":3,"docs-\u002Fdocs\u002Fusage\u002Fagent":90,"docs-surround-\u002Fdocs\u002Fusage\u002Fagent":438},[4],{"title":5,"path":6,"stem":7,"children":8,"page":34},"Docs","\u002Fdocs","docs",[9,35,56,77],{"title":10,"path":11,"stem":12,"children":13,"page":34},"Get Started","\u002Fdocs\u002Fget-started","docs\u002F1.get-started",[14,18,22,26,30],{"title":15,"path":16,"stem":17},"Introduction","\u002Fdocs\u002Fget-started\u002Fintroduction","docs\u002F1.get-started\u002F1.introduction",{"title":19,"path":20,"stem":21},"Concepts","\u002Fdocs\u002Fget-started\u002Fconcepts","docs\u002F1.get-started\u002F2.concepts",{"title":23,"path":24,"stem":25},"Installation","\u002Fdocs\u002Fget-started\u002Finstallation","docs\u002F1.get-started\u002F3.installation",{"title":27,"path":28,"stem":29},"Setup","\u002Fdocs\u002Fget-started\u002Fsetup","docs\u002F1.get-started\u002F4.setup",{"title":31,"path":32,"stem":33},"Maintenance","\u002Fdocs\u002Fget-started\u002Fmaintenance","docs\u002F1.get-started\u002F5.maintenance",false,{"title":36,"path":37,"stem":38,"children":39,"page":34},"Usage","\u002Fdocs\u002Fusage","docs\u002F2.usage",[40,44,48,52],{"title":41,"path":42,"stem":43},"Projects","\u002Fdocs\u002Fusage\u002Fprojects","docs\u002F2.usage\u002F1.projects",{"title":45,"path":46,"stem":47},"Workflows","\u002Fdocs\u002Fusage\u002Fworkflows","docs\u002F2.usage\u002F2.workflows",{"title":49,"path":50,"stem":51},"Triggers","\u002Fdocs\u002Fusage\u002Ftriggers","docs\u002F2.usage\u002F3.triggers",{"title":53,"path":54,"stem":55},"AI Agent","\u002Fdocs\u002Fusage\u002Fagent","docs\u002F2.usage\u002F4.agent",{"title":57,"path":58,"stem":59,"children":60,"page":34},"Integrations","\u002Fdocs\u002Fintegrations","docs\u002F3.integrations",[61,65,69,73],{"title":62,"path":63,"stem":64},"GitHub","\u002Fdocs\u002Fintegrations\u002Fgithub","docs\u002F3.integrations\u002F1.github",{"title":66,"path":67,"stem":68},"Jira","\u002Fdocs\u002Fintegrations\u002Fjira","docs\u002F3.integrations\u002F2.jira",{"title":70,"path":71,"stem":72},"Plane","\u002Fdocs\u002Fintegrations\u002Fplane","docs\u002F3.integrations\u002F3.plane",{"title":74,"path":75,"stem":76},"Linear","\u002Fdocs\u002Fintegrations\u002Flinear","docs\u002F3.integrations\u002F4.linear",{"title":78,"path":79,"stem":80,"children":81,"page":34},"Resources","\u002Fdocs\u002Fresources","docs\u002F4.resources",[82,86],{"title":83,"path":84,"stem":85},"Beta Testers","\u002Fdocs\u002Fresources\u002Fbeta-testers","docs\u002F4.resources\u002F1.beta-testers",{"title":87,"path":88,"stem":89},"Troubleshooting","\u002Fdocs\u002Fresources\u002Ftroubleshooting","docs\u002F4.resources\u002F2.troubleshooting",{"id":91,"title":53,"body":92,"description":432,"extension":433,"meta":434,"navigation":435,"path":54,"seo":436,"stem":55,"__hash__":437},"docs_en\u002Fdocs\u002F2.usage\u002F4.agent.md",{"type":93,"value":94,"toc":420},"minimark",[95,107,112,115,144,151,155,158,179,187,191,194,201,207,211,218,228,246,250,253,256,260,263,276,283,286,296,300,303,308,316,321,363,366,371,382,387,417],[96,97,98,99,106],"p",{},"The AI step starts ",[100,101,105],"a",{"href":102,"rel":103},"https:\u002F\u002Fopencode.ai",[104],"nofollow","opencode"," inside the project's environment with your provider key. It is an agent, not a chat: it reads the code, changes files, runs commands, and checks its own work until the task in the prompt is done. This page covers where it runs, how to steer it, and what it hands back to the workflow.",[108,109,111],"h2",{"id":110},"where-it-runs","Where It Runs",[96,113,114],{},"The agent runs inside the web container of the booted project, as a non-root user, on the run's checkout. Composer, npm, and git are there, so it behaves like a developer on the real project. What it cannot reach:",[116,117,118,132,138],"ul",{},[119,120,121,125,126,131],"li",{},[122,123,124],"strong",{},"Docker and the host."," The Docker socket and the ",[100,127,130],{"href":128,"rel":129},"https:\u002F\u002Fddev.com",[104],"DDEV"," CLI stay on the Knecht side. The agent only ever sees the inside of its container.",[119,133,134,137],{},[122,135,136],{},"Other runs."," Each environment sits on its own network, parallel runs cannot reach each other.",[119,139,140,143],{},[122,141,142],{},"Secrets."," The provider key is handed to the process as an environment variable and never written into the checkout. Git pushes go through a short-lived token scoped to the session's one repository.",[96,145,146,147,150],{},"A small set of Knecht commands is available to the agent inside the container: git with credentials for the project's repository, a command to push the branch and open a pull request, and, when the session belongs to a GitHub issue or pull request or to an issue of an issue tracker, commands to read the thread, post a reply, add or remove existing labels, and, in an issue tracker, move it to another status. What each of them does is on the page of the integration, in the section about the agent, for example on ",[100,148,62],{"href":149},"\u002Fdocs\u002Fintegrations\u002Fgithub#the-agent-on-issues-and-pull-requests",".",[108,152,154],{"id":153},"instructions","Instructions",[96,156,157],{},"Three layers of instructions apply, in this order:",[159,160,161,167,173],"ol",{},[119,162,163,166],{},[122,164,165],{},"Built-in rules."," Knecht ships its own rules for working style, git usage, memory, and how to reply on a thread. They are the same on every instance.",[119,168,169,172],{},[122,170,171],{},"Instance instructions."," Settings > Agent has a free text field that applies to every project, for example \"Always answer in German\" or \"Never touch anything under legacy\u002F\".",[119,174,175,178],{},[122,176,177],{},"Project instructions."," The project settings have the same field for rules that apply to this project only, for example where the styles live or which design tokens to use.",[96,180,181,182,186],{},"On top of that, an AI step can carry its own step prompt, a task framing for that one step. A repository's own ",[183,184,185],"code",{},"AGENTS.md"," is read by opencode as usual.",[108,188,190],{"id":189},"memory","Memory",[96,192,193],{},"The agent keeps notes per project, so it does not rediscover the same facts on every run: how the project builds, where the styles live, corrections from earlier follow-ups. The notes live on the host outside every environment and are copied into the checkout before each agent call and back afterwards.",[96,195,196,197,200],{},"The structure is an index file, ",[183,198,199],{},"MEMORY.md",", that is part of the agent's instructions on every call, plus topic files the agent reads on demand. The agent writes and curates the notes itself, guided by the built-in rules. The index is capped at 2 KB and the whole store at 64 KB. An oversized write is discarded and the previous state kept.",[202,203,204],"note",{},[96,205,206],{},"There is no view of the notes in the dashboard yet.",[108,208,210],{"id":209},"output-fields","Output Fields",[96,212,213,214,217],{},"By default, an AI step returns the agent's final text under ",[183,215,216],{},"{{ steps.\u003Cid>.text }}",". For later steps that need specific values, the step's \"Output format\" field declares them, one per line:",[219,220,225],"pre",{"className":221,"code":223,"language":224},[222],"language-text","prTitle: string\nlabels: string[]\nneedsReview: boolean\n","text",[183,226,223],{"__ignoreMap":227},"",[96,229,230,231,234,235,234,238,241,242,245],{},"The allowed types are ",[183,232,233],{},"string",", ",[183,236,237],{},"number",[183,239,240],{},"boolean",", and their array forms. The agent writes the result as a file, Knecht validates it against the declaration and asks the agent to fix it if it does not match. Each field is then available as ",[183,243,244],{},"{{ steps.\u003Cid>.json.\u003Cfield> }}",", for example as the title of the pull request step.",[108,247,249],{"id":248},"models","Models",[96,251,252],{},"The default model and an optional subtask model are set under Settings > Agent. The subtask model is used when the agent delegates smaller pieces of work, for example exploring the repository. Each AI step has a model field that overrides the default, so one workflow can mix a small model for triage and a large one for the fix, all behind the same key.",[96,254,255],{},"Switching the provider clears both stored models, because model names do not carry over between providers. Pick them again after the switch.",[108,257,259],{"id":258},"follow-ups-and-mentions","Follow-Ups and Mentions",[96,261,262],{},"The conversation does not end with the run. Every session has one agent conversation, and every run and follow-up in that session continues it, so later work sees what earlier work found. Two ways to continue:",[116,264,265,268],{},[119,266,267],{},"The follow-up chat on the run page sends a new prompt into the session's environment.",[119,269,270,271,275],{},"A mention in a comment does the same from GitHub or an issue tracker, see ",[100,272,274],{"href":273},"#mentions","Mentions"," below.",[96,277,278],{},[279,280],"img",{"alt":281,"src":282},"The follow-up panel on the run page, with a request to add a dark mode, the agent's reply with its collapsed tool calls, and the input field for the next message with the model picker","\u002Fassets\u002Fknecht-run-follow-up.png",[96,284,285],{},"Follow-ups in one session run one after the other. A stopped environment is restarted for the follow-up, an archived one is restored first.",[202,287,288],{},[96,289,290,291,150],{},"For a walkthrough of setting this up end to end, see ",[100,292,295],{"href":293,"rel":294},"https:\u002F\u002Fmatthias-andrasch.eu\u002Fblog\u002F2026\u002Fexploring-knecht-cloud-talking-to-an-ai-agent-in-github-issues-part-2\u002F",[104],"Exploring Knecht Cloud: Talking to an AI Agent in GitHub Issues",[297,298,274],"h3",{"id":299},"mentions",[96,301,302],{},"A mention is a comment that addresses Knecht. Knecht runs the text of the comment as a follow-up and posts the answer as a comment in the same thread.",[96,304,305],{},[122,306,307],{},"Set it up once per project.",[159,309,310,313],{},[119,311,312],{},"Open the project settings and go to the Mentions panel.",[119,314,315],{},"Pick a \"Starter workflow\" and make sure it is published. It boots the environment when a mention arrives on an issue Knecht has not worked on yet, so a workflow with a boot step is the right choice.",[96,317,318],{},[122,319,320],{},"Mention Knecht.",[322,323,324,337],"table",{},[325,326,327],"thead",{},[328,329,330,334],"tr",{},[331,332,333],"th",{},"Where",[331,335,336],{},"Write",[338,339,340,351],"tbody",{},[328,341,342,346],{},[343,344,345],"td",{},"GitHub issue or pull request",[343,347,348],{},[183,349,350],{},"@knecht-works fix the broken footer link",[328,352,353,356],{},[343,354,355],{},"Issue tracker",[343,357,358,359,362],{},"Mention the account Knecht is connected with, the way you mention a colleague, followed by the instruction. ",[183,360,361],{},"@knecht"," typed as plain text works as well.",[96,364,365],{},"The issue has to belong to a project in Knecht: its repository on GitHub, or the project linked to it in an issue tracker.",[96,367,368],{},[122,369,370],{},"What happens.",[159,372,373,376,379],{},[119,374,375],{},"Knecht looks up the session of the issue. If there is none, or its environment is down, the starter workflow runs first.",[119,377,378],{},"The comment runs as a follow-up in that environment, with the agent conversation of the session.",[119,380,381],{},"The answer arrives as a comment. If a pull request was opened, its link is part of it.",[96,383,384],{},[122,385,386],{},"If nothing happens.",[322,388,389,399],{},[325,390,391],{},[328,392,393,396],{},[331,394,395],{},"Knecht answers",[331,397,398],{},"Reason",[338,400,401,409],{},[328,402,403,406],{},[343,404,405],{},"With a setup hint",[343,407,408],{},"No starter workflow is chosen, or it is not published.",[328,410,411,414],{},[343,412,413],{},"Not at all",[343,415,416],{},"\"Answer mentions in this repo\" is off in the Mentions panel under Advanced, the issue belongs to no project, or the comment comes from an account that may not mention Knecht, on GitHub one that is not listed under Settings, Access.",[96,418,419],{},"Who may mention Knecht depends on the tool: on GitHub only the accounts that can sign in to your Knecht dashboard (Settings, Access), in an issue tracker everyone who can comment on the issue. Comments by Knecht itself are always ignored. The Mentions section on the page of each integration has the details.",{"title":227,"searchDepth":421,"depth":421,"links":422},2,[423,424,425,426,427,428],{"id":110,"depth":421,"text":111},{"id":153,"depth":421,"text":154},{"id":189,"depth":421,"text":190},{"id":209,"depth":421,"text":210},{"id":248,"depth":421,"text":249},{"id":258,"depth":421,"text":259,"children":429},[430],{"id":299,"depth":431,"text":274},3,"How the agent works inside your project and how to steer it.","md",{},true,{"title":53,"description":432},"idecFVg63GOWSoYdgxtoHSqz8P69DDECKk3FiLFGjyo",[439,441],{"title":49,"path":50,"stem":51,"description":440,"children":-1},"Start workflows from GitHub events, from an issue tracker, or on a schedule.",{"title":62,"path":63,"stem":64,"description":442,"children":-1},"Everything you need to know about the GitHub integration. What it can do and how to set it up.",1790265016225]