[{"data":1,"prerenderedAt":173},["ShallowReactive",2],{"doc:agents\u002Frepositories":3},{"title":4,"description":5,"url":6,"markdownPath":7,"file":8,"section":9,"sectionTitle":10,"html":11,"toc":12,"navigation":32,"previous":171,"next":172},"Repositories and code work","Connect GitHub, add a repository environment and let L4 Agents take a Task to a draft pull request on a working branch.","\u002Fdocs\u002Fagents\u002Frepositories","\u002Fdocs\u002Fagents\u002Frepositories.md","docs\u002Fagents\u002Frepositories.md","agents","Agents and MCP","\u003Cp>An Agent can work on code: it takes a Task, edits a copy of your repository in an isolated workspace, runs checks and opens a \u003Cstrong>draft pull request\u003C\u002Fstrong>. Merging and releasing stay with people. Agents never get merge or release tools.\u003C\u002Fp>\n\u003Cp>Code work needs five things. \u003Cstrong>Server settings → Agents\u003C\u002Fstrong> shows them as a checklist, \u003Cstrong>Set up agents that work on code\u003C\u002Fstrong>, until each is done:\u003C\u002Fp>\n\u003Col>\n\u003Cli>\u003Cstrong>Connect a model.\u003C\u002Fstrong> See \u003Ca href=\"\u002Fdocs\u002Fagents\u002Fmodels-and-providers\">Models and Providers\u003C\u002Fa>.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Connect GitHub.\u003C\u002Fstrong> A dedicated GitHub App for the repositories Agents may work on.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Choose a repository for Tasks.\u003C\u002Fstrong> An environment in \u003Cstrong>Git → Environments\u003C\u002Fstrong>.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Add compute.\u003C\u002Fstrong> A Compute Node where the workspace runs.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Create an agent\u003C\u002Fstrong> with a Role that has \u003Cstrong>Use a computer\u003C\u002Fstrong> and \u003Cstrong>Propose code changes\u003C\u002Fstrong>.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>\u003Cfigure class=\"doc-shot doc-shot-missing\">\u003Cdiv class=\"doc-shot-frame\" role=\"img\" aria-label=\"The Set up agents that work on code checklist in Server settings → Agents with five steps and their buttons\">\u003Cspan class=\"doc-shot-label\">Screenshot coming soon\u003C\u002Fspan>\u003Cspan class=\"doc-shot-alt\">The Set up agents that work on code checklist in Server settings → Agents with five steps and their buttons\u003C\u002Fspan>\u003C\u002Fdiv>\u003Cfigcaption>The code work checklist\u003C\u002Ffigcaption>\u003C\u002Ffigure>\u003C\u002Fp>\n\u003Cp>GitHub is the only Git provider that works today. GitLab and Gitea show \u003Cstrong>connections are not available yet\u003C\u002Fstrong>; Projects can record GitLab, Gitea and Cursor repositories as references only.\u003C\u002Fp>\n\u003Ch2 id=\"1-connect-github\">\u003Ca class=\"heading-anchor\" href=\"#1-connect-github\">1. Connect GitHub\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>L4 creates a private GitHub App for your Server, separate from any GitHub login. Only the Owner can set it up, and the Server needs an HTTPS address.\u003C\u002Fp>\n\u003Col>\n\u003Cli>Open \u003Cstrong>Server settings → Git\u003C\u002Fstrong>. On the \u003Cstrong>GitHub\u003C\u002Fstrong> tab, select \u003Cstrong>Connect GitHub\u003C\u002Fstrong>. For an organization, select \u003Cstrong>Connect a GitHub organization\u003C\u002Fstrong> instead and enter its name.\u003C\u002Fli>\n\u003Cli>GitHub opens in a new tab. Create the App, then choose which repositories it may access.\u003C\u002Fli>\n\u003Cli>Return to L4. The connection appears in the list with the repositories it can access. Select the refresh button if it does not appear yet.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>\u003Cfigure class=\"doc-shot doc-shot-missing\">\u003Cdiv class=\"doc-shot-frame\" role=\"img\" aria-label=\"Server settings → Git with the GitHub tab, one connection and the Connect GitHub button\">\u003Cspan class=\"doc-shot-label\">Screenshot coming soon\u003C\u002Fspan>\u003Cspan class=\"doc-shot-alt\">Server settings → Git with the GitHub tab, one connection and the Connect GitHub button\u003C\u002Fspan>\u003C\u002Fdiv>\u003Cfigcaption>Connect GitHub\u003C\u002Ffigcaption>\u003C\u002Ffigure>\u003C\u002Fp>\n\u003Cp>The App asks for code and pull request write access, for working branches and draft pull requests, and read access to issues and checks. It does not ask for branch-protection administration. The App&#39;s key stays encrypted on your Server and is never given to an Agent.\u003C\u002Fp>\n\u003Cp>If GitHub asks you to sign in and then says it did not find an App Manifest, return to L4 and select \u003Cstrong>Prepare again after GitHub sign-in\u003C\u002Fstrong>. If you already created the App, refresh the connections instead of creating another.\u003C\u002Fp>\n\u003Cp>To manage a connection, open it:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Change repositories on GitHub\u003C\u002Fstrong> changes which repositories the App can access.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Disable in L4\u003C\u002Fstrong> stops L4 from using the connection at once. It does not uninstall the App; uninstall it on GitHub if you also want to remove its access there.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"2-add-a-repository-environment\">\u003Ca class=\"heading-anchor\" href=\"#2-add-a-repository-environment\">2. Add a repository environment\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>An environment tells Tasks which repository, branch and compute to use.\u003C\u002Fp>\n\u003Col>\n\u003Cli>In \u003Cstrong>Server settings → Git\u003C\u002Fstrong>, open the \u003Cstrong>Environments\u003C\u002Fstrong> tab and select \u003Cstrong>Add environment\u003C\u002Fstrong>.\u003C\u002Fli>\n\u003Cli>Enter a \u003Cstrong>Name\u003C\u002Fstrong>, for example \u003Ccode>Website fixes\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>Choose the \u003Cstrong>Git connection\u003C\u002Fstrong>, then the \u003Cstrong>Source repository\u003C\u002Fstrong>. Select \u003Cstrong>Refresh repositories\u003C\u002Fstrong> if the list is empty.\u003C\u002Fli>\n\u003Cli>Choose the \u003Cstrong>Working repository\u003C\u002Fstrong>: the same repository for ordinary branch-based work, or an optional fork.\u003C\u002Fli>\n\u003Cli>Choose the \u003Cstrong>Compute Node\u003C\u002Fstrong> where its Task Runs execute.\u003C\u002Fli>\n\u003Cli>Enter the \u003Cstrong>Base branch\u003C\u002Fstrong>.\u003C\u002Fli>\n\u003Cli>In \u003Cstrong>Required CI checks\u003C\u002Fstrong>, enter at least one exact check or commit-status name, one per line. A pull request whose required checks are missing or failing stays unverified.\u003C\u002Fli>\n\u003Cli>Optionally list \u003Cstrong>Allowed Preview domains\u003C\u002Fstrong>, one per line, for preview links Agents may report. Preview links must use HTTPS.\u003C\u002Fli>\n\u003Cli>Select \u003Cstrong>Save environment\u003C\u002Fstrong>.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>Saving changes to an environment stops Runs and Schedules that use its earlier version.\u003C\u002Fp>\n\u003Ch2 id=\"3-add-compute\">\u003Ca class=\"heading-anchor\" href=\"#3-add-compute\">3. Add compute\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Code runs on a Compute Node, never on the Server itself. In \u003Cstrong>Server settings → Compute\u003C\u002Fstrong>, select \u003Cstrong>Add compute\u003C\u002Fstrong> to pair a Docker host or connect Lizard, or use \u003Cstrong>Server compute setup\u003C\u002Fstrong> for the option that fits where your Server runs. See \u003Ca href=\"\u002Fdocs\u002Fself-host\u002Fcompute-nodes\">Compute Nodes\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"4-give-the-agent-and-people-the-right-permissions\">\u003Ca class=\"heading-anchor\" href=\"#4-give-the-agent-and-people-the-right-permissions\">4. Give the Agent and people the right permissions\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Permission\u003C\u002Fth>\n\u003Cth>Who needs it\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\u003Ctr>\n\u003Ctd>Use a computer\u003C\u002Ftd>\n\u003Ctd>Both the Agent and the person who starts the work\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Propose code changes\u003C\u002Ftd>\n\u003Ctd>The Agent, to publish a branch and draft pull request\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Read tasks, Execute assigned tasks, Send messages\u003C\u002Ftd>\n\u003Ctd>Both, to run a Task\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Read projects\u003C\u002Ftd>\n\u003Ctd>Both, when the Task belongs to a Project\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>No existing Role gets \u003Cstrong>Use a computer\u003C\u002Fstrong> or \u003Cstrong>Propose code changes\u003C\u002Fstrong> automatically, not even Admin. The built-in \u003Cstrong>Developer\u003C\u002Fstrong> Project policy covers working on project Tasks and proposing code; assign it in \u003Cstrong>Projects → Access\u003C\u002Fstrong>.\u003C\u002Fp>\n\u003Ch2 id=\"5-run-a-task\">\u003Ca class=\"heading-anchor\" href=\"#5-run-a-task\">5. Run a Task\u003C\u002Fa>\u003C\u002Fh2>\n\u003Col>\n\u003Cli>Create a Task, assign it to the Agent and choose the \u003Cstrong>Repository environment\u003C\u002Fstrong>.\u003C\u002Fli>\n\u003Cli>Select \u003Cstrong>Create and run\u003C\u002Fstrong>, or later \u003Cstrong>Run assigned agent\u003C\u002Fstrong> on the Task.\u003C\u002Fli>\n\u003Cli>Follow the Run from your Inbox or the \u003Cstrong>Runs\u003C\u002Fstrong> page.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>The Agent downloads the repository at the base branch&#39;s exact commit, works in an isolated workspace and can run the checks available there. When it publishes, it pushes a branch named \u003Ccode>l4-agent\u002F&lt;run-id&gt;\u003C\u002Fcode> to the working repository and opens a draft pull request against the base branch. The Task moves to \u003Cstrong>Review\u003C\u002Fstrong>.\u003C\u002Fp>\n\u003Cp>Your existing CI, branch rules and preview deployments stay authoritative. A report from the Agent is not CI evidence.\u003C\u002Fp>\n\u003Cp>Agents cannot change \u003Ccode>.github\u003C\u002Fcode> or \u003Ccode>.git\u003C\u002Fcode>, force-push, change the base branch, merge, label a release or deploy.\u003C\u002Fp>\n\u003Cp>Internet access from workspace commands is limited, so package downloads and network-dependent tests may not work there. Rely on your repository&#39;s own CI. Per-Task workspace limits, such as actions, command runtime and draft PR updates, are set by the Owner in \u003Cstrong>Server settings → Agents → Execution\u003C\u002Fstrong>.\u003C\u002Fp>\n\u003Ch2 id=\"related\">\u003Ca class=\"heading-anchor\" href=\"#related\">Related\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ca href=\"\u002Fdocs\u002Fself-host\u002Fcompute-nodes\">Compute Nodes\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fdocs\u002Fguides\u002Fprojects-and-tasks\">Projects and Tasks\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fdocs\u002Fconcepts\u002Fagents-tasks-runs\">Agents, Tasks and Runs\u003C\u002Fa>\u003C\u002Fli>\n\u003C\u002Ful>\n",[13,17,20,23,26,29],{"id":14,"text":15,"depth":16},"1-connect-github","1. Connect GitHub",2,{"id":18,"text":19,"depth":16},"2-add-a-repository-environment","2. Add a repository environment",{"id":21,"text":22,"depth":16},"3-add-compute","3. Add compute",{"id":24,"text":25,"depth":16},"4-give-the-agent-and-people-the-right-permissions","4. Give the Agent and people the right permissions",{"id":27,"text":28,"depth":16},"5-run-a-task","5. Run a Task",{"id":30,"text":31,"depth":16},"related","Related",[33,58,86,102,121,139,161],{"id":34,"title":35,"pages":36},"get-started","Get started",[37,40,43,46,49,52,55],{"title":38,"url":39},"What is L4","\u002Fdocs\u002Fget-started\u002Fwhat-is-l4",{"title":41,"url":42},"Choose how to run your Server","\u002Fdocs\u002Fget-started\u002Fchoose-how-to-run",{"title":44,"url":45},"Create a Server on Cloudflare","\u002Fdocs\u002Fget-started\u002Fcreate-on-cloudflare",{"title":47,"url":48},"Install on a VPS","\u002Fdocs\u002Fget-started\u002Finstall-on-a-vps",{"title":50,"url":51},"Connect to a Server","\u002Fdocs\u002Fget-started\u002Fconnect-a-server",{"title":53,"url":54},"Invite your team","\u002Fdocs\u002Fget-started\u002Finvite-your-team",{"title":56,"url":57},"Create your first Agent","\u002Fdocs\u002Fget-started\u002Ffirst-agent",{"id":59,"title":60,"pages":61},"cloudflare","Cloudflare",[62,65,68,71,74,77,80,83],{"title":63,"url":64},"L4 on Cloudflare","\u002Fdocs\u002Fcloudflare\u002Foverview",{"title":66,"url":67},"Cloudflare access","\u002Fdocs\u002Fcloudflare\u002Faccess",{"title":69,"url":70},"Costs and limits","\u002Fdocs\u002Fcloudflare\u002Fcosts-and-limits",{"title":72,"url":73},"Custom domain","\u002Fdocs\u002Fcloudflare\u002Fcustom-domain",{"title":75,"url":76},"Mail on Cloudflare","\u002Fdocs\u002Fcloudflare\u002Fmail",{"title":78,"url":79},"Update a Cloudflare Server","\u002Fdocs\u002Fcloudflare\u002Fupdates",{"title":81,"url":82},"Backups on Cloudflare","\u002Fdocs\u002Fcloudflare\u002Fbackups",{"title":84,"url":85},"Remove a Cloudflare Server","\u002Fdocs\u002Fcloudflare\u002Fremove-a-server",{"id":87,"title":88,"pages":89},"self-host","Self-host",[90,93,96,99],{"title":91,"url":92},"Run a Server on a VPS","\u002Fdocs\u002Fself-host\u002Fvps",{"title":94,"url":95},"Run a Server with Docker Compose","\u002Fdocs\u002Fself-host\u002Fdocker",{"title":97,"url":98},"Run a Server on Coolify","\u002Fdocs\u002Fself-host\u002Fcoolify",{"title":100,"url":101},"Compute Nodes","\u002Fdocs\u002Fself-host\u002Fcompute-nodes",{"id":103,"title":104,"pages":105},"concepts","Concepts",[106,109,112,115,118],{"title":107,"url":108},"Servers and the Shell","\u002Fdocs\u002Fconcepts\u002Fserver-and-shell",{"title":110,"url":111},"Accounts, Members and Roles","\u002Fdocs\u002Fconcepts\u002Faccounts-members-roles",{"title":113,"url":114},"Agents, Tasks and Runs","\u002Fdocs\u002Fconcepts\u002Fagents-tasks-runs",{"title":116,"url":117},"Files and backups","\u002Fdocs\u002Fconcepts\u002Ffiles-and-backups",{"title":119,"url":120},"Releases and updates","\u002Fdocs\u002Fconcepts\u002Freleases-and-updates",{"id":9,"title":10,"pages":122},[123,126,129,132,135,136],{"title":124,"url":125},"Agents overview","\u002Fdocs\u002Fagents\u002Foverview",{"title":127,"url":128},"Models and Providers","\u002Fdocs\u002Fagents\u002Fmodels-and-providers",{"title":130,"url":131},"Connect an MCP client","\u002Fdocs\u002Fagents\u002Fmcp",{"title":133,"url":134},"External agents","\u002Fdocs\u002Fagents\u002Fexternal-agents",{"title":4,"url":6},{"title":137,"url":138},"Schedules","\u002Fdocs\u002Fagents\u002Fschedules",{"id":140,"title":141,"pages":142},"guides","Guides",[143,146,149,152,155,158],{"title":144,"url":145},"Chat","\u002Fdocs\u002Fguides\u002Fchat",{"title":147,"url":148},"Projects and Tasks","\u002Fdocs\u002Fguides\u002Fprojects-and-tasks",{"title":150,"url":151},"Mail","\u002Fdocs\u002Fguides\u002Fmail",{"title":153,"url":154},"Calls and Live","\u002Fdocs\u002Fguides\u002Fcalls",{"title":156,"url":157},"Notifications","\u002Fdocs\u002Fguides\u002Fnotifications",{"title":159,"url":160},"Telegram","\u002Fdocs\u002Fguides\u002Ftelegram",{"id":162,"title":163,"pages":164},"reference","Reference",[165,168],{"title":166,"url":167},"Glossary","\u002Fdocs\u002Freference\u002Fglossary",{"title":169,"url":170},"Troubleshooting","\u002Fdocs\u002Freference\u002Ftroubleshooting",{"title":133,"url":134},{"title":137,"url":138},1793335826191]