About this project
Local Deep Researcher is an open-source, fully local web research and report-writing assistant built on LangGraph. It runs entirely on your machine using any LLM hosted by Ollama or LMStudio, requiring no cloud-based AI services.
**How It Works**
The assistant follows an iterative research loop inspired by the IterDRAG paper:
1. **Query Generation**: Given a user-provided topic, a local LLM generates a web search query.
2. **Web Search**: A configurable search engine (DuckDuckGo by default, or SearXNG, Tavily, or Perplexity) retrieves relevant sources.
3. **Summarization**: The LLM summarizes the search results in relation to the research topic.
4. **Gap Analysis**: The LLM reflects on the summary to identify knowledge gaps.
5. **New Query**: A new search query is generated to address the identified gaps.
6. **Iteration**: Steps 2–5 repeat for a user-defined number of cycles (default: 3).
The final output is a markdown file containing the research summary with citations to all sources used.
**Model Support**
- **Ollama**: Supports any model available on Ollama's library (e.g., DeepSeek R1, Llama 3.2). Configuration via `OLLAMA_BASE_URL` and `LOCAL_LLM` environment variables.
- **LMStudio**: Supports models loaded in LMStudio with an OpenAI-compatible API server. Configuration via `LMSTUDIO_BASE_URL` and `LOCAL_LLM`.
- **Tool Calling**: As of August 2025, supports tool calling for models like gpt-oss that do not support JSON mode in Ollama.
**Search Engine Options**
- **DuckDuckGo** (default): No API key required.
- **SearXNG**: Self-hosted metasearch engine.
- **Tavily**: Requires API key.
- **Perplexity**: Requires API key.
**Deployment**
- **LangGraph Studio**: Launch locally with `langgraph dev` for an interactive UI where you can configure settings and visualize the research process step by step.
- **Docker**: A Dockerfile is provided, but Ollama must be run separately as a dependent service.
- **Configuration Priority**: Environment variables > LangGraph UI configuration > default values in the Configuration class.
**Technical Details**
- Built with LangGraph for stateful, multi-step agent workflows.
- Uses `python-dotenv` for environment variable management.
- Includes fallback mechanisms for models that struggle with structured JSON output (e.g., DeepSeek R1 7B and 1.5B).
- A TypeScript port is available at a separate repository.
- Browser compatibility: Firefox recommended; Safari may encounter mixed-content warnings.
**Use Cases**
- Deep research on any topic without sending data to cloud AI services.
- Generating cited research reports for personal or professional use.
- Exploring topics iteratively with gap-aware search strategies.
- Learning how agentic AI research workflows function.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.