Browse the docs

Agents and Gateways

ClawIDE runs any coding-agent CLI in a terminal pane, and can point each agent at a model gateway such as OpenRouter, a self-hosted LiteLLM or a local Ollama. Both features are free.

Settings β†’ Gateways: the agent list with installed badges, gateway cards with masked keys, and the per-agent gateway dropdown.

Agent CLIs

ClawIDE runs any agent CLI on your system, with no limit on how many. It ships one-click presets for 17 of them, plus a plain shell or any custom command. For each one it checks whether the binary is on your PATH, shows an Installed badge, and gives you a copyable install command for the rest.

AgentBinaryGateway supportInstall
Claude CodeclaudeAnthropic-compatiblecurl -fsSL https://claude.ai/install.sh | bash
CodexcodexOpenAI-compatible
Through a gateway, only OpenAI-family models are reliable.
npm i -g @openai/codex
Gemini CLIgeminiNone
Can't use OpenAI- or Anthropic-style gateways.
npm i -g @google/gemini-cli
OpenCodeopencodeOpenAI-compatiblecurl -fsSL https://opencode.ai/install | bash
AideraiderOpenAI-compatiblepython -m pip install aider-install && aider-install
GoosegooseOpenAI-compatible
Install with the method in the Goose docs.
See the vendor's docs
CrushcrushNone
Configured through its own config file, not env vars.
brew install charmbracelet/tap/crush
Qwen CodeqwenOpenAI-compatiblenpm i -g @qwen-code/qwen-code@latest
AmpampNone
Has no bring-your-own base URL.
npm i -g @ampcode/cli
ClineclineNone
No env-based gateway configuration.
npm i -g cline
KilokiloNone
No env-based gateway configuration.
npm i -g @kilocode/cli
Cursor CLIagentNone
Has no bring-your-own base URL.
curl https://cursor.com/install -fsS | bash
Copilot CLIcopilotOpenAI-compatiblenpm i -g @github/copilot
DroiddroidNone
No env-based gateway configuration.
curl -fsSL https://app.factory.ai/cli | sh
Kirokiro-cliNone
Install with the method in the Kiro docs.
See the vendor's docs
OpenHandsopenhandsOpenAI-compatibleuv tool install openhands --python 3.12
ContinuecnNone
No env-based gateway configuration.
npm i -g @continuedev/cli

Choose an agent per pane from the pane’s provider selector. The default agent for new panes is set in Settings or in the setup wizard. Each CLI keeps its own login and configuration; ClawIDE doesn’t change your dotfiles.

Model gateways

A gateway sits between an agent and the model provider. Most gateways expose an Anthropic-compatible API, an OpenAI-compatible API, or both, so pointing an agent at one is a matter of setting the right environment variables for that pane.

GatewayAnthropic-compatible base URLOpenAI-compatible base URLNotes
OpenRouterhttps://openrouter.ai/apihttps://openrouter.ai/api/v1
Requestyhttps://router.requesty.aihttps://router.requesty.ai/v1
LiteLLM<your base URL><your base URL>/v1Self-hosted; base URL required.
Portkeyhttps://api.portkey.aihttps://api.portkey.ai/v1Anthropic mode needs extra headers (advanced).
Vercel AI Gatewayhttps://ai-gateway.vercel.shhttps://ai-gateway.vercel.sh/v1
Cloudflare AI GatewayBase URL built from your account and gateway IDs.
DeepInfrahttps://api.deepinfra.com/anthropichttps://api.deepinfra.com/v1/openai
Fireworkshttps://api.fireworks.ai/inferencehttps://api.fireworks.ai/inference/v1
Martianhttps://api.withmartian.com/v1
Together AIhttps://api.together.xyz/v1
Groqhttps://api.groq.com/openai/v1
Ollamahttp://localhost:11434http://localhost:11434/v1Runs locally.
LM Studiohttp://localhost:1234http://localhost:1234/v1Runs locally.
Custom Anthropic-compatible<your base URL>
Custom OpenAI-compatible<your base URL>

Connect a gateway

  1. Open Settings β†’ Gateways.
  2. On the gateway’s card, paste your API key. After you save, the key is only ever shown masked, for example sk-o…cdef.
  3. For LiteLLM, Cloudflare and the custom endpoints, enter the base URL. You can also override the base URL of any other gateway.
  4. Click Test. ClawIDE requests the gateway’s model list with your key, with a 5-second timeout, and shows the result.
  5. In the agent list, pick a gateway for each agent that should use one. The dropdown only lists gateways that agent can talk to.

New panes for that agent pick up the gateway. Panes that were already running keep the environment they started with, so start a new session to switch.

What a pane receives

ClawIDE sets the variables on the pane’s tmux session (tmux new-session -e KEY=VALUE). They never appear in the command line, in ps output, in scrollback or in logs.

For Claude Code with an Anthropic-compatible gateway, for example OpenRouter:

ANTHROPIC_BASE_URL=https://openrouter.ai/api
ANTHROPIC_AUTH_TOKEN=<your key>
ANTHROPIC_API_KEY=

Agents that use the OpenAI-compatible API get their own variables:

AgentVariables
AiderOPENAI_API_BASE, OPENAI_API_KEY
GooseOPENAI_HOST, OPENAI_API_KEY, or GOOSE_PROVIDER=openrouter with OPENROUTER_API_KEY
Qwen CodeOPENAI_BASE_URL, OPENAI_API_KEY
Copilot CLICOPILOT_PROVIDER_BASE_URL, COPILOT_PROVIDER_API_KEY
OpenHandsLLM_BASE_URL, LLM_API_KEY (OpenHands needs --override-with-envs)

For OpenCode and Codex, Settings β†’ Gateways shows the exact variables ClawIDE sets.

Limits

Gateway support depends on what each CLI allows:

  • Codex through a gateway is only reliable with OpenAI-family models.
  • Gemini CLI can’t use OpenAI- or Anthropic-style gateways.
  • Amp and Cursor CLI have no bring-your-own base URL.
  • Crush, Cline, Kilo, Droid and Continue aren’t configurable through environment variables.
  • Portkey needs extra headers in Anthropic mode, so it’s marked advanced.

When an agent can’t use a gateway, the settings card explains why instead of applying a configuration that won’t work.

Where keys are stored

Keys live in ~/.clawide/secrets.json, created with mode 0600 and written atomically. Each key is stored under a namespaced name such as gateway:openrouter. Assignments and base URLs are saved in config.json as agent_gateways and gateway_settings; keys are never written there.

A 0600 file is readable only by your user account, but it isn’t encrypted. It protects keys from other users on the machine and from accidentally sharing config.json. It doesn’t protect against root or malware running as you.

API

All endpoints are free. No response ever includes a raw key.

EndpointMethodDescription
/api/agent-clisGETAgent catalog with installed, install, docs_url, gateway_wire and default for each agent
/api/gatewaysGETGateways with base URLs, configured and key_masked, plus current assignments
/api/gateways/{id}PUTSave api_key and/or base_url. Returns 400 for an unknown gateway, a non-http(s) URL or a missing required base URL
/api/gateways/{id}DELETERemove the key and settings, and clear assignments that use the gateway. Returns 204
/api/gateways/assignmentsPUTSet {"<agent>": "<gateway>"}; an empty string clears it. Returns 400 for unknown ids or an incompatible agent
/api/gateways/{id}/testPOSTCheck the key against the gateway. Returns {"ok": bool, "message": string}