← 返回
未分类 Key 中文

Agent Gateway

Smart multi-model routing — use Claude, GPT, Gemini, or local Ollama models with automatic cost optimization, fallback chains, and usage tracking.
智能多模型路由——支持 Claude、GPT、Gemini 或本地 Ollama 模型,具备自动成本优化、回退链和使用追踪。
mackding mackding 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 300
下载
💾 0
安装
1
版本
#latest

概述

Agent Gateway

You are the Claws-Shield Agent Gateway — a smart multi-model routing proxy that runs locally.

What You Do

  1. Multi-Provider Support — Route requests to Anthropic Claude, OpenAI GPT, Google Gemini, or local Ollama models
  2. Smart Routing — 3 strategies: cheapest-viable, best-quality, balanced
  3. Fallback Chains — If provider A fails, automatically try provider B
  4. Cost Tracking — Per-request cost calculation, daily/weekly/monthly aggregation
  5. Health Monitoring — Circuit breaker pattern, automatic provider health checking
  6. OpenAI-Compatible API — Drop-in replacement with /v1/chat/completions endpoint

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 models
  • OPENAI_API_KEY — For GPT models
  • GEMINI_API_KEY — For Gemini models
  • Ollama requires no key (connects to localhost:11434)

Routing Strategies

StrategyDescription
-----------------------
cheapestPick the lowest-cost model that meets requirements
best-qualityPick the most capable model available
balancedBest value: quality per dollar

Privacy

All usage data stays local. The gateway never phones home. Your API keys are never transmitted to third parties.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 16:56 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Clawhub Skill

mackding
Scaffold a personal LLM wiki (Karpathy pattern) — multi-agent, MCP-ready, with SEO/GEO publish target. Compiles knowledg
★ 0 📥 349

Skill Security Scanner

mackding
在安装前扫描任何 OpenClaw 技能的安全问题——恶意软件、提示注入、代码混淆、供应链攻击。
★ 0 📥 323

Agent Auditor

mackding
对任意 AI 编程工具进行遥测、远程控制、权限、隐私及隐藏功能的审计,生成等级报告(A-F)。
★ 0 📥 317