Connect a coding agent to an LLM gateway
Point the coding agents on your labeled workstations at your LLM gateway, with the gateway key stored as a Secret.
Point the coding agents on your labeled workstations at your LLM gateway, with the gateway key stored as a Secret. You want this when your team sends model requests through a gateway such as OpenRouter. Then you don’t set up each agent by hand. The steps work for any of the supported agents that an LLM Integration configures. The examples use Claude Code, which is only an example.
Prerequisites
- Install Ringleader, with the Ringleader application running.
- An account with an LLM gateway, and its key. The examples use OpenRouter.
- A namespace to work in. The examples use
acme. - A label that selects the workstations to connect. The examples use
team: platform. Selectors describes how labels select. - A running workstation in that namespace. The examples use a workstation named
my-agent-box; replace it with yours. To create one, follow the Quickstart and use your own name. Then runrl workstation label my-agent-box team=platform -n acme. Ringleader applies the configurations that select it on the workstation’s next configuration pass.
Store the gateway key as a Secret
Run rl secret create with the key. The Secret stays in your namespace, and Ringleader
masks its value wherever it shows it:
rl secret create openrouter -n acme --from-string token=<your-openrouter-key>Imperative creation commands lists every option of the command.
Add a coding agent to the workstations
A devtool in a WorkstationConfig installs a coding agent. The same label selects the workstations that get it.
To install your agent, declare its devtool: claude-code, codex, opencode or pi. An LLM
Integration configures none of the other two agents, Cursor CLI and Antigravity CLI. This
example installs Claude Code. Supported agents
says what each devtool gives you, and
Coding agent setup
says how to start each agent.
Save this file as
claude-code.yaml. Changeteam: platformto your label, andacmeto your namespace:apiVersion: workstations.ringleader.dev/v1 kind: WorkstationConfig metadata: name: claude-code namespace: acme spec: selector: matchLabels: team: platform devtools: - name: claude-code # the example agent: use your agent's devtoolRun
rl apply -f claude-code.yaml. Ringleader then installs Claude Code on every workstation labeledteam: platform.
Apply an Integration for the gateway
An Integration holds the gateway’s address and a reference to the Secret.
Save this file as
llm.yaml. Changeteam: platformto your label, andacmeto your namespace:apiVersion: workstations.ringleader.dev/v1 kind: Integration metadata: name: llm namespace: acme spec: type: llm selector: matchLabels: team: platform llm: endpoint: source: external vendor: openrouter # picks the URL and the protocol credentialRef: name: openrouter # a Secret in this namespace key: tokenRun
rl apply -f llm.yaml. Ringleader then points the agents it configures on every workstation labeledteam: platformat the gateway.
With source: external, Ringleader delivers the key to each of those workstations.
Secrets on the workstation
says what that exposes. To keep the key off the workstations, follow
Keep the gateway key off the workstation
instead.
You write no base URL, no placeholder key and no agent settings, because vendor selects
them. The Integration reference lists every field
and every vendor.
An Integration does not configure every agent. Cursor CLI and Antigravity get nothing from it.
With vendor: custom it configures Claude Code only. Codex, pi and OpenCode depend on the
vendor and on model. Supported agents
says what each agent gets. For an agent it does not configure, follow
Run your own coding agent in Ringleader.
Optional: Choose the model for other agents
Claude Code needs no model. Codex, pi and OpenCode use the model you name. To choose one, add
model: anthropic/claude-sonnet-4.5 under endpoint in llm.yaml, which is an OpenRouter
model name. Use your gateway’s own name for the model. Then run rl apply -f llm.yaml again.
The pi and OpenCode providers
says when those two get a provider.
Check what the Integration put on a workstation
Read the generated configuration that Ringleader built from the Integration, then the endpoint file on the workstation.
- On your computer, run
rl integration get llm -n acme -o yaml.status.generatedConfignames the configuration. - Run
rl workstationconfig get integration-llm -n acme -o yaml. The output is the configuration. - Open a new shell on the workstation with
rl shell my-agent-box -n acme. A shell that was already open keeps the environment it started with. - In that shell, run
cat /etc/ringleader/integrations/llm.json. The file lists the names of the environment variables the Integration sets, such asANTHROPIC_BASE_URL, and never their values.
The endpoint files describes what each file carries.
Troubleshoot
- If a workstation has no endpoint file, check that its labels match the Integration’s
matchLabels, as Integration reach describes. If they match, check that its owner can read the Secret. The warning in LLM gateways for coding agents says how to give access. - If a variable still has its old value in a terminal, that shell is older than the Integration. Open a new shell.
- If
rl applyrefuses the Integration because of the model, your organization’s policy limits which models you can name, as Policy and OrgPolicy describes. Choose a model the policy allows.
Next steps
- Run your own coding agent in Ringleader connects an agent that an Integration does not configure, and keeps its key off the workstation.
- LLM gateways for coding agents explains the vendors and models, how Ringleader keeps a gateway key, the pi and OpenCode providers, and how to override an Integration.
- Keep the gateway key off the workstation stores the key with Ringleader instead of delivering it to the workstations.
- Integration behavior says which workstations an Integration reaches, and what happens when it stops applying.
- Integration lists the fields, the vendors and the endpoint files.