# Send Hybrid Deep Search to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "hybrid-deep-search",
    "name": "Hybrid Deep Search",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/scsun1978/hybrid-deep-search",
    "canonicalUrl": "https://clawhub.ai/scsun1978/hybrid-deep-search",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/hybrid-deep-search",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=hybrid-deep-search",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "SKILL_CN.md",
      "_meta.json",
      "scripts/deep_search.py",
      "scripts/router.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/hybrid-deep-search"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/hybrid-deep-search",
    "downloadUrl": "https://openagent3.xyz/downloads/hybrid-deep-search",
    "agentUrl": "https://openagent3.xyz/skills/hybrid-deep-search/agent",
    "manifestUrl": "https://openagent3.xyz/skills/hybrid-deep-search/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/hybrid-deep-search/agent.md"
  }
}
```
## Documentation

### Hybrid Deep Search 🚀

Intelligent three-tier search system that automatically routes queries between Brave API and OpenAI Codex for optimal cost and quality.

### Architecture

User Query
   ↓
Query Analyzer (router.py)
   ↓
   ├─→ Simple Questions → Brave API (web_search)     Fast, Free
   ├─→ Complex Questions → OpenAI Codex (gpt-5-codex)  Deep Analysis, Paid
   └─→ Manual Mode → User Specified

### 1. Install Dependencies

pip install openai python-dotenv requests

### 2. Configure API Keys

Brave API (Already Built-in)

No extra configuration needed. Uses OpenClaw's built-in web_search tool.

OpenAI Codex API (Optional for Deep Search)

# Get API Key from: https://platform.openai.com/api-keys

export OPENAI_API_KEY="sk-your-openai-api-key"
export OPENAI_BASE_URL="https://api.openai.com/v1"  # Optional

### Auto Mode (Recommended)

python3 scripts/deep_search.py "your query"
# System automatically analyzes complexity and chooses:
# - Simple questions → Brave API
# - Complex questions → OpenAI Codex

### Manual Mode

# Quick Search (Brave API)
python3 scripts/deep_search.py "what is OpenClaw?" --mode quick

# Deep Search (OpenAI Codex)
python3 scripts/deep_search.py "compare LangChain vs LlamaIndex" --mode codex

### Focus Modes

# Academic Search
python3 scripts/deep_search.py "AI agent frameworks research" --mode codex --focus academic

# News Search
python3 scripts/deep_search.py "latest AI news" --mode quick --focus news

# General Web Search
python3 scripts/deep_search.py "OpenClaw documentation" --mode quick --focus web

### Parameters

ParameterDescriptionOptionsDefaultquerySearch queryAny text---modeSearch modequick, codex, autoauto--focusSearch focusweb, academic, news, youtubeweb--max-resultsMax results1-2010--verboseVerbose output-false

### Complexity Routing Rules

Auto mode routes based on query analysis:

### → Brave API (quick)

Simple factual queries (what/who/when/where)
Definition lookups
Quick fact-finding
Single-topic searches

Examples:

"what is OpenClaw?"
"who created Python?"
"latest AI news today"

### → OpenAI Codex (codex)

Comparison analysis
Deep reasoning
Multi-source synthesis
Complex questions
Requires inference/summarization

Examples:

"compare LangChain vs LlamaIndex in detail"
"analyze impact of AI on job market"
"explain quantum computing applications in healthcare"

### Brave API

✅ Completely free
⚡ Fast response (<2s)
📊 Controllable result count

### OpenAI Codex (gpt-5-codex)

💰 Usage-based pricing
🧠 Deep reasoning capabilities
⏱️ Slower response (5-30s)
💡 Free tier available for new users

Recommendation: Use auto mode to let the system optimize costs for you.

### Query Analyzer (router.py)

Analyzes query complexity using NLP rules:

Keyword detection (compare/analyze/explain...)
Sentence length
Complexity scoring
Automatic routing decisions

### Brave API Integration

Uses OpenClaw's built-in web_search tool:

Called via Bash tool
Handles requests automatically
No extra authentication needed

### OpenAI Codex Integration

Uses gpt-5-codex model
Built-in web search tool
OpenAI Chat Completions API format

### Case 1: Quick Fact Lookup

python3 scripts/deep_search.py "OpenClaw version 2026"
# → Auto-uses Brave API
# → Result: Fast return, free

### Case 2: Deep Analysis

python3 scripts/deep_search.py "comprehensive analysis of AI agent architectures"
# → Auto-uses OpenAI Codex
# → Result: Deep analysis, multi-source synthesis

### Case 3: Academic Research

python3 scripts/deep_search.py "recent papers on multi-agent systems" --mode codex --focus academic
# → Uses OpenAI Codex
# → Result: Focused on academic literature

### Batch Search

# Create queries.txt
echo "query 1" >> queries.txt
echo "query 2" >> queries.txt

# Batch execute
for query in $(cat queries.txt); do
  python3 scripts/deep_search.py "$query" --mode auto
done

### Format Output

# JSON output
python3 scripts/deep_search.py "query" --format json

# Markdown output (default)
python3 scripts/deep_search.py "query" --format markdown

# Plain text output
python3 scripts/deep_search.py "query" --format text

### Brave API Not Responding

# Check OpenClaw web_search tool
# No extra configuration needed

### OpenAI Codex Authentication Failed

# Check environment variable
echo $OPENAI_API_KEY

# Reset
export OPENAI_API_KEY="sk-..."

### Python Dependencies

pip install --upgrade openai python-dotenv requests

### Scoring Factors (0-10 total)

Keyword Matching (+6)

compare/analyze/explain/why/how...



Query Length (+2)



15 words = +2




8 words = +1





Question Pattern (+1)

Complex wh-questions



Technical Terms (+1)

API/framework/architecture...



Simple Keyword Penalty (-2)

what is/who is/list of...

### Decision Thresholds

0-2 score: Brave API (quick)
3+ score: OpenAI Codex (codex)

### Config File

cp config.json.example config.json
# Edit config.json with your settings

Example config.json:

{
  "search_settings": {
    "default_mode": "auto",
    "default_focus": "web",
    "max_results": 10,
    "router_threshold": 3,
    "verbose": false
  },

  "openai_codex": {
    "enabled": true,
    "api_key": "YOUR_OPENAI_API_KEY_HERE",
    "base_url": "https://api.openai.com/v1",
    "model": "gpt-5-codex",
    "max_tokens": 4096,
    "temperature": 0.7
  }
}

### Credits

Built by Office_bot
Powered by OpenClaw

### References

Brave Search API
OpenAI GPT-5-Codex
OpenAI API Docs
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: scsun1978
- Version: 1.0.1
## Source health
- Status: healthy
- Source download looks usable.
- Yavira can redirect you to the upstream package for this source.
- Health scope: source
- Reason: direct_download_ok
- Checked at: 2026-04-30T16:55:25.780Z
- Expires at: 2026-05-07T16:55:25.780Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/hybrid-deep-search)
- [Send to Agent page](https://openagent3.xyz/skills/hybrid-deep-search/agent)
- [JSON manifest](https://openagent3.xyz/skills/hybrid-deep-search/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/hybrid-deep-search/agent.md)
- [Download page](https://openagent3.xyz/downloads/hybrid-deep-search)