AI-powered research assistant with deep, iterative analysis using LLMs and web searches
pip install local-deep-research==2.0.1 Copy PIP instructions
AI-powered research assistant for deep, agentic research
Performs deep, agentic research using multiple LLMs and search engines with proper citations
🧪 First open-source project — fully-local on a single RTX 3090 (Qwen3.6-27B) — to report ~95% SimpleQA (n=500) and 77% xbench-DeepSearch (n=100) on local hardware. See the r/LocalLLaMA announcement and the benchmark dataset.
AI research assistant you control. Run locally for privacy, use any LLM and build your own searchable knowledge base. You own your data and see exactly how it works.
# Step 1: Pull and run Ollama docker run -d -p 11434:11434 --name ollama ollama/ollama docker exec ollama ollama pull gpt-oss:20b # Step 2: Pull and run SearXNG for optimal search results docker run -d -p 8080:8080 --name searxng searxng/searxng # Step 3: Pull and run Local Deep Research # (the URL line pins SearXNG's address AND marks it operator-approved — # private/localhost engine URLs are otherwise blocked by default since # v1.10.3. The URL becomes read-only in the web UI; docs/SearXNG-Setup.md # lists the alternatives, e.g. an origin allowlist.) docker run -d --network host \ --name local-deep-research \ --volume "deep-research:/data" \ -e LDR_DATA_DIR=/data \ -e LDR_SEARCH_ENGINE_WEB_SEARXNG_DEFAULT_PARAMS_INSTANCE_URL=http://localhost:8080 \ localdeepresearch/local-deep-research Mac / Windows / WSL2 users: --network host only works on native Linux. On Docker Desktop it silently fails to publish port 5000 and leaves localhost pointing at the LDR container itself (so it can't reach Ollama/SearXNG). Use Option 2 below, or see the Windows/WSL2 FAQ entry for a working docker run recipe.
curl -O https://raw.githubusercontent.com/LearningCircuit/local-deep-research/main/docker-compose.yml && docker compose up -d With NVIDIA GPU (Linux):
pip install local-deep-research python -m local_deep_research.web.app # starts the web UI on http://localhost:5000 You'll also need Ollama (or any OpenAI-compatible LLM endpoint) and SearXNG running — see the pip install guide for the full recipe. Works on Windows, macOS, and Linux. SQLCipher encryption is included via pre-built wheels — no compilation needed. PDF export on Windows requires Pango (setup guide). Development fallback: LDR_BOOTSTRAP_ALLOW_UNENCRYPTED=true permits plaintext SQLite only when SQLCipher is unavailable or nonfunctional; working SQLCipher still takes priority. The fallback does not verify account passwords and is unsuitable for shared deployments. See fallback limitations.
Detailed install guides: Docker · Docker Compose · pip · Unraid · full install reference
Older CPU (x86-64)? LDR needs an AVX-capable CPU — Intel Sandy Bridge / AMD Bulldozer (2011) or newer. Several scientific Python dependencies (pandas, scikit-learn) ship wheels that crash with Illegal instruction on older CPUs. ARM64 (aarch64) is fully supported. Every release is smoke-tested against this floor, including AVX-without-AVX2 CPUs (#4480).
You ask a complex question. Local Deep Research (LDR):
Choose the research strategy that fits: quick pipeline modes for fast facts, or fully agentic deep research for complex analysis and academic work.
LangGraph Agent Strategy — An autonomous agentic research mode where the LLM decides what to search, which specialized engines to use (arXiv, PubMed, Semantic Scholar, etc.), and when to synthesize. It adaptively switches between search engines based on what it finds and collects significantly more sources than pipeline-based strategies — this is the strategy behind the ~95% SimpleQA result above. Select langgraph-agent in Settings.
flowchart LR R[Research] --> D[Download Sources] D --> L[(Library)] L --> I[Index & Embed] I --> S[Search Your Docs] S -.-> R Every research session finds valuable sources. Download them directly into your encrypted library — academic papers from ArXiv, PubMed articles, web pages. LDR extracts text, indexes everything, and makes it searchable. Next time you research, ask questions across your own documents and the live web together. Your knowledge compounds over time.
flowchart LR U1[User A] --> D1[(Encrypted DB)] U2[User B] --> D2[(Encrypted DB)] Your data stays yours. Each user gets their own isolated SQLCipher database encrypted with AES-256, with the key derived from your password. Your password is never stored — login works by attempting to decrypt your database, so the database files on their own are unusable to anyone who obtains them. Per-user LLM API keys live encrypted inside the same personal database rather than in a shared server-level store.
The Docker setup ships with cap_drop: ALL, no-new-privileges, and a non-root runtime, with the bundled Ollama and SearXNG images pinned by digest. With a model running in the bundled Ollama, inference runs on your own hardware. LDR judges locality mainly by provider and endpoint address, not by where the model runs, so a local endpoint that relays to a hosted model (an Ollama cloud model, or a local LiteLLM or other OpenAI-compatible proxy in front of a hosted API) can still send your prompts off the machine without being detected. A self-hosted SearXNG still forwards your search queries to its upstream engines on the internet. To keep a run on private sources, search only local sources (collections, your library) under the Private only egress scope described below. That scope is a best-effort guard rail, not an air gap: see the Egress control section below and SECURITY.md.
In-memory credentials: Credentials are held in process memory during active sessions. LDR limits their lifetime and applies process dump controls at web and MCP startup on POSIX, with additional dumpability controls on Linux. Other platforms and applications embedding LDR require operating-system configuration. See the Security Policy for scope and platform details.
Supply Chain Security: Docker images are signed with Cosign using GitHub's keyless OIDC flow, include SLSA provenance attestations, and ship with attested SPDX SBOMs. See Verifying images and SBOMs for the step-by-step verification commands.
Security Transparency: Scanner suppressions are documented with justifications in Security Alerts Assessment, Scorecard Compliance, Container CVE Suppressions, and SAST Rule Rationale. Some alerts (Dependabot, code scanning) can only be dismissed or are very difficult to suppress outside the GitHub Security tab, so the files above do not cover every dismissed finding.
Detailed Architecture → | Security Policy → | Security Review Process →
Every research run has an egress scope that restricts, on a best-effort basis, where its traffic may go: which search engines run, whether the LLM and embeddings may be cloud services, and which result URLs may be fetched. Set it under Settings → Egress Scope or in the Privacy & Egress panel on the research form; choosing a scope in the panel also saves it as your default setting, so later runs use it too.
Strict and Private only (including an Adaptive run that resolves to it) also arm a best-effort socket-level guard on the research run that normally refuses connections to public addresses. It is a backstop with known gaps, not a guarantee; the Strict section of Egress modes lists some of them, such as a forward proxy or a relay on a private address. Under Strict, public engines, public result fetches and cloud model calls therefore usually fail, so pair it with a local engine and local models.
A locally-hosted SearXNG counts as a public engine — it proxies searches to the internet — so it is not available under Private only. Under Strict it may still run as your primary engine, and it then forwards your queries to its upstream engines on the internet.
LDR's guarded HTTP layer, used for most search-result and document fetches, also checks destinations against SSRF rules (including known cloud-metadata addresses such as 169.254.169.254) and re-checks redirects. With JavaScript rendering enabled (web.enable_javascript_rendering, off by default), pages that need it are loaded in headless Chromium, which resolves addresses itself. See the egress module README for the details.
Whether a signed-in user can point a search engine at a private address depends on the kind of engine:
The egress policy is an in-process guard rail against misconfiguration and prompt-injected fetches, not an air gap or a hard security boundary: for example, hostnames are still resolved through the configured DNS resolver before a fetch is refused, and it cannot reliably constrain code that runs inside the LDR process. For a hard boundary, add egress filtering at the container or firewall level as well.
Egress modes → | Threat model and caveats → | Enforcement points →
Local Deep Research contains no telemetry, no analytics, and no tracking. We do not collect, transmit, or store any data about you or your usage. No analytics SDKs, no phone-home calls, no crash reporting, no external scripts. Usage metrics stay in your local encrypted database.
The only network calls LDR makes are ones you initiate: search queries (to engines you configure), LLM API calls (to your chosen provider), and notifications (only if you set up Apprise).
Since we don't collect any usage data, we rely on you to tell us what works, what's broken, and what you'd like to see next — bug reports, feature ideas, and even which features you love or never use all help us improve LDR.
Headline results from the community benchmarks using the langgraph-agent strategy with Serper (cloud) search and the models running locally in Ollama:
Caveats: small samples, LLM-grader noise, and SimpleQA contamination risk on newer base models.
Picking a local model? The same community-maintained dataset tracks accuracy across models, search engines, and research strategies — the fastest way to see which Ollama / LM Studio / llama.cpp models actually work well for deep research before you download multi-GB weights. Browse the full leaderboard on Hugging Face →
Submit your own results → (contributors are listed in CONTRIBUTORS.md), or run benchmarks locally →.
LDR respects robots.txt and identifies itself honestly when fetching web pages — no stealth or anti-detection techniques. In rare cases this means a page that blocks automated access won't be fetched, which we consider the right trade-off.
When the JavaScript-rendering browser checks robots.txt, it applies the rules for the Local-Deep-Research product token as well as the rules that match the User-Agent it sends (Mozilla for the default browser User-Agent, or the first product token of a configured web.user_agent; otherwise *). A page is skipped if either set disallows it, so a site can add restrictions for this app with a User-agent: Local-Deep-Research group; an Allow there does not lift rules from the * group or the group matching the sent User-Agent, unless the configured User-Agent itself matches that Local-Deep-Research group.
from local_deep_research.api import LDRClient, quick_query # Option 1: Simplest - one line research summary = quick_query("username", "password", "What is quantum computing?") print(summary) # Option 2: Client for multiple operations client = LDRClient() client.login("username", "password") result = client.quick_research("What are the latest advances in quantum computing?") print(result["summary"]) HTTP API The code example below shows the basic API structure - for working examples, see the link below
import requests from bs4 import BeautifulSoup # Create session and authenticate session = requests.Session() login_page = session.get("http://localhost:5000/auth/login") soup = BeautifulSoup(login_page.text, "html.parser") login_csrf = soup.find("input", {"name": "csrf_token"}).get("value") # Login and get API CSRF token session.post("http://localhost:5000/auth/login", data={"username": "user", "password": "pass", "csrf_token": login_csrf}) csrf = session.get("http://localhost:5000/auth/csrf-token").json()["csrf_token"] # Make API request response = session.post("http://localhost:5000/api/start_research", json={"query": "Your research question"}, headers={"X-CSRF-Token": csrf}) 🚀 Ready-to-use HTTP API Examples → examples/api_usage/http/
# Run benchmarks from CLI python -m local_deep_research.benchmarks.cli.benchmark_commands simpleqa --examples 50 See the Command Line Tools guide for the full reference.
Connect LDR to your existing knowledge base. Unlike the HTTP client above, quick_summary() runs LDR in-process — no server needed — so you can pass it live Python objects such as LangChain retrievers:
LDR provides an MCP (Model Context Protocol) server that allows AI assistants like Claude Desktop and Claude Code to perform deep research. Full setup details in the MCP Server guide.
⚠️ Security Note: This MCP server is designed for local use only via STDIO transport (e.g., Claude Desktop). It has no built-in authentication or rate limiting. Do not expose over a network without implementing proper security controls. See the MCP Security Best Practices for network deployment requirements.
# Install with MCP extras pip install "local-deep-research[mcp]" Claude Desktop Configuration Add to your claude_desktop_config.json:
{ "mcpServers": { "local-deep-research": { "command": "ldr-mcp", "env": { "LDR_LLM_PROVIDER": "openai", "LDR_LLM_OPENAI_API_KEY": "sk-..." } } } } Claude Code Configuration Add to your .mcp.json (project-level) or ~/.claude/mcp.json (global):
The search tool lets you query specific search engines directly and get raw results (title, link, snippet) — no LLM processing, no cost, fast. This is especially useful for monitoring and subscriptions where you want to check for new content regularly without burning LLM tokens.
# Search arXiv for recent papers search(query="transformer architecture improvements", engine="arxiv") # Search PubMed for medical literature search(query="CRISPR clinical trials 2024", engine="pubmed") # Search Wikipedia for quick facts search(query="quantum error correction", engine="wikipedia") # Search GitHub for code and repositories search(query="agentic research frameworks", engine="github") # Use list_search_engines() to see all available engines Example Usage "Use quick_research to find information about quantum computing applications" "Search arxiv for recent papers on diffusion models" "Generate a detailed research report on renewable energy trends" 🤖 Supported LLMs Local Models Ollama — connect to its native API (default http://localhost:11434) LM Studio — connect to its OpenAI-compatible server (default http://localhost:1234/v1) llama.cpp — connect to llama-server's OpenAI-compatible endpoint (default http://localhost:8080/v1); start with llama-server -m Common models: Llama, Mistral, Gemma, DeepSeek, Qwen LLM processing runs on your own hardware when the model itself runs locally (search queries still go to the web). A local endpoint that relays to a hosted model, such as an Ollama cloud model or a local LiteLLM proxy, is not detected as remote. No API costs for locally-run models. 💡 Which local model should I pick? See the community benchmarks — community-submitted accuracy numbers across local and cloud models, so you can compare before downloading.
For the first FastAPI-based major release, read the upgrade and rollback guide before updating. Back up the data first: the release's new database revisions prevent a direct rollback to v1.10.7 against the upgraded databases. Copy each user's automatic pre-migration backup from encrypted_databases/backups/ /pre-migration/ to storage outside the data directory immediately after that user's first sign-in on the new release, and in any case before that user's next password change, which can remove it, and before any downgrade attempt. Never start v1.10.7 against the upgraded databases: each sign-in there first makes a backup, keeps only the newest backup directly in the user's backup directory (that new copy of the upgraded database), and then refuses the login. After any rollback to a release before 2.0, move every user's pre-migration/ folder out of the data directory (see the upgrade guide).
llm.model no longer has a default. Pre-1.6.3 installs auto-filled gemma3:12b (Ollama) when no model was configured, which silently downloaded a multi-GB binary. The field is now empty by default — pick a model in Settings → LLM, or research will fail loudly with a clear error.
The auto and parallel meta search engines were removed. The default langgraph-agent strategy selects engines dynamically per query, which replaces them. Stored settings are migrated automatically (removed values become searxng); update any explicit search_tool="auto" API calls or LDR_SEARCH_TOOL=auto env overrides to a concrete engine such as searxng.
Behind a reverse proxy: the rate limiter reads the client address differently. Up to v1.10.7 the login and registration rate limits keyed on the left-most X-Forwarded-For entry, or else X-Real-IP, sent by any peer, so any client could choose its own bucket. What happens now depends on your configuration:
With TRUST_PROXY_HEADERS=true but no LDR_SERVER_FORWARDED_ALLOW_IPS, LDR logs a startup warning naming the variable (or refuses to start if LDR_SERVER_TRUSTED_PROXY_COUNT is also set to a positive value, or if the allow-list is set explicitly to * or another value that trusts every peer). See Reverse proxy configuration.
The llamacpp provider now uses HTTP instead of in-process loading. If you previously set llm.llamacpp_model_path to a local .gguf file, that setting is no longer read. Instead, run llama-server -m (it ships with every modern llama.cpp build) and the default llm.llamacpp.url of http://localhost:8080/v1 will pick it up. Optional API key support is available via llm.llamacpp.api_key if you put llama-server behind an auth proxy.
"Local Deep Research deserves special mention for those who prioritize privacy... tuned to use open-source LLMs that can run on consumer GPUs or even CPUs. Journalists, researchers, or companies with sensitive topics can investigate information without queries ever hitting an external server."
— Medium: Open-Source Deep Research AI Assistants
Note: Third-party projects and articles are independently maintained. We link to them as useful resources but cannot guarantee their code quality or security.
We welcome contributions of all sizes — from typo fixes to new features. The key rule: keep PRs small and atomic (one change per PR). You don't need to be assigned to an issue: comment that you're working on it and open an early (draft) PR so progress is visible. For hard or architectural changes, and for anything that could affect research results or benchmarks (LLM prompts, the advanced search system, search engines), outline your approach in the issue first, so your effort leads to a successful merge rather than a misaligned PR. See our Contributing Guide to get started.
Local Deep Research is built on the work of many open-access initiatives, academic databases, and open-source projects. We are grateful to:
Wikipedia • OpenLibrary • Project Gutenberg • GitHub • Stack Exchange • The Guardian • Wayback Machine
These projects run on donations and grants, not paywalls. If Local Deep Research is useful to you, consider giving back to the open-access ecosystem that makes it possible:
Dependencies: All third-party packages use permissive licenses (MIT, Apache-2.0, BSD, etc.) - see allowlist
Both files in this release have provenance metadata.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Both files in this release have been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Yanked reason: the new search system we added in this release has stability issues




