Multi-round web research with question decomposition, cross-verification, and
structured reports with numbered citations.
Three-step agent-assisted pipeline. No external API keys needed — uses OpenClaw
built-in web_search and web_fetch tools.
┌─────────┐ ┌──────────┐ ┌──────────┐
│ plan │ ──▶ │ analyze │ ──▶ │ report │
│ (脚本) │ │ (脚本) │ │ (脚本) │
└────┬─────┘ └────┬─────┘ └────┬─────┘
│ search_ │ fetch_ │
│ commands │ commands │ report
▼ ▼ ▼ skeleton
Agent 执行 Agent 执行 Agent 填充
web_search web_fetch 分析内容
Script path: scripts/research.py (relative to this skill directory)
python3 scripts/research.py plan "topic" --depth standard
Output JSON contains search_commands — a list of web_search tool calls.
Agent executes each one and collects results into a JSON array:
[
{"query": "...", "results": [{"title": "...", "url": "...", "snippet": "..."}, ...]},
...
]
Save to a temp file (e.g., /tmp/search-results.json).
python3 scripts/research.py analyze /tmp/search-results.json --top 8
Output JSON contains:
selected_sources: Deduplicated, tier-sorted source listfetch_commands: web_fetch tool calls for top URLssummary: Human-readable source overviewAgent executes each web_fetch and collects results into a JSON array:
[
{"url": "...", "text": "extracted content...", "length": 12345},
...
]
Save to /tmp/fetch-results.json.
python3 scripts/research.py report \
--topic "topic" \
--search /tmp/search-analysis.json \
--fetch /tmp/fetch-results.json \
--depth standard --save
Output: Markdown report with {FILL: ...} placeholders.
Agent reads the Source Content section and fills in analysis.
Auto-detect from query complexity, or user specifies.
--depth quick → 1 sub-question, 2 fetches--depth standard → 4-5 sub-questions, 8 fetchesresearch/--depth deep → 7 sub-questions (includes contrarian), 15 fetches```
sessions_spawn:
mode: run
task: |
Execute these web_search calls: {subset of search_commands}
Return results as JSON array.
```
User overrides: "快速搜一下" → Quick, "详细研究" → Standard, "深度调研" → Deep
Script auto-classifies:
After report skeleton is generated, agent verifies:
🔬 Research: {topic}
{2-4 paragraph summary}
**Key takeaways:**
- Finding 1 [1][2]
- Finding 2 [3]
📊 Confidence: {🟢/🟡/🔴}
📄 Full report: research/{slug}-{date}.md
Saved to research/{topic-slug}-{YYYYMMDD}.md with:
共 1 个版本