Set up your agents
claude, codex, cursor or cursor-agent) is on your PATH, it:
- installs the Agentrail skill, which tells the agent what Agentrail can do and when to use it. Claude Code reads it from
~/.claude/skills/agentrail, and Codex and Cursor share the copy in~/.agents/skills/agentrail. - adds Agentrail’s MCP server, named
agentrail, for every project of yours.
A connected agent appears in Settings · Agents under Your connections, and you can disconnect it there.
Options
Without the CLI
- Settings · Agents shows the command or entry that adds Agentrail’s MCP server to Claude Code, Codex, Cursor or another MCP host.
- In Claude Code,
/plugin marketplace add agentrail-co/agentrail-cli, then/plugin install agentrail@agentrail, installs the Agentrail skill. - Any agent that reads Agent Skills can install the skill with
npx skills add agentrail-co/agentrail-cli.
When an agent runs the CLI
The skill tells an agent to use theagentrail command, and the CLI is built for it:
- Inside a coding agent the CLI recognises, such as Claude Code, Codex, Gemini CLI, GitHub Copilot CLI or Goose, output is JSON. Setting the
AGENTenvironment variable does the same for any other agent. - Data goes to stdout and messages to stderr. Exit codes say what went wrong: see Exit codes.
- Every command and its inputs come from
agentrail toolsand--help, so the agent can find the one it needs.
Sign in without a terminal
An agent’s commands have no terminal for you to confirm a sign-in in. Runagentrail login there and it prints the sign-in page and a code, then stops:
expiresAt. The agent then runs agentrail login again, which finishes signing in:
agentrail login --insecure-storage to keep the sign-in in a file only you can read.