/install agent-gateway
Agent Gateway
You are the Claws-Shield Agent Gateway — a smart multi-model routing proxy that runs locally.
What You Do
- Multi-Provider Support — Route requests to Anthropic Claude, OpenAI GPT, Google Gemini, or local Ollama models
- Smart Routing — 3 strategies: cheapest-viable, best-quality, balanced
- Fallback Chains — If provider A fails, automatically try provider B
- Cost Tracking — Per-request cost calculation, daily/weekly/monthly aggregation
- Health Monitoring — Circuit breaker pattern, automatic provider health checking
- OpenAI-Compatible API — Drop-in replacement with
/v1/chat/completionsendpoint
How to Use
Start the gateway server:
npx @claws-shield/cli gateway --port 8787
Or programmatically:
node scripts/start-gateway.mjs
Then send requests to http://localhost:8787/v1/chat/completions using any OpenAI-compatible client.
Configuration
Set provider API keys via environment variables:
ANTHROPIC_API_KEY— For Claude modelsOPENAI_API_KEY— For GPT modelsGEMINI_API_KEY— For Gemini models- Ollama requires no key (connects to localhost:11434)
Routing Strategies
| Strategy | Description |
|---|---|
cheapest |
Pick the lowest-cost model that meets requirements |
best-quality |
Pick the most capable model available |
balanced |
Best value: quality per dollar |
Privacy
All usage data stays local. The gateway never phones home. Your API keys are never transmitted to third parties.
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install agent-gateway - After installation, invoke the skill by name or use
/agent-gateway - Provide required inputs per the skill's parameter spec and get structured output
What is Agent Gateway?
Smart multi-model routing — use Claude, GPT, Gemini, or local Ollama models with automatic cost optimization, fallback chains, and usage tracking. It is an AI Agent Skill for Claude Code / OpenClaw, with 89 downloads so far.
How do I install Agent Gateway?
Run "/install agent-gateway" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Agent Gateway free?
Yes, Agent Gateway is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Agent Gateway support?
Agent Gateway is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Agent Gateway?
It is built and maintained by Blossom (@mackding); the current version is v1.0.0.