Skip to main content
After you run agentrail init, all local configuration lives under ~/.agentrail/. You can inspect and update that configuration at any time using the agentrail config and agentrail repo commands — no need to edit files by hand.

View and update config

Run agentrail config show to print your current configuration to the terminal:
To update the base URL your CLI points at, use agentrail config set:
You can also update the provider mode in the same command:

Manage repos

AgentRail tracks which repositories agents are allowed to work in. Use the repo subcommands to add, list, or remove repos:
Routing fails closed if no repo is configured for the incoming task. Always verify that agentrail repo list shows the expected repository before running agents against it.

Provider modes

The --provider-mode flag controls how AgentRail interacts with external providers such as GitHub, CircleCI, and Linear. Set the mode during init or update it later:

Routing modes

AgentRail supports two routing modes, chosen during agentrail init or updated in ~/.agentrail/config.json: In ai_assist mode, AgentRail uses a local runner timeout of 180 seconds by default. If your runner is slow, raise routing.classifier.timeoutMs in config.json up to 600 seconds. Tasks that time out fall to triage.

Runner policy presets

When you create or update an agent with agentrail agent create or agentrail agent update, you can select a runner policy preset using --runner-policy. Each preset controls how aggressively the agent is allowed to take actions:

Code review policy

The GitHub code review policy controls whether AgentRail waits for a PR approval before shipping. Set it during agentrail init or when connecting GitHub: Pass this flag during init:

Managed run reclaim defaults

AgentRail keeps a durable run record for each managed local agent so it can avoid launching two agents on the same task at once. If a runner process disappears while a run is still marked starting or running, AgentRail reclaims that record after a conservative timeout and allows the task to run again.
AgentRail never reclaims awaiting_user runs. Those represent unresolved human action and must be resolved explicitly.
The default thresholds are:

Override with environment variables

All timeout values use seconds when set via environment variables:
When repeated infrastructure failures hit maxInfrastructureFailures, AgentRail blocks the task for user action instead of looping silently. Resolve the blocker with agentrail task resolve-blocker before restarting.