Skip to main content

Documentation Index

Fetch the complete documentation index at: https://agentrail.app/docs/llms.txt

Use this file to discover all available pages before exploring further.

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

agentrail provider 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.
export GITHUB_TOKEN=ghp_...
agentrail provider connect github

What it sets up

Once connected, AgentRail uses GitHub for:
CapabilityDescription
PR submissionAgentRail 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 statusAgentRail reads check run results for agent branches and surfaces compact pass/fail summaries.
Code review observationAgentRail watches review decisions and blocks ship until review requirements are satisfied.

Review policy

During agentrail provider connect github, you choose a review policy that controls whether AgentRail waits for PR approval before shipping.
PolicyBehavior
github-rules (default)AgentRail follows GitHub’s own review signals for the repository.
always-requireAgentRail always requires at least one approval for AgentRail-created PRs, regardless of branch protection settings.
never-requireAgentRail skips approval waits once CI is green.
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.
agentrail provider doctor github
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:
agentrail provider status
agentrail provider doctor

Troubleshooting

SymptomLikely causeFix
CI stays pendingNo live GitHub adapter configured, or task is missing persisted source metadataConfirm GITHUB_TOKEN is set, then inspect or repair task.source with agentrail task source repair.
PR submission returns 404No live adapter matches the taskVerify the task has the required source metadata and that GITHUB_TOKEN is present.
Review observation not blocking shipReview policy is never-requireChange the policy to github-rules or always-require via agentrail provider connect github.