Your repo. Already there when your agent starts.
Connect a private GitHub repository, give your agent scoped access, and make the first command about your code.
An agent can have the right coding tool and still be missing the most useful thing: your code. Cloning a repository during setup gives it a project to work with from the beginning.
Connect the repository
In Create Agent, expand Advance options and check Clone Github Repository. Enter the owner and repository name in the two fields.
The configuration is a GitHub package, so it runs as part of startup alongside your other pre-installed tools. Agents Box installs Git if needed and clones the repository inside the guest.
Give it the access it needs
Selecting the clone option adds GITHUB_PERSONAL_ACCESS_TOKEN to the environment. Create a fine-grained GitHub token restricted to the repository you want the agent to use.
For cloning, grant Contents: read. If you want the agent to push commits, use Contents: read and write. GitHub also includes the required metadata access. Set an expiry appropriate for your work.
Read GitHub’s personal access token documentation.
The API checks repository and Contents access before creating the agent. A token that cannot access the selected repository is rejected before provisioning begins.
Find the clone
The repository lives at:
~/repos/OWNER/REPOSITORY
When checking a clone from the terminal, you can use an explicit path:
cd "$HOME/repos/OWNER/REPOSITORY" && ls -la
Git credentials are read from the guest environment by a credential helper. The token is not embedded in the repository’s remote URL.
Let the agent make a change
A small first task is a useful check of the whole flow: list the files, create a file, inspect the diff, and commit it. Pushing requires write access and may also be subject to your repository’s branch rules.
Use a dedicated test repository while you work out your setup. Once it behaves the way you expect, apply the same configuration to the project you want to build.