AI deep research tool that searches the web, reads sources, and synthesizes findings into comprehensive reports.
Works 100% free with Ollama (local LLM) + DuckDuckGo (no API key needed for search). Also supports OpenAI, Google Gemini, Anthropic Claude, and OpenRouter (200+ models).
No Langchain dependency. No paid search APIs required. Just pip install deepworm and go.
pip install deepworm
# Option 1: Google Gemini (recommended, free tier available) export GOOGLE_API_KEY="AIza..." # Option 2: OpenRouter (200+ models, free & paid) export OPENROUTER_API_KEY="sk-or-..." # Option 3: OpenAI export OPENAI_API_KEY="sk-..." # Option 4: Anthropic Claude export ANTHROPIC_API_KEY="sk-ant..." # Option 5: Ollama (fully local, no key needed) # Just install Ollama and pull a model
deepworm "what are the latest advances in quantum computing?"That's it. DeepWorm will:
- Search the web for relevant sources
- Read and analyze each source
- Generate followup questions
- Go deeper recursively
- Produce a final report with citations
# Control research depth and breadth deepworm "topic" --depth 2 --breadth 3 # Verbose mode (see searches, pages, analysis in real-time) deepworm "topic" -v # Save report to file deepworm "topic" --output report.md # Auto-polish analysis (readability, quality score, compliance) deepworm "topic" --polish # Knowledge graph extraction deepworm "topic" --graph # Mermaid diagram deepworm "topic" --graph stats # Top connected concepts table # Full pipeline deepworm "topic" -v --polish --graph stats # Choose provider deepworm "topic" --provider google deepworm "topic" --provider openrouter --model google/gemini-2.0-flash-001 # Compare topics deepworm compare "Python" "Rust" # See all options deepworm --help
deepworm interactive
Features:
- Arrow-key menu navigation — navigate commands without typing
/keys— manage API keys interactively (saved to~/.deepworm_keys)/models— browse and switch models with arrow keys/set— change depth, breadth, model inline/last— view last research report/graph— extract knowledge graph from last report/polish— run quality analysis on last report- Command history — arrow up/down to recall previous queries
- Auto-save — all reports saved to
~/.deepworm/reports/
from deepworm import Researcher researcher = Researcher(provider="openai") result = researcher.research("your topic") print(result.report)
| Provider | Env Variable | Default Model | Notes |
|---|---|---|---|
GOOGLE_API_KEY |
gemini-2.5-flash-lite | Free tier available | |
| OpenRouter | OPENROUTER_API_KEY |
gemini-2.0-flash-001 | 200+ models, free & paid |
| OpenAI | OPENAI_API_KEY |
gpt-4o-mini | |
| Anthropic | ANTHROPIC_API_KEY |
claude-3-5-haiku-latest | |
| Ollama | (none, local) | llama3.2 | Fully offline |
Create deepworm.yaml in your project root:
provider: google model: gemini-pro depth: 3 breadth: 5 output_dir: ./reports
- Multi-provider LLM support — OpenAI, Google Gemini, Anthropic, OpenRouter (200+ models), Ollama
- Recursive deep research with configurable depth and breadth
- Interactive TUI with arrow-key navigation, command menu, and auto-save
- Knowledge graph extraction — Mermaid, DOT, stats, JSON formats
- Polish pipeline — readability scoring, compliance checks, quality grades (A-F)
- Auto-save reports to
~/.deepworm/reports/(both CLI and interactive) - API key management —
/keyscommand saves keys securely to~/.deepworm_keys - Markdown reports with citations and source links
- Comparison mode for side-by-side analysis
- Research chains for multi-step investigations
- Built-in retry and rate limiting
- DuckDuckGo search (no API key needed for search)
- Rich terminal output with emoji progress tracking
- Token usage tracking per research
- Extensible plugin system
MIT
