2.3 KiB
2.3 KiB
name, description
| name | description |
|---|---|
| search-gateway | Use when Deep Research agents or subagents need web, scholar, patent, news, regulatory, or source-discovery search without using platform MCP tools or browser search directly. |
Search Gateway
Rule
Use the project Python search gateway as the only default search interface. Do not call Tavily MCP, browser MCP, generic web tools, or platform-native search from a subagent unless the user explicitly asks for that escape hatch.
Commands
Run searches from the repository root:
uv run python scripts/search.py "<query>" --route general --json --trace
uv run python scripts/search.py "<query>" --route scholar --year-low 2020 --json --trace
uv run python scripts/search.py "<query>" --route news --time-range y --json --trace
uv run python scripts/search.py "<query>" --route patents --json --trace
uv run python scripts/search.py "<query>" --profile biomed_literature --json --trace
If uv cannot use the user cache in a sandbox, set a local cache:
UV_CACHE_DIR=/private/tmp/deep_research_uv_cache uv run python scripts/search.py "<query>" --route general --json --trace
Routing
general: Exa first, Tavily fallback.scholar: Serper Scholar first; use for papers, guidelines, and technical literature.news: Serper News first; use for recent industry/current information.patents: Serper Google Patents first.biomed_literature: scholar plus general discovery.
API keys are loaded from secrets.env by scripts/search.py; do not ask the user to authorize MCP calls when the env keys are available.
Subagent Protocol
For evidence packets:
- Search through
scripts/search.py, save or summarize the returned JSON in the packet’sraw_quotes_or_notes. - Use search hits only as candidate sources; whenever possible, cite the original regulator, guideline, paper, or official document.
- Put every used source in
sourceswithid,title,url,tier, andscore. - Do not write a final chapter during search; produce structured evidence only.
For chapter assembly:
- Do not search. Use only
phase2/chapter_briefs,phase2/packets,phase2/sources.jsonl,phase0/extracted, andphase1/framework.md. - Do not create new
source_id. - If evidence is thin, mark the chapter as needing Phase 2 enrichment instead of filling with generic prose.