关于 deep-research
通过 Interactions API 调用 Gemini Deep Research Agent 的命令行研究技能,可规划搜索、阅读网页和提供的文件,并综合生成带引用的报告;支持后续研究与保存结果。
主要功能
- 01自主规划研究与搜索
- 02阅读网页来源和本地文件
- 03索引大型文件集以供检索
- 04流式输出并在中断后重连
- 05保存引用报告并继续会话
适用场景
- 01研究技术主题
- 02分析报告或会议记录
- 03从大量 PDF 中发现趋势
- 04针对报告提出后续问题
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ cnemri/ google-genai-skills --skill deep-research安装后在 Claude Code 中输入/deep-research确认已加载。
附带文件references/online_docs.mdscripts/research.py
详细介绍
深度研究
使用此技能执行需要规划、搜索、阅读和综合信息的深度自主研究任务。
此技能通过 Interactions API 使用 Gemini Deep Research Agent(deep-research-pro-preview-12-2025)。
前置条件
GOOGLE_API_KEY:访问 Interactions API 所必需(目前通过 AI Studio 提供预览版)。google-genaiSDK v0.3.0+
用法
基本研究
启动研究任务并将结果流式输出到控制台。
uv run skills/deep-research/scripts/research.py "Research the history of RISC-V architecture."
使用上下文进行研究(文件或目录)
提供本地文件(PDF、文本)或整个目录,供 Agent 阅读并纳入研究。
直接上传(适用于特定文档):
# Single file
uv run skills/deep-research/scripts/research.py "Analyze this report" --file report.pdf
# Entire directory
uv run skills/deep-research/scripts/research.py "Summarize these meeting notes" --file ./notes/
文件搜索存储区(适用于大型语料库):
使用 --use-file-store 将文件索引到可搜索存储区(RAG),而不是上传到上下文窗口。
uv run skills/deep-research/scripts/research.py "Find trends in these 1000 PDFs" --file ./large_corpus/ --use-file-store
保存报告
将最终的 Markdown 报告保存到文件。
uv run skills/deep-research/scripts/research.py "Competitive landscape of EV batteries" --output report.md
继续研究(后续提问)
使用现有研究会话的 Interaction ID(显示在上次运行开始时)提出后续问题。
uv run skills/deep-research/scripts/research.py "Elaborate on the second point about lithium supply." --follow-up "INTERACTION_ID_HERE"
参考资料
工作原理
- 规划:Agent 将你的提示词拆分为多个步骤。
- 执行:Agent 自动搜索网络并阅读你提供的文件。
- 弹性:如果长时间运行的流中断,脚本会自动重新连接。
- 综合:生成全面且附有引用的报告。
评论
支持 Markdown