The Problem

LLMs are great at generating content, but they’re only as good as the data you feed them. If you’ve ever tried to do actual research with an LLM, you know the pain: limited context windows, outdated training data, and the constant side-eye from your browser as you copy-paste between 12 tabs. Oh, and if you want to keep things local for privacy reasons? Good luck finding a solution that doesn’t involve selling your soul to some cloud API.

What This Does

local-deep-researcher automates the research process and keeps it all local. It uses LLMs you host yourself (via Ollama or LMStudio) to generate search queries, summarize web results, identify gaps, and iterate until it has a well-rounded understanding of your topic. Then, it spits out a tidy Markdown report with all its sources linked.

The core logic lives in src/ollamadeepresearcher/. Files like graph.py and state.py handle the brainy stuff—managing the research flow and summarizing results. Configuration is centralized in configuration.py, and you can tweak everything by editing .env or the defaults in that file. It even supports multiple search tools like DuckDuckGo, SearXNG, and Perplexity, configurable through—you guessed it—the .env file. No hardcoding nonsense here.

As for setup, the Dockerfile means you’re a docker-compose up away from spinning this thing up, and the pyproject.toml keeps your Python dependencies clean.

Real-World Use

Imagine you’re writing a report on "The Impact of AI on Privacy." Here’s how this could work: Fire up the Ollama app, pull a local model like deepseek-r1:8b, and configure .env with: Add a search tool, like DuckDuckGo, or throw in your own SearXNG API key: Run the script. The system will generate its first search query using prompts in prompts.py, fetch results, summarize them, and keep iterating until you’ve got a complete Markdown report. It’s like having an intern, minus the awkward coffee orders.

The Bottom Line

If you need local, privacy-first research automation, this project delivers. It’s not beginner-friendly—expect to wrestle with .env files and Docker—but the payoff is a fully customizable, offline research assistant. Perfect for researchers, privacy enthusiasts, or anyone tired of sharing their queries with Big Tech. Not for you if you just need a quick Google search.