gemini-deep-research

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Gemini Deep Research

Gemini深度研究

Use Gemini's Deep Research Agent to perform complex, long-running context gathering and synthesis tasks.
使用Gemini的Deep Research Agent执行复杂、耗时的信息收集与整合任务。

Prerequisites

前置条件

  • GEMINI_API_KEY
    environment variable (from Google AI Studio)
  • Note: This does NOT work with Antigravity OAuth tokens. Requires a direct Gemini API key.
  • GEMINI_API_KEY
    环境变量(从Google AI Studio获取)
  • 注意:该工具不支持Antigravity OAuth令牌,需要直接使用Gemini API密钥。

How It Works

工作原理

Deep Research is an agent that:
  1. Breaks down complex queries into sub-questions
  2. Searches the web systematically
  3. Synthesizes findings into comprehensive reports
  4. Provides streaming progress updates
Deep Research是一款具备以下能力的Agent:
  1. 将复杂查询拆解为子问题
  2. 系统性地进行网页搜索
  3. 将研究结果整合为全面的报告
  4. 提供流式进度更新

Usage

使用方法

Basic Research

基础研究

bash
scripts/deep_research.py --query "Research the history of Google TPUs"
bash
scripts/deep_research.py --query "Research the history of Google TPUs"

Custom Output Format

自定义输出格式

bash
scripts/deep_research.py --query "Research the competitive landscape of EV batteries" \
  --format "1. Executive Summary\n2. Key Players (include data table)\n3. Supply Chain Risks"
bash
scripts/deep_research.py --query "Research the competitive landscape of EV batteries" \
  --format "1. Executive Summary\n2. Key Players (include data table)\n3. Supply Chain Risks"

With File Search (optional)

结合文件搜索(可选)

bash
scripts/deep_research.py --query "Compare our 2025 fiscal year report against current public web news" \
  --file-search-store "fileSearchStores/my-store-name"
bash
scripts/deep_research.py --query "Compare our 2025 fiscal year report against current public web news" \
  --file-search-store "fileSearchStores/my-store-name"

Stream Progress

流式进度更新

bash
scripts/deep_research.py --query "Your research topic" --stream
bash
scripts/deep_research.py --query "Your research topic" --stream

Output

输出结果

The script saves results to timestamped files:
  • deep-research-YYYY-MM-DD-HH-MM-SS.md
    - Final report in markdown
  • deep-research-YYYY-MM-DD-HH-MM-SS.json
    - Full interaction metadata
脚本会将结果保存至带时间戳的文件中:
  • deep-research-YYYY-MM-DD-HH-MM-SS.md
    - 最终报告(Markdown格式)
  • deep-research-YYYY-MM-DD-HH-MM-SS.json
    - 完整交互元数据

API Details

API详情

  • Endpoint:
    https://generativelanguage.googleapis.com/v1beta/interactions
  • Agent:
    deep-research-pro-preview-12-2025
  • Auth:
    x-goog-api-key
    header (NOT OAuth Bearer token)
  • 端点
    https://generativelanguage.googleapis.com/v1beta/interactions
  • Agent
    deep-research-pro-preview-12-2025
  • 认证:使用
    x-goog-api-key
    请求头(而非OAuth Bearer令牌)

Limitations

局限性

  • Requires Gemini API key (get from Google AI Studio)
  • Does NOT work with Antigravity OAuth authentication
  • Long-running tasks (minutes to hours depending on complexity)
  • May incur API costs depending on your quota
  • 需要Gemini API密钥(可从Google AI Studio获取)
  • 不支持Antigravity OAuth认证方式
  • 任务耗时较长(根据复杂度不同,从数分钟到数小时不等)
  • 根据你的配额情况,可能会产生API费用