/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.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install agent-gateway - 安装完成后,直接呼叫该 Skill 的名称或使用
/agent-gateway触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Agent Gateway 是什么?
Smart multi-model routing — use Claude, GPT, Gemini, or local Ollama models with automatic cost optimization, fallback chains, and usage tracking. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 89 次。
如何安装 Agent Gateway?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install agent-gateway」即可一键安装,无需额外配置。
Agent Gateway 是免费的吗?
是的,Agent Gateway 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Agent Gateway 支持哪些平台?
Agent Gateway 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Agent Gateway?
由 Blossom(@mackding)开发并维护,当前版本 v1.0.0。