# Local Deep Research

> A self-hosted deep-research assistant that searches the web, academic databases, and your own documents, then writes a cited report

- Category: AI Productivity & Writing / Research & Answer Engines
- Language: Python
- Licence: MIT
- Repository: https://github.com/LearningCircuit/local-deep-research
- Canonical page: https://ai-tldr.dev/tools/local-deep-research/

## In short

Local Deep Research (LDR) is an open-source research assistant you run yourself. It sits in the Research & Answer Engines category of the AI Productivity & Writing tools and is open-source, written in Python and licensed MIT. To get started: run the Docker Compose stack.

## Overview

Local Deep Research (LDR) is an open-source research assistant you run yourself. You give it a complex question; it plans the searches, runs them across the web, academic databases and your own documents, and synthesises what it finds into a report with citations back to the sources it used.

The project's emphasis is control and privacy. It works with any local or cloud LLM — llama.cpp, Ollama, or an OpenAI-compatible endpoint — and pairs with search back-ends you choose, so a fully local setup (Ollama plus a self-hosted SearXNG) never sends a query off your machine. The README states the project contains no telemetry, analytics or tracking, and each user's data lives in an isolated SQLCipher database encrypted with AES-256 whose key is derived from their password; the password itself is never stored, so login works by attempting to decrypt the database.

Beyond one-off questions, LDR builds a knowledge base that compounds. Sources it turns up — arXiv preprints, PubMed articles, web pages — can be downloaded into an encrypted library, where the text is extracted, indexed and embedded, so later research runs can query your own accumulated documents alongside the live web.

## What it does

- Multiple research strategies, from quick pipeline modes for fast facts to a fully agentic `langgraph-agent` mode in which the LLM decides what to search, which specialised engine to use, and when to synthesise
- 10+ search back-ends including SearXNG, arXiv, PubMed and Semantic Scholar, plus your own private documents
- Model-agnostic: llama.cpp, Ollama, or any OpenAI-compatible cloud endpoint
- A personal library that downloads, extracts, indexes and embeds sources so past research is searchable in future runs
- Per-user SQLCipher AES-256 encrypted databases, with per-user LLM API keys stored encrypted inside them rather than in a shared server-level store
- Ships as a Docker image, a Docker Compose stack, or a pip package with a web UI on port 5000

## Getting started

LDR needs three pieces: an LLM endpoint, a search engine, and LDR itself. The Docker Compose route brings up a CPU-only stack on any platform; the pip route is the lightest if you already run Ollama and SearXNG.

1. Run the Docker Compose stack

   Fetch the project's compose file and start it. This is the recommended path on macOS and Windows, where the `--network host` flag used by the plain `docker run` recipe does not work.

```bash
curl -O https://raw.githubusercontent.com/LearningCircuit/local-deep-research/main/docker-compose.yml && docker compose up -d
```

2. Or install from PyPI

   Install the package and start the web UI. You will still need Ollama (or another OpenAI-compatible endpoint) and SearXNG running — the project's pip install guide has the full recipe.

```bash
pip install local-deep-research
python -m local_deep_research.web.app   # starts the web UI on http://localhost:5000
```

3. Bring your own LLM and search engine

   For a fully local setup, run Ollama for inference and SearXNG for search, then point LDR at the SearXNG instance.

```bash
docker run -d -p 11434:11434 --name ollama ollama/ollama
docker exec ollama ollama pull gpt-oss:20b
docker run -d -p 8080:8080 --name searxng searxng/searxng
```

4. Open the UI and pick a strategy

   Browse to http://localhost:5000 after about 30 seconds. In Settings, select `langgraph-agent` for the autonomous agentic mode, which adaptively switches between search engines and collects more sources than the pipeline strategies.

```text
http://localhost:5000
```

## When to use it

- Running deep research on sensitive questions without sending queries or documents to a hosted provider
- Literature review across arXiv, PubMed and Semantic Scholar with citations back to each source
- Building a private, searchable library of papers and web pages that later research runs can draw on
- Getting cited research reports out of a local model on consumer hardware instead of a frontier API
