Work from GitHub
On this page
A GitHub automation starts a coding agent when something happens on GitHub that
you'd otherwise hand off yourself: someone requests your review, a pull request
is ready, a label is added, or you mention @boxes-dev in a comment. The agent
will work on a fresh devbox, and boxes.dev can react and comment on the pull
request or issue so everyone can follow along.
Before you start
- Connect your GitHub account in Integrations β GitHub. See Connect GitHub.
- Make sure the boxes.dev GitHub App can reach the repositories you want to watch, and that they're in your project's Template box, or its Team Template in a managed project. Runs start from your latest Template box snapshot or the Team Template's current saved version, so keep it current if tasks need recent changes.
- Leave GitHub CLI access on in Integrations β GitHub if the agent should check out pull requests, open pull requests, and comment as you. See If GitHub CLI access is off.
You own the GitHub automations you create, so their runs will use your boxes.dev account, your project's saved environment, and your devbox capacity.
Create a GitHub automation
- In the desktop app, open Automations and choose New automation.
- Choose From GitHub as the trigger.
- Name the automation and write the prompt the agent should follow for each event, such as "Review this pull request and summarize what it changes. Don't push changes."
- Under GitHub setup, check the repositories to watch. A project with one repository will have it checked already.
- In What starts a run, choose a trigger and fill in its options.
- Choose what boxes.dev should post on GitHub.
- Choose Create. The automation will be saved paused.
- Choose Activate to start accepting GitHub events.
If a repository shows No App access, choose the action beside it, such as Grant repository access, finish on GitHub, and then choose Check again. A repository marked No write access can't be used until you can push to it on GitHub, for example a public repository you've only cloned. A repository marked Not in the Template box has been removed from your project; uncheck it before you change other repositories. Renaming a repository on GitHub needs no changes in boxes.dev.
Choose what starts a run
Each automation uses one trigger:
- Review requested from me: a run will start when someone requests your review on a pull request that isn't a draft. If they request it while the pull request is a draft, the run will start when it's marked ready for review. Requests to a team you're on don't count.
- Command in a comment from me: a run will start when you write the
command, such as
@boxes-dev !review, in a comment on an issue or pull request, or in the description of an issue you open. Enter the command name after the fixed@boxes-dev !. - Label added: a run will start when someone adds your label (
agentby default) to an issue, a pull request, or either one, as chosen in Added to. - PR ready for review: a run will start when someone opens a pull request that's ready for review, reopens one, or marks a draft ready.
Label added and PR ready for review also let you choose Who can start runs: Members and collaborators of the repository, Teammates with GitHub connected (you and boxes.dev teammates who connected their GitHub accounts), or Only me.
Closed issues and pull requests, pull requests from forks, and bots never start runs. Neither does anything boxes.dev posts on GitHub, including comments the agent posts through boxes.dev.
Each command name can belong to only one of your GitHub automations. Command
names can contain letters, numbers, dashes, and underscores, and help, stop,
and cancel are reserved.
Mention @boxes-dev without a command
The Default behavior lets you ask for help on GitHub by mentioning
@boxes-dev in a comment, with your comment as the request.
- Open Integrations β GitHub.
- On the Default behavior card, choose Create automation. It will start paused and use the coding agent and model you use for new threads.
- To add standing instructions for every mention, choose Configure and write them in the prompt. Choose Save if you edit it.
- Choose Activate.
The default covers every repository in your Template box that you can push to
and boxes.dev can reach. Mention @boxes-dev in a comment on an issue or pull request, including
a comment on a pull request's changes, or in the description of an issue you
open. Mentions in pull request descriptions, quoted text, and code don't
count. Only your own mentions start your default; a teammate's mention will
use their own default and account.
Its threads appear in your main thread list. You can have one active default for each repository.
Follow a run on GitHub
The first matching event on an issue or pull request will start a run on a new devbox and link its thread to that issue or pull request. Its title will be generated from the request.
After a run starts, mention @boxes-dev again on the same issue or pull
request to send the agent a follow-up in that thread. If the agent is working,
your message will wait for it to finish its turn. Other comments won't reach
the agent. Each automation keeps its own thread, so a pull request that
matches two of your automations will get one from each. Once you archive a
thread, the next matching event will start a new run.
The agent receives your prompt and the event's details, such as the repository, pull request or issue, its description or your comment, author, labels, and branches.
Choose what boxes.dev posts on GitHub
The switches under What should boxes.dev post on GitHub? apply to new and existing threads:
- React with π when a request arrives will mark the comment, issue, or pull request that started a run or sent a follow-up.
- Comment when a run starts will post a link to the new thread, or explain why a run couldn't start, for example when too many of your devboxes are awake.
- Comment when the run ends will post when the agent finishes, fails, stops, or needs input, with a link to the thread.
- Include the agent's final response will add the agent's answer to that comment on private repositories. It's on by default for the Default behavior.
- Comments the agent is asked to post will let the agent comment on its pull request or issue when your request or prompt asks for it, such as a summary of its review.
Comments on public repositories are visible to anyone, so on those the end-of-run comment will only link to the thread, without the agent's answer.
If GitHub CLI access is off
With GitHub CLI access off, boxes.dev won't sign the GitHub CLI in for you. The agent will check out a pull request with your project's Git access instead, and it can push branches, but it won't be able to open pull requests, comment, or read CI results. Turn on Comment when the run ends and Include the agent's final response so its answer still appears on GitHub for private repositories.
Check a run that didn't start
Open the automation and check that it's active and that the repository is checked without an access warning. Then check that the event matches the trigger: for the "from me" triggers, you need to be the requested reviewer or the comment's author, and Who can start runs needs to allow the person who acted. For a mention, make sure it isn't in quoted text or code and that the command name matches one of your automations.
Run history shows runs that were skipped, for example because too many of your devboxes were awake.
An automation will stop with an error if you disconnect GitHub or the boxes.dev GitHub App loses access to one of its repositories. Reconnect GitHub or restore access, or uncheck the repository, and then choose Recover in the automation. After a repository moves to another owner, open the automation so its repository list updates, and then choose Recover.