A local CLI and web client for Google's Gemini Deep Research API. Conduct AI-powered research with streaming output, iterative revisions, and persistent versioned reports.
This project uses uv for dependency management.
-
Install uv (if not already installed):
-
Install dependencies:
uv sync- Set up your Gemini API key via direnv:
export GEMINI_API_KEY="your-api-key-here"uv run python -m deep_research_app.ui_gradio# Start a new research run
uv run deep-research new "Impact of AI on healthcare" --timeframe "2020-2024"
# List all research runs
uv run deep-research list
# Show a report
uv run deep-research show <RUN_ID>
# Revise a report with feedback
uv run deep-research revise <RUN_ID> --feedback "Add more focus on economic impacts"
# Check status of a running interaction
uv run deep-research status <INTERACTION_ID>
# Resume an interrupted research run
uv run deep-research resume <RUN_ID>uv run deep-research new "topic" \
--timeframe "2020-2024" \ # Time period constraint
--region "United States" \ # Geographic focus
--max-words 5000 \ # Maximum report length
--focus "economics,policy" # Comma-separated focus areas
# Show thinking summaries during streaming
uv run deep-research --show-thoughts new "topic"I like to automatically configure my Gemini API key using direnv
# Create .envrc with your API key
echo 'export GEMINI_API_KEY="your-api-key-here"' > .envrc
direnv allow- Streaming output: Watch research progress in real-time
- Automatic fallback: Falls back to polling if streaming fails
- Interrupt & resume: Ctrl+C saves state; resume later with
deep-research resume - Versioned reports: Each revision creates a new version, preserving history
- Iterative revisions: Refine reports with feedback using previous context
Reports are saved to runs/{run_id}/:
prompt_v1.md,report_v1.md- Initial researchprompt_v2.md,report_v2.md- After revisionmeta.json- Run metadata