Skip to main content
Connecting GitHub to AgentRail enables three things: AgentRail can create and reuse pull requests through its provider adapter, read GitHub Actions CI status for agent branches, and observe code review feedback so it knows when to relaunch an agent for fixes. Run agentrail provider connect github to set this up interactively.

Connect GitHub

The interactive setup asks for your GitHub token in a hidden prompt, validates credentials, runs provider readiness checks, applies safe local fixes where it can, and prints exact next steps for anything only your GitHub account or repo owner can change.
For non-interactive environments such as CI pipelines, set the GITHUB_TOKEN environment variable before running the connect command.

What it sets up

Once connected, AgentRail uses GitHub for:

Review policy

During agentrail provider connect github, you choose a review policy that controls whether AgentRail waits for PR approval before shipping.
Explicit “Request changes” review decisions always block ship, regardless of which policy you choose. The agent must address the review comments and report completion before AgentRail will attempt to ship again.

Health checks

Use these commands to verify that your GitHub connection is working correctly.
provider test runs the same readiness check as provider doctor — it is not a lightweight token probe. A passing test means GitHub is ready for AgentRail’s full lifecycle, not merely that the token exists. You can also check the status of all connected providers at once:

Troubleshooting