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. RunDocumentation Index
Fetch the complete documentation index at: https://agentrail.app/docs/llms.txt
Use this file to discover all available pages before exploring further.
agentrail provider connect github to set this up interactively.
Connect GitHub
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:| Capability | Description |
|---|---|
| PR submission | AgentRail creates or reuses a pull request from persisted task source metadata. The response includes the PR URL and whether it was created or reused. |
| GitHub Actions CI status | AgentRail reads check run results for agent branches and surfaces compact pass/fail summaries. |
| Code review observation | AgentRail watches review decisions and blocks ship until review requirements are satisfied. |
Review policy
Duringagentrail provider connect github, you choose a review policy that controls whether AgentRail waits for PR approval before shipping.
| Policy | Behavior |
|---|---|
github-rules (default) | AgentRail follows GitHub’s own review signals for the repository. |
always-require | AgentRail always requires at least one approval for AgentRail-created PRs, regardless of branch protection settings. |
never-require | AgentRail skips approval waits once CI is green. |
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
| Symptom | Likely cause | Fix |
|---|---|---|
| CI stays pending | No live GitHub adapter configured, or task is missing persisted source metadata | Confirm GITHUB_TOKEN is set, then inspect or repair task.source with agentrail task source repair. |
PR submission returns 404 | No live adapter matches the task | Verify the task has the required source metadata and that GITHUB_TOKEN is present. |
| Review observation not blocking ship | Review policy is never-require | Change the policy to github-rules or always-require via agentrail provider connect github. |
.png?fit=max&auto=format&n=TNCV8lxzL1ij3U4N&q=85&s=7345b71aa1c450c74f35b67c2655fc43)