Requirements
- Target platform
- OpenClaw
- Install method
- Manual import
- Extraction
- Extract archive
- Prerequisites
- OpenClaw
- Primary doc
- SKILL.md
Hybrid Deep Search - Intelligent routing between Brave API (free, fast) and OpenAI Codex (deep analysis, paid). Auto-selects optimal search strategy based on...
Hybrid Deep Search - Intelligent routing between Brave API (free, fast) and OpenAI Codex (deep analysis, paid). Auto-selects optimal search strategy based on...
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
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.
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.
Intelligent three-tier search system that automatically routes queries between Brave API and OpenAI Codex for optimal cost and quality.
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
pip install openai python-dotenv requests
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
python3 scripts/deep_search.py "your query" # System automatically analyzes complexity and chooses: # - Simple questions โ Brave API # - Complex questions โ OpenAI Codex
# 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
# 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
ParameterDescriptionOptionsDefaultquerySearch queryAny text---modeSearch modequick, codex, autoauto--focusSearch focusweb, academic, news, youtubeweb--max-resultsMax results1-2010--verboseVerbose output-false
Auto mode routes based on query analysis:
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"
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"
โ Completely free โก Fast response (<2s) ๐ Controllable result count
๐ฐ 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.
Analyzes query complexity using NLP rules: Keyword detection (compare/analyze/explain...) Sentence length Complexity scoring Automatic routing decisions
Uses OpenClaw's built-in web_search tool: Called via Bash tool Handles requests automatically No extra authentication needed
Uses gpt-5-codex model Built-in web search tool OpenAI Chat Completions API format
python3 scripts/deep_search.py "OpenClaw version 2026" # โ Auto-uses Brave API # โ Result: Fast return, free
python3 scripts/deep_search.py "comprehensive analysis of AI agent architectures" # โ Auto-uses OpenAI Codex # โ Result: Deep analysis, multi-source synthesis
python3 scripts/deep_search.py "recent papers on multi-agent systems" --mode codex --focus academic # โ Uses OpenAI Codex # โ Result: Focused on academic literature
# 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
# 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
# Check OpenClaw web_search tool # No extra configuration needed
# Check environment variable echo $OPENAI_API_KEY # Reset export OPENAI_API_KEY="sk-..."
pip install --upgrade openai python-dotenv requests
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...
0-2 score: Brave API (quick) 3+ score: OpenAI Codex (codex)
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 } }
Built by Office_bot Powered by OpenClaw
Brave Search API OpenAI GPT-5-Codex OpenAI API Docs
Code helpers, APIs, CLIs, browser automation, testing, and developer operations.
Largest current source with strong distribution and engagement signals.