返回顶部
t

tavily-metered-search

Web search via Tavily API with built-in monthly usage tracking and quota management. Use when the user asks to search the web / look up sources / find links. Features: automatic usage counting, monthly limit enforcement, warning alerts. Alternative to Brave web_search.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
116
下载量
0
收藏
概述
安装方式
版本历史

tavily-metered-search

# Tavily Metered Search Web search with built-in usage tracking and quota management for Tavily API (free tier: 1000 searches/month). ## Quick Start ```bash # Basic search (Markdown output, default) python3 {baseDir}/scripts/tavily_search.py --query "AI news today" # With short answer python3 {baseDir}/scripts/tavily_search.py --query "what is RAG" --include-answer # JSON output python3 {baseDir}/scripts/tavily_search.py --query "python tutorial" --format raw python3 {baseDir}/scripts/tavily_search.py --query "python tutorial" --format brave # Skip counting (for testing) python3 {baseDir}/scripts/tavily_search.py --query "test" --no-count ``` ## Arguments | Argument | Default | Description | |----------|---------|-------------| | `--query` | (required) | Search query string | | `--max-results` | 5 | Number of results (1-10), configurable via config file | | `--format` | `md` | Output: `raw` (JSON), `brave` (JSON), `md` (Markdown) | | `--include-answer` | false | Include AI-generated short answer | | `--search-depth` | `basic` | `basic` or `advanced`, configurable via config file | | `--no-count` | false | Skip usage tracking (still consumes API quota) | ## Configuration Edit `config/config.json` to customize default settings: ```json { "limit": 900, "warningThreshold": 800, "searchDepth": "basic", "defaultMaxResults": 5 } ``` | Setting | Description | Default | |---------|-------------|---------| | `limit` | Monthly limit, blocks search when reached | 900 | | `warningThreshold` | Warning threshold, shows alert when reached | 800 | | `searchDepth` | Default search depth | basic | | `defaultMaxResults` | Default number of results | 5 | ## Usage Tracking - **Automatic tracking**: Each successful search increments a counter stored in `data/tavily-usage.json` - **Monthly reset**: Counter resets on the 1st of each month - **Limit enforcement**: When `limit` is reached, search is blocked with a message suggesting `web_fetch` as alternative - **Warning alert**: When `warningThreshold` is reached, a reminder is appended to search results ## Output Formats ### `md` (default) Human-readable Markdown list: ``` 1. Title https://example.com - Snippet text... ``` ### `raw` Full JSON with `query`, `answer?`, `results: [{title, url, content}]` ### `brave` Brave-like format: `{query, results: [{title, url, snippet}], answer?}` ## Requirements - Tavily API key via either: - Environment variable: `TAVILY_API_KEY` - `~/.openclaw/.env` file: `TAVILY_API_KEY=tvly-...` Get a free API key at https://tavily.com ## File Structure ``` tavily-metered-search/ ├── SKILL.md # Skill documentation ├── scripts/ │ └── tavily_search.py # Main search script ├── config/ │ └── config.json # User configuration └── data/ └── tavily-usage.json # Runtime state (auto-maintained) ``` ## Notes - Free tier: 1000 searches/month (default limit is 900 to leave buffer) - Keep `--max-results` small (3-5) to reduce token usage - Use `--no-count` for testing without affecting quota

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 tavily-metered-search-1776220262 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 tavily-metered-search-1776220262 技能

通过命令行安装

skillhub install tavily-metered-search-1776220262

下载 Zip 包

⬇ 下载 tavily-metered-search v1.0.1

文件大小: 6.02 KB | 发布时间: 2026-4-17 16:18

v1.0.1 最新 2026-4-17 16:18
Add metadata declaration for TAVILY_API_KEY requirement

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部