relay starts Claude Code pointed at Autonomous Relay Agents: requests run on your own provider key, under your organisation’s guardrails, allowlists and budgets, and appear in Activity tagged with the agent that made them. No key to paste and no environment to set by hand.
relay is not on npm yet: it is built and tested, and being prepared for publication. This page will give the install command when it is.Commands
relay claude # sign in on first use, then start Claude Code relay claude --model anthropic/claude-sonnet-5 -p "explain this repo" relay login # sign in again (opens your browser) relay status # the stored key's label, limit and expiry relay logout # forget the stored key relay --help | relay --version
Before the first run
- Claude Code installed:
npm install -g @anthropic-ai/claude-code. - Your Anthropic key added under BYOK (Bring your own key): requests run on it, at Anthropic’s price.
- Node.js 20 or later.
Signing in
The first relay claude opens autonomousrelay.com/auth in your browser (OAuth with PKCE). Approving issues an inference key with a $10 spend limit and a 7-day expiry, which you can revoke under API keys. It is stored, readable by you alone, in ~/.config/autonomousrelay/credentials.json (%APPDATA% on Windows). When it expires, the next run signs you in again.
What it sets for Claude Code
ANTHROPIC_BASE_URL: the gateway.ANTHROPIC_AUTH_TOKEN: the stored key.ANTHROPIC_API_KEYis removed for the launch, so a personal Anthropic key in your shell is never sent to the gateway.X-Autonomous-Relay-Agent: claude-codeon every request, so Activity, budgets and alerts can tell agents apart.
--model is relay’s own and takes any catalogue id; every other argument goes to Claude Code unchanged.
Another gateway
RELAY_BASE_URL points relay at another gateway, such as a self-hosted one (Self-hosted deployment). A key is only ever sent to the gateway that issued it.
Agents
Claude Code, as relay claude. More agents are added one at a time, each once it has been run end to end.