Enable AI agents to work with full projects: access public and private repositories
Enabling your AI agent to work on full existing code projects unlocks a new set of capabilities. This guide explains how to give your AI agent access to entire codebases, allowing it to make changes and run projects end-to-end like a human engineer.
While you can use normal shell exec commands to clone a public GitHub repository, Runloop provides a more powerful feature called CodeMounts
. This allows you to mount a repository into your Devbox at a specific path.
This will clone the repo onto the Devbox and allow you to pull changes and branches. Note if you want to create pull requests or mutative actions you must configure your Git Auth as described below.
To enable your Devbox to interact with private GitHub repositories, you need to provide proper authentication credentials. Runloop offers several methods to achieve this.
When you create a Devbox with a Code Mount, Runloop automatically sets up the GH_TOKEN
environment variable and credential cache for you. This authenticates all command-line tools in your Devbox with your GitHub token. This allows your AI agent to use Github and open authenticated pull requests using the gh
cli tool.
Alternatively, you can configure your Devbox manually using the setup_commands
argument:
This command:
GH_TOKEN
environment variable with your GitHub tokenAdjust the --timeout
value in the git config command to change how long the credentials are cached.
By following these guidelines, you can securely enable your AI agent to work with full projects and private repositories, expanding its capabilities within the Runloop Devbox environment.