Generated Report
Will OpenAI end up bankrupt?
Open the bundled PDF example to see the final layout, writing style, and report structure produced by the application.
DeepResearch is a local-first CLI that plans a research path, searches the web through Tavily, extracts atomic evidence with a local Ollama model, evaluates whether coverage is strong enough, and writes a final report with traceable citations.
deepresearch "Compare web research APIs for deep analysis workflows"
meta_planner decomposes the question into chapters
micro_planner plans sub-topics for each chapter
source_manager searches Tavily for candidates
extractor turns passages into atomic evidence
context_manager curates and deduplicates evidence
evaluator deterministic coverage assessment
auditor devil's advocate chapter review
sub_synthesizer writes each chapter draft
global_synth assembles the final report
What makes it auditable
This PDF report shows the kind of editorial output DeepResearch can generate from a single CLI run: a structured comparison of Lightpanda versus Playwright with a final document ready to inspect or share.
Generated Report
Open the bundled PDF example to see the final layout, writing style, and report structure produced by the application.
Run Configuration
The cards below describe the core capabilities of DeepResearch: the hierarchical LangGraph pipeline, the Map-Reduce chapter architecture, the runtime controls, and the final report behavior exposed by the CLI.
A hierarchical LangGraph pipeline decomposes research into independent chapters, investigates each one, and merges the results into a final report.
Graph Nodes
| meta_planner | Decomposes the question into research chapters |
| micro_planner | Creates sub-topics and search intents per chapter |
| source_manager | Searches Tavily and filters candidate sources |
| extractor | Converts passages into atomic evidence |
| context_manager | Deduplicates evidence and updates the dossier |
| evaluator | Deterministic coverage check — no LLM calls |
| auditor | Devil's advocate review; can reject chapters |
| sub_synthesizer | Writes a chapter draft from curated evidence |
| global_synthesizer | Assembles all chapter drafts into the final report |
The project is built for auditable outputs instead of opaque summaries.
Final Report Guarantees
| Evidence | Atomic evidence units are attached to sources |
| Sources | URLs and quotations remain available for inspection |
| Executive answer | The CLI prints the executive summary to standard output |
Models run through Ollama locally, with CLI overrides for model name and context size.
CLI Overrides
| --model NAME | Switch the active Ollama model for one run |
| --num-ctx N | Override the model context window |
| --max-iterations N | Set the maximum research depth |
| --verbosity 0-3 | Control local progress logging detail |
Search is delegated to Tavily, then narrowed down to sources with usable raw content.
Search Controls
| api_key | Tavily API key in the user config |
| results_per_query | Controls how many sources are fetched per query |
| max_raw_content_chars | Caps extracted raw content per candidate |
| min_source_chars | Filters unusably short pages |
The runtime bootstraps an editable config tree under the user home directory on first load.
Materialized Paths
| ~/.deepresearch/config/config.toml | Main user-editable runtime config |
| ~/.deepresearch/config/prompts/ | Editable prompt templates copied from package resources |
The same run can write files locally or optionally deliver the report through Discord.
Output Modes
| --markdown PATH | Write the final report as Markdown |
| --pdf PATH | Render a PDF through WeasyPrint |
| --discord | Send the report to the configured Discord user |
DeepResearch uses a hierarchical Map-Reduce architecture. Each chapter is researched independently through its own search-extract-evaluate loop, then all chapter drafts are merged into a single final report.
The meta-planner breaks the question into independent research chapters, each covering a distinct angle.
The micro-planner creates focused sub-topics with search terms and intents for the current chapter.
The source manager searches Tavily and selects candidates with enough raw content to inspect.
The extractor turns passages into atomic evidence attached to source URLs and quotations.
The context manager deduplicates evidence, merges near-duplicates, and updates the working dossier.
A deterministic evaluator tracks coverage and stagnation signals to decide whether to continue, audit, or stop.
The auditor reviews chapter evidence as a devil's advocate and can reject it back to the micro-planner.
The sub-synthesizer produces a structured chapter draft from the curated evidence for each completed chapter.
The global synthesizer assembles all chapter drafts into the final report with executive answer and citations.
Stop Conditions
Operational Surface
Default Runtime Config
[model]
model_name = "qwen3.5:9b"
base_url = "http://127.0.0.1:11434"
temperature_meta_planner = 0.3
temperature_micro_planner = 0.2
temperature_extractor = 0.0
temperature_auditor = 0.3
temperature_sub_synthesizer = 0.1
temperature_global_synthesizer = 0.1
num_ctx = 100000
num_predict = 8192
[search]
results_per_query = 5
max_raw_content_chars = 24000
min_source_chars = 300
[runtime]
max_iterations = 8
search_batch_size = 3
max_chapters = 5
max_topic_depth = 2
max_audit_rejections = 2
verbosity = 0
Optional Services
[langsmith]
enabled = false
tracing = true
project = "DeepResearch"
[discord]
token = "YOUR_BOT_TOKEN"
user_id = "YOUR_DISCORD_USER_ID"
output = "pdf"
PDF output uses WeasyPrint, so minimal Linux systems may need standard system libraries in addition to Python packages.
Requirements
DeepResearch expects Python 3.11 or newer, Ollama running locally, at least one local model pulled, and a Tavily API key configured in the editable runtime config.
ollama pull qwen3.5:9b
ollama serve
Install With pipx
pipx install git+https://github.com/arrase/deepresearch.git
Source Install
git clone https://github.com/arrase/deepresearch.git
cd deepresearch
python -m venv .venv
source .venv/bin/activate
pip install -e .
First Config Bootstrap
The config tree is created on first load. Before a real run, set a Tavily API key in the generated config file.
[search]
api_key = "YOUR_TAVILY_API_KEY"
results_per_query = 5
max_raw_content_chars = 24000
min_source_chars = 300
First Successful Run
deepresearch "Compare web research APIs for deep analysis workflows"
Common Examples
deepresearch "Assess the current commercial readiness of fusion startups" --markdown outputs/fusion.md
deepresearch "Compare web research APIs for deep analysis workflows" --pdf outputs/research-apis.pdf
deepresearch "Track the strongest open-source coding models this quarter" --model llama3.1:8b --num-ctx 65536
deepresearch "Evaluate the current state of multimodal local models" --verbosity 2
deepresearch "Research question" --config-root .deepresearch-config