This guide gets a working local AgentRail instance up and verified on your machine. By the end,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.
agentrail doctor will pass, which means the local API is reachable, your agent credentials are valid, routing state exists, and the agent can see assigned work. That is the baseline you need before pointing any coding agent at AgentRail.
You need Node.js 24 or newer and
npm. Run node --version to check. Provider credentials (GitHub token, CircleCI token, Linear API key) are optional — you can add them after setup.Install the CLI
Install the AgentRail CLI globally with npm:If you prefer not to install globally, you can prefix any command with
npx @agentrail-core/cli instead of agentrail.Verify the install:Initialize AgentRail
Run the interactive setup wizard:
agentrail init writes local setup state under ~/.agentrail, creates a local operator bootstrap for your machine, and can create your first agent profile and agent env file in the same flow. Accept the prompt to create the first agent if you want the shortest path to a passing doctor check.If you are running in a non-interactive shell, provide explicit defaults:Start the local API
Keep this running in one terminal. The server starts the AgentRail API, activates provider delivery for any configured webhooks or polling, and keeps managed local agents alive.Expected output:
Create your first agent
If The wizard creates scoped local agent credentials, writes the managed agent env file, creates or updates the agent profile, and can configure starter routing for your selected repo.You can update an agent later with:
agentrail init already created your first agent, skip this step.In a second terminal, run the agent creation wizard:Verify setup with doctor
Run the health check:A passing doctor check means all of the following are true:
- The local API is reachable.
- The current agent env file is usable.
- The agent profile is active.
- Routing state exists for the current repo.
- The agent can see assigned work via
/tasks/mine?status=in_progress&limit=1.
What’s next
You now have a running local AgentRail instance. Here are the most common next steps:Connect providers
Add GitHub, CircleCI, or Linear credentials so AgentRail can handle real issue intake, PR submission, and CI status.
Understand task lifecycle
Learn how tasks flow from intake through routing, agent work, CI, review, and ship — and how
availableActions guides each step.Configure routing
Understand how AgentRail routes incoming issues to the right agent using rules-only or AI-assisted routing.
Installation details
Full prerequisites, Docker setup, and environment variable reference.
.png?fit=max&auto=format&n=TNCV8lxzL1ij3U4N&q=85&s=7345b71aa1c450c74f35b67c2655fc43)