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.

Docker lets you run the AgentRail API server as a container. This is a server-only path — it starts the API process but does not create agent credentials, configure routing, or set up providers. You complete those steps with the CLI after the container is running.
The CLI-managed path (agentrail initagentrail server start) is recommended for most setups because it handles agent credentials, routing, and provider state automatically. Use Docker when you specifically want to run the server process in a container.

Start the server

From the root of the AgentRail repository, run:
docker compose up --build
The API starts and listens on http://127.0.0.1:3000 by default. You should see output like:
Starting AgentRail API.
✓ AgentRail API ready at http://127.0.0.1:3000
Keep this terminal running.

Complete setup with the CLI

With the container running, open a second terminal and complete the CLI setup steps:
1

Install the CLI

If you have not already installed the CLI globally:
npm install -g @agentrail-core/cli
2

Run init

Point init at the running container:
agentrail init --base-url http://127.0.0.1:3000
This writes local config to ~/.agentrail/ and creates operator bootstrap state.
3

Create your first agent

agentrail agent create
The agent wizard creates scoped credentials, writes ~/.agentrail/agent.env, and configures starter routing for your repo.
4

Verify with doctor

agentrail doctor
Doctor checks that the API is reachable, your agent credentials are valid, routing state exists, and assigned work is visible. Do not treat setup as complete until doctor passes.

Connect providers (optional)

After doctor passes, connect your providers to enable live issue intake, CI, and review:
agentrail provider connect github
agentrail provider connect circleci
agentrail provider connect linear
Each command walks you through credential setup and ends with readiness checks.
Run agentrail provider doctor after connecting providers to confirm they are correctly configured and ready for the agent lifecycle.

Load agent credentials

Before starting a coding agent manually, source the agent env file:
source ~/.agentrail/agent.env
cd /path/to/target-repo
codex
For managed local agents, agentrail server start handles this automatically. In the Docker path, your coding agent needs the env vars set manually or through whatever environment management your container setup uses.