Tavily Plus
Enhanced search skill with AI augmentation and multiple API keys.
Tools
| Tool | Description |
|---|
| INLINECODE0 | AI-enhanced search with intent recognition, sub-question breakdown, and smart routing |
| INLINECODE1 |
Standard Tavily search (fallback/legacy mode) |
|
tavily_extract | URL content extraction |
Configuration
Configure in plugins.entries.tavily.config.webSearch:
CODEBLOCK0
Or via env: TAVILY_API_KEY, TAVILY_API_KEY_2, INLINECODE6
smart_search
AI-augmented search that performs:
- 1. Intent Recognition - Classify query type (factual, news, research, comparison, how-to, etc.)
- Sub-question Decomposition - Break complex queries into atomic sub-queries
- Multi-key Rotation - Rotate through configured API keys on rate limit
- Smart Search Execution - Route each sub-query to optimal depth/topic
- Intelligent Summarization - Synthesize findings into coherent answer
- Offline Document Export - Optional markdown/PDF report generation
Parameters
| Parameter | Type | Description |
|---|
| INLINECODE7 | string | Natural language search query |
| INLINECODE8 |
string |
research (deep),
quick (basic),
compare (multiple) |
|
max_results | number | Results per sub-query (1-20) |
|
include_answer | boolean | Include AI summary (default: true) |
|
export_doc | boolean | Generate offline markdown report |
|
sub_questions | array | Optional pre-defined sub-queries (bypasses decomposition) |
Query Modes
| Mode | Behavior |
|---|
| INLINECODE16 | Deep search with multiple sub-queries, high max_results |
| INLINECODE17 |
Single-pass basic search |
|
compare | Multi-perspective search for comparisons |
Response Format
CODEBLOCK1
Key Rotation Logic
- - Check
plugins.entries.tavily.config.webSearch.apiKey (object with multiple keys) - Fall back to env vars:
TAVILY_API_KEY, TAVILY_API_KEY_2, ..., INLINECODE22 - On 429 (rate limit), automatically rotate to next key
- Log which key was used in response metadata
Intent Classification
Supported intent types:
- -
factual - Direct answer queries (who, what, when, where) - INLINECODE24 - Procedural instructions
- INLINECODE25 - A vs B analysis
- INLINECODE26 - In-depth information gathering
- INLINECODE27 - Current events
- INLINECODE28 - Perspectives and opinions
Offline Export
When export_doc: true:
- 1. Generate timestamped markdown report
- Include: intent, sub-questions, each search result with source, AI summary
- Save to INLINECODE30
- Return
doc_path in response
Workflow Summary
CODEBLOCK2
Tavily Plus
增强型搜索技能,具备AI增强和多API密钥支持。
工具
| 工具 | 描述 |
|---|
| smartsearch | AI增强搜索,具备意图识别、子问题分解和智能路由功能 |
| tavilysearch |
标准Tavily搜索(回退/传统模式) |
| tavily_extract | URL内容提取 |
配置
在 plugins.entries.tavily.config.webSearch 中配置:
json
{
apiKey: {
key1: tvly-xxx1,
key2: tvly-xxx2
},
baseUrl: https://api.tavily.com
}
或通过环境变量配置:TAVILYAPIKEY、TAVILYAPIKEY2、TAVILYAPIKEYN
smart_search
AI增强搜索,执行以下操作:
- 1. 意图识别 - 分类查询类型(事实性、新闻、研究、比较、操作指南等)
- 子问题分解 - 将复杂查询分解为原子子查询
- 多密钥轮换 - 在达到速率限制时轮换配置的API密钥
- 智能搜索执行 - 将每个子查询路由到最佳深度/主题
- 智能摘要生成 - 将发现结果综合成连贯的答案
- 离线文档导出 - 可选的markdown/PDF报告生成
参数
| 参数 | 类型 | 描述 |
|---|
| query | 字符串 | 自然语言搜索查询 |
| mode |
字符串 | research(深度)、quick(基础)、compare(对比) |
| max_results | 数字 | 每个子查询的结果数(1-20) |
| include_answer | 布尔值 | 包含AI摘要(默认:true) |
| export_doc | 布尔值 | 生成离线markdown报告 |
| sub_questions | 数组 | 可选的预定义子查询(跳过分解步骤) |
查询模式
| 模式 | 行为 |
|---|
| research | 深度搜索,包含多个子查询,高max_results值 |
| quick |
单次基础搜索 |
| compare | 多角度对比搜索 |
响应格式
json
{
intent: research,
sub_questions: [..., ...],
search_results: [...],
summary: ...,
docpath: /path/to/report.md // 如果 exportdoc=true
}
密钥轮换逻辑
- - 检查 plugins.entries.tavily.config.webSearch.apiKey(包含多个密钥的对象)
- 回退到环境变量:TAVILYAPIKEY、TAVILYAPIKEY2、...、TAVILYAPIKEYN
- 遇到429错误(速率限制)时,自动轮换到下一个密钥
- 在响应元数据中记录使用的密钥
意图分类
支持的意图类型:
- - factual - 直接答案查询(谁、什么、何时、何地)
- how_to - 操作指南说明
- comparison - A vs B分析
- research - 深度信息收集
- news - 当前事件
- opinion - 观点和看法
离线导出
当 export_doc: true 时:
- 1. 生成带时间戳的markdown报告
- 包含:意图、子问题、每个搜索结果及其来源、AI摘要
- 保存到 ~/.openclaw/workspace/reports/tavily-plus-{timestamp}.md
- 在响应中返回 doc_path
工作流程总结
用户查询
↓
意图识别(LLM)
↓
子问题分解(LLM)
↓
对每个子问题:
├─ 查询Tavily(遇到429时轮换密钥)
└─ 收集结果
↓
智能摘要生成(LLM)
↓
[可选] 生成离线报告
↓
返回增强响应