← 返回
未分类 Key

Tavily Quota Router

Tavily quota-aware multi-key search router. Use when you want reliable Tavily-backed web search across multiple API keys, automatic failover for invalid/rate...
Tavily 配额感知多密钥搜索路由器。适用于需要跨多个API密钥进行可靠Tavily网络搜索、自动故障转移处理无效/限速情况的场景。
fangtang0206 fangtang0206 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 2
Stars
📥 393
下载
💾 4
安装
1
版本
#latest

概述

Tavily Quota Router

Use this skill for multi-key Tavily search routing. Do not confuse it with OpenClaw's built-in web_search provider.

What this skill does

  • Reads multiple Tavily API keys from config/keys.json
  • Syncs each key's real usage from Tavily's official /usage endpoint
  • Chooses a healthy key automatically before each search
  • Skips invalid, rate-limited, exhausted, or cooled-down keys
  • Exposes status information for every configured key

Best use cases

Use this skill when the user wants any of the following:

  • Multiple Tavily API keys with automatic routing
  • Quota-aware Tavily search instead of single-key search
  • Better resilience when one key becomes invalid or temporarily unavailable
  • Visibility into per-key usage and remaining plan quota

Files

  • config/keys.json - active multi-key configuration
  • config/keys.example.json - configuration example
  • state/quota.json - local runtime state and cooldown markers
  • scripts/tavily_multi_key.py - core router script

If config/keys.json is still empty, copy the structure from config/keys.example.json and add real keys before searching.

Commands

Show status:

python3 scripts/tavily_multi_key.py status

Test all keys:

python3 scripts/tavily_multi_key.py test-keys

Search:

python3 scripts/tavily_multi_key.py search --query 'OpenClaw docs' --count 5

Reset only local state:

python3 scripts/tavily_multi_key.py reset-month

Usage rules

  1. Check config/keys.json first.
  2. If no keys are configured, stop and tell the user to add keys.
  3. Prefer the bundled script over ad-hoc Tavily requests.
  4. Be clear that this is a multi-key Tavily wrapper, not the built-in OpenClaw web_search provider.
  5. If the user later wants this behavior wired into their default search stack, handle that as a separate configuration task instead of silently mutating the built-in provider.

Routing policy

  • Sync usage via Tavily's official /usage endpoint
  • Prefer keys with more remaining quota
  • Prefer lower search_usage when remaining quota is comparable
  • Disable keys on 401/403
  • Cool down keys temporarily on transient errors like 429, 5xx, or timeouts

Example config

{
  "cooldown_minutes": 10,
  "keys": [
    "tvly-xxx1",
    "tvly-xxx2"
  ]
}

Notes

  • This skill relies on Tavily's official API responses for usage and plan data.
  • Local state is only used for cooldown/error handling and last synced snapshots.
  • This skill is designed for controlled multi-key routing, not anonymous/public key distribution.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-31 06:22 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,234 📥 269,143
ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 832 📥 301,796
ai-agent

self-improving agent

pskoett
捕获经验教训、错误及修正内容,以实现持续改进。适用于以下场景:(1)命令或操作意外失败;(2)用户纠正Claude(如“不,那不对……”“实际上……”);(3)用户请求的功能不存在;(4)外部API或工具出现故障;(5)Claude发现自身
★ 4,095 📥 822,897