详情

首页手游攻略 Web Search Plus:统一智能自动路由 - Openclaw Skills

Web Search Plus:统一智能自动路由 - Openclaw Skills

佚名 2026-07-31 19:45:02

什么是 Web Search Plus?

Web Search Plus 是专为 Openclaw Skills 生态系统设计的复杂搜索编排工具。它通过实施智能自动路由系统,消除了开发人员手动选择搜索提供商的需求。通过分析多信号查询意图,该技能会选择最合适的引擎——无论是通过 Serper 获取 Google 购物结果,使用 Tavily 进行学术研究,还是使用 Perplexity 获取带引用的 AI 回答。

该技能提供了一个访问六个不同提供商的单一接口:Serper、Tavily、Exa、Perplexity、You.com 和注重隐私的 SearXNG。它具有弹性和灵活性,仅需一个活跃的 API 密钥即可运行,同时提供跨多个提供商扩展的能力,以便在 Openclaw Skills 中进行全面的 Web 数据检索。

下载入口:https://github.com/openclaw/skills/tree/main/skills/robbyczgw-cla/web-search-plus

安装与下载

1. ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install web-search-plus

2. 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/ 工作区 <project>/skills/

优先级:工作区 > 本地 > 内置

3. 提示词安装

将此提示词复制到 OpenClaw 即可自动安装。

请帮我使用 Clawhub 安装 web-search-plus。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

Web Search Plus 应用场景

  • 使用 Tavily 或 Exa 执行深度学术或技术研究。
  • 通过 Serper 检索实时产品价格和本地商业信息。
  • 使用 Perplexity 为复杂查询生成直接、带引用的回答。
  • 通过 Openclaw Skills 内部署的自托管 SearXNG 集成来维护用户隐私。
  • 使用 Exa 的神经语义搜索寻找类似的公司或研究论文。
Web Search Plus 工作原理
  1. 该技能接收来自 AI 智能体的自然语言查询。
  2. 智能自动路由引擎分析查询,寻找特定的意图标记,如购物、研究、新闻或相似性。
  3. 根据置信度评分,该技能从六个集成引擎中选择最佳提供商(例如,将价格查询路由到 Serper)。
  4. 如果主要提供商由于速率限制或错误而失败,系统将利用自动回退机制切换到下一个可用提供商。
  5. 结果以结构化 JSON 格式返回,包括特定结果和关于路由决策过程的元数据。

Web Search Plus 配置指南

要开始在 Openclaw Skills 框架中使用此技能,请按照以下步骤操作:

# 运行交互式设置向导以配置提供商
python3 scripts/setup.py

# 或者,手动配置环境变量
export SERPER_API_KEY="your-api-key"
# 注意:启动仅需一个提供商密钥。

Web Search Plus 数据架构与分类体系

该技能返回专为 AI 智能体设计的结构化数据。以下是主要输出结构:

字段 类型 描述
provider 字符串 使用的引擎(如 serper, tavily, exa)。
query 字符串 经处理的搜索查询。
results 数组 包含 titleurlsnippetscore 的结果对象列表。
routing 对象 包含 auto_routed 状态和 confidence_level 的元数据。
fallback_used 布尔值 指示系统是否因错误而切换了提供商。
name: web-search-plus
version: 2.8.6
description: Unified search skill with Intelligent Auto-Routing. Uses multi-signal analysis to automatically select between Serper (Google), Tavily (Research), Exa (Neural), Perplexity (AI Answers), You.com (RAG/Real-time), and SearXNG (Privacy/Self-hosted) with confidence scoring.
tags: [search, web-search, serper, tavily, exa, perplexity, you, searxng, google, research, semantic-search, auto-routing, multi-provider, shopping, rag, free-tier, privacy, self-hosted, kilo]
metadata: {"openclaw":{"requires":{"bins":["python3","bash"],"env":{"SERPER_API_KEY":"optional","TAVILY_API_KEY":"optional","EXA_API_KEY":"optional","YOU_API_KEY":"optional","SEARXNG_INSTANCE_URL":"optional","KILOCODE_API_KEY":"optional — required for Perplexity provider (via Kilo Gateway)"},"note":"Only ONE provider key needed. All are optional."}}}

Web Search Plus

Stop choosing search providers. Let the skill do it for you.

This skill connects you to 6 search providers (Serper, Tavily, Exa, Perplexity, You.com, SearXNG) and automatically picks the best one for each query. Shopping question? → Google results. Research question? → Deep research engine. Need a direct answer? → AI-synthesized with citations. Want privacy? → Self-hosted option.


? What Makes This Different?

  • Just search — No need to think about which provider to use
  • Smart routing — Analyzes your query and picks the best provider automatically
  • 6 providers, 1 interface — Google results, research engines, neural search, AI answers with citations, RAG-optimized, and privacy-first all in one
  • Works with just 1 key — Start with any single provider, add more later
  • Free options available — SearXNG is completely free (self-hosted)

?? Quick Start

# Interactive setup (recommended for first run)
python3 scripts/setup.py

# Or manual: copy config and add your keys
cp config.example.json config.json

The wizard explains each provider, collects API keys, and configures defaults.


?? API Keys

You only need ONE key to get started. Add more providers later for better coverage.

Provider Free Tier Best For Sign Up
Serper 2,500/mo Shopping, prices, local, news serper.dev
Tavily 1,000/mo Research, explanations, academic tavily.com
Exa 1,000/mo "Similar to X", startups, papers exa.ai
Perplexity Via Kilo Direct answers with citations kilo.ai
You.com Limited Real-time info, AI/RAG context api.you.com
SearXNG FREE ? Privacy, multi-source, $0 cost Self-hosted

Setting your keys:

# Option A: .env file (recommended)
export SERPER_API_KEY="your-key"
export TAVILY_API_KEY="your-key"

# Option B: config.json
{ "serper": { "api_key": "your-key" } }

?? When to Use Which Provider

I want to... Provider Example Query
Find product prices Serper "iPhone 16 Pro Max price"
Find restaurants/stores nearby Serper "best pizza near me"
Understand how something works Tavily "how does HTTPS encryption work"
Do deep research Tavily "climate change research 2024"
Find companies like X Exa "startups similar to Notion"
Find research papers Exa "transformer architecture papers"
Get a direct answer with sources Perplexity "events in Berlin this weekend"
Know the current status of something Perplexity "what is the status of Ethereum upgrades"
Get real-time info You.com "latest AI regulation news"
Search without being tracked SearXNG anything, privately

Pro tip: Just search normally! Auto-routing handles most queries correctly. Override with -p provider when needed.


?? How Auto-Routing Works

The skill looks at your query and picks the best provider:

"iPhone 16 price"              → Serper (shopping keywords)
"how does quantum computing work" → Tavily (research question)
"companies like stripe.com"    → Exa (URL detected, similarity)
"events in Graz this weekend"  → Perplexity (local + direct answer)
"latest news on AI"            → You.com (real-time intent)
"search privately"             → SearXNG (privacy keywords)

What if it picks wrong? Override it: python3 scripts/search.py -p tavily -q "your query"

Debug routing: python3 scripts/search.py --explain-routing -q "your query"


?? Usage Examples

python3 scripts/search.py -q "Tesla Model 3 price"
python3 scripts/search.py -q "explain machine learning"
python3 scripts/search.py -q "startups like Figma"

Force a Specific Provider

python3 scripts/search.py -p serper -q "weather Berlin"
python3 scripts/search.py -p tavily -q "quantum computing" --depth advanced
python3 scripts/search.py -p exa --similar-url "https://stripe.com" --category company
python3 scripts/search.py -p you -q "breaking tech news" --include-news
python3 scripts/search.py -p searxng -q "linux distros" --engines "google,bing"

? Configuration

{
  "auto_routing": {
    "enabled": true,
    "fallback_provider": "serper",
    "confidence_threshold": 0.3,
    "disabled_providers": []
  },
  "serper": {"country": "us", "language": "en"},
  "tavily": {"depth": "advanced"},
  "exa": {"type": "neural"},
  "you": {"country": "US", "include_news": true},
  "searxng": {"instance_url": "https://your-instance.example.com"}
}

?? Provider Comparison

Feature Serper Tavily Exa Perplexity You.com SearXNG
Speed ??? ?? ?? ?? ??? ??
Direct Answers ? ? ? ?? ? ?
Citations ? ? ? ? ? ?
Factual Accuracy ??? ??? ?? ??? ??? ???
Semantic Understanding ? ?? ??? ??? ?? ?
Full Page Content ? ? ? ? ? ?
Shopping/Local ? ? ? ? ? ?
Find Similar Pages ? ? ? ? ? ?
RAG-Optimized ? ? ? ? ?? ?
Privacy-First ? ? ? ? ? ??
API Cost $$ $$ $$ Via Kilo $ FREE

? Common Questions

Do I need API keys for all providers?

No. You only need keys for providers you want to use. Start with one (Serper recommended), add more later.

Which provider should I start with?

Serper — fastest, cheapest, largest free tier (2,500 queries/month), and handles most queries well.

What if I run out of free queries?

The skill automatically falls back to your other configured providers. Or switch to SearXNG (unlimited, self-hosted).

How much does this cost?

  • Free tiers: 2,500 (Serper) + 1,000 (Tavily) + 1,000 (Exa) = 4,500+ free searches/month
  • SearXNG: Completely free (just ~$5/mo if you self-host on a VPS)
  • Paid plans: Start around $10-50/month depending on provider

Is SearXNG really private?

Yes, if self-hosted. You control the server, no tracking, no profiling. Public instances depend on the operator's policy.

How do I set up SearXNG?

# Docker (5 minutes)
docker run -d -p 8080:8080 searxng/searxng

Then enable JSON API in settings.yml. See docs.searxng.org.

Why did it route my query to the "wrong" provider?

Sometimes queries are ambiguous. Use --explain-routing to see why, then override with -p provider if needed.


?? Automatic Fallback

If one provider fails (rate limit, timeout, error), the skill automatically tries the next provider. You'll see routing.fallback_used: true in the response when this happens.


?? Output Format

{
  "provider": "serper",
  "query": "iPhone 16 price",
  "results": [{"title": "...", "url": "...", "snippet": "...", "score": 0.95}],
  "routing": {
    "auto_routed": true,
    "provider": "serper",
    "confidence": 0.78,
    "confidence_level": "high"
  }
}

? Important Note

Tavily, Serper, and Exa are NOT core OpenClaw providers.

? Don't modify ~/.openclaw/openclaw.json for these
? Use this skill's scripts — keys auto-load from .env


?? Security

SearXNG SSRF Protection: The SearXNG instance URL is validated with defense-in-depth:

  • Enforces http/https schemes only
  • Blocks cloud metadata endpoints (169.254.169.254, metadata.google.internal)
  • Resolves hostnames and blocks private/internal IPs (loopback, RFC1918, link-local, reserved)
  • Operators who intentionally self-host on private networks can set SEARXNG_ALLOW_PRIVATE=1

?? More Documentation


点击查看更多
推荐专题
热门阅读