惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
Martin Fowler
Martin Fowler
The GitHub Blog
The GitHub Blog
B
Blog RSS Feed
U
Unit 42
阮一峰的网络日志
阮一峰的网络日志
量子位
GbyAI
GbyAI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
云风的 BLOG
云风的 BLOG
小众软件
小众软件
博客园 - 三生石上(FineUI控件)
L
LangChain Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园_首页
IT之家
IT之家
V
Visual Studio Blog
Y
Y Combinator Blog
Blog — PlanetScale
Blog — PlanetScale
宝玉的分享
宝玉的分享
Apple Machine Learning Research
Apple Machine Learning Research
I
InfoQ
D
Docker
V
V2EX

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Local Deep Research: Run Your Own AI Research Assistant, ...
ArshTechPro · 2026-05-07 · via DEV Community

If you have ever wished you could throw a complex question at an AI and get back a proper cited report — not a hallucinated paragraph, but something that actually searched the web, read papers, and synthesized sources — that is what Local Deep Research (LDR) does. And it runs entirely on your machine.

The project sits at about 4,000 GitHub stars at the time of writing, has 124 releases, and is actively maintained. It is worth understanding what it actually does before you decide whether to spin it up.

What Is It?

Local Deep Research is a self-hosted AI research assistant. You give it a question. It searches across multiple sources — web, arXiv, PubMed, Wikipedia, GitHub, your own local documents — iterates on what it finds, and produces a structured report with citations.

It supports both local models (via Ollama) and cloud models (OpenAI, Anthropic, Google). The "local" in the name means your data never has to leave your machine if you choose the fully-local setup.

Benchmark-wise, the project claims roughly 95% accuracy on the SimpleQA benchmark when tested with GPT-4.1-mini and SearXNG. That puts it in the range of commercial deep research tools.


Who This Is For

This tool is genuinely useful if you fall into one of these categories:

  • You do research-heavy work (technical writing, literature reviews, competitive analysis) and are tired of manually stitching together sources.
  • You want to search across your own document library with AI — think internal wikis, PDFs, notes.
  • You work with sensitive topics and cannot send queries to a third-party API.
  • You want to build a compounding knowledge base over time where each research session adds to a searchable library.

If you just want quick answers and are fine with ChatGPT, LDR is probably overkill. But if you want something you own and control, it is a serious option.


How It Works

The core loop is straightforward:

  1. You submit a research question.
  2. LDR picks a research strategy (quick summary, deep analysis, academic, etc.) and breaks the question into sub-queries.
  3. It searches across configured sources, pulling results from the web, academic databases, or your local documents.
  4. It synthesizes the results iteratively, discarding low-quality content and expanding on promising threads.
  5. It produces a final report with citations and optionally stores sources in your encrypted local library.

Each session can download sources (arXiv papers, web pages, PubMed articles) directly into your library, which gets indexed and made searchable. Over time your knowledge base grows and future research queries can search across both live web results and everything you have already collected.


Getting Started

Option 1: Docker (Recommended for most people)

This is the fastest path. It handles dependencies, encryption, and all service wiring automatically.

Standard setup (CPU, works on Mac, Windows, Linux):

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

Enter fullscreen mode Exit fullscreen mode

Wait about 30 seconds, then open http://localhost:5000.

With NVIDIA GPU acceleration (Linux only):

First install the NVIDIA Container Toolkit:

curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor \
  -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg

curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
  sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
  sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list

sudo apt-get update && sudo apt-get install nvidia-container-toolkit -y
sudo systemctl restart docker
nvidia-smi  # verify it worked

Enter fullscreen mode Exit fullscreen mode

Then bring up the stack with GPU support:

curl -O https://raw.githubusercontent.com/LearningCircuit/local-deep-research/main/docker-compose.yml
curl -O https://raw.githubusercontent.com/LearningCircuit/local-deep-research/main/docker-compose.gpu.override.yml
docker compose -f docker-compose.yml -f docker-compose.gpu.override.yml up -d

Enter fullscreen mode Exit fullscreen mode

The Docker Compose setup bundles Ollama (local LLM runner) and SearXNG (self-hosted meta-search engine) together with LDR. Everything runs locally.


Option 2: pip (For developers / Python integration)

If you want to embed LDR in a Python project or prefer to manage dependencies yourself:

# Install the package
pip install local-deep-research

# Run SearXNG in Docker for search
docker run -d -p 8080:8080 --name searxng searxng/searxng

# Install Ollama from https://ollama.ai, then pull a model
ollama pull gemma3:12b

# Start the web UI
python -m local_deep_research.web.app

Enter fullscreen mode Exit fullscreen mode

Important note on encryption: The pip install does not automatically set up SQLCipher (the AES-256 encrypted database LDR uses for storing your data and API keys). If you hit errors during setup, bypass it for now with:

export LDR_ALLOW_UNENCRYPTED=true

Enter fullscreen mode Exit fullscreen mode

This stores data in plain SQLite. Fine for local dev, not recommended for production or shared setups. Docker handles encryption out of the box.


Using the Python API

Once running, you can drive LDR programmatically:

from local_deep_research.api import LDRClient, quick_query

# One-liner research
summary = quick_query("username", "password", "What is the current state of Rust async runtimes?")
print(summary)

# Client for more control
client = LDRClient()
client.login("username", "password")
result = client.quick_research("Compare FAISS vs Hnswlib for vector search at scale")
print(result["summary"])

Enter fullscreen mode Exit fullscreen mode


Using the HTTP API

LDR exposes a REST API with session-based authentication and CSRF protection. The auth flow is a bit verbose but works reliably:

import requests
from bs4 import BeautifulSoup

session = requests.Session()

# Get CSRF token from login page
login_page = session.get("http://localhost:5000/auth/login")
soup = BeautifulSoup(login_page.text, "html.parser")
csrf = soup.find("input", {"name": "csrf_token"}).get("value")

# Authenticate
session.post("http://localhost:5000/auth/login", data={
    "username": "user",
    "password": "pass",
    "csrf_token": csrf
})

# Get API CSRF token
api_csrf = session.get("http://localhost:5000/auth/csrf-token").json()["csrf_token"]

# Submit a research query
response = session.post(
    "http://localhost:5000/api/start_research",
    json={"query": "What are the tradeoffs between gRPC and REST for internal microservices?"},
    headers={"X-CSRF-Token": api_csrf}
)
print(response.json())

Enter fullscreen mode Exit fullscreen mode

The repository includes ready-to-run HTTP examples under examples/api_usage/http/ that handle authentication, retry logic, and progress polling.


Enterprise / RAG Integration

If you already have a vector store or internal knowledge base, LDR can search it as one of its sources via LangChain retrievers:

from local_deep_research.api import quick_summary

result = quick_summary(
    query="What are our current deployment procedures for the payments service?",
    retrievers={"internal_kb": your_langchain_retriever},
    search_tool="internal_kb"
)

Enter fullscreen mode Exit fullscreen mode

It supports FAISS, Chroma, Pinecone, Weaviate, Elasticsearch, and anything LangChain-compatible. This is where the tool gets interesting for teams — you can combine live web search with your own internal documents in a single research pass.


Search Sources Available

Free (no API key needed):

  • arXiv, PubMed, Semantic Scholar (academic)
  • Wikipedia, SearXNG (general web)
  • GitHub (technical)
  • The Guardian, Wikinews (news)
  • Wayback Machine (historical)

Premium (API key required):

  • Tavily (AI-optimized search)
  • Google (via SerpAPI or Programmable Search Engine)
  • Brave Search

Custom:

  • Your local documents
  • Any LangChain-compatible retriever

Supported LLMs

Local via Ollama: Llama 3, Mistral, Gemma, DeepSeek, and anything Ollama supports. No API costs, processing stays on your machine. Search queries will still hit the web if you are using web search engines.

Cloud: OpenAI (GPT-4, GPT-4.1-mini), Anthropic (Claude 3), Google (Gemini), and 100+ models via OpenRouter.

The README benchmarks show GPT-4.1-mini + SearXNG hitting 90-95% on SimpleQA. Gemini 2.0 Flash reached 82% in a single test run. Results vary by query type and configuration.


Security Model

For a self-hosted tool that holds API keys and research data, the security story matters.

Each user gets an isolated SQLCipher database encrypted with AES-256. The project uses a zero-knowledge design — there is no password recovery mechanism, which means even server admins cannot read user data. Docker images are signed with Cosign and include SLSA provenance attestations. The CI pipeline runs CodeQL, Semgrep, OWASP ZAP, Trivy, Gitleaks, and OSV-Scanner on every release.

If you are running this fully locally with Ollama and SearXNG, nothing leaves your machine.


Is It Worth Trying?

Yes, if:

  • You regularly do research that requires synthesizing multiple sources.
  • You need to search across private documents alongside the web.
  • Privacy matters — you cannot send queries to commercial APIs.
  • You want to build up a searchable knowledge base over time.
  • You are building a research-augmented application and want a local-first backend.

Maybe not, if:

  • You need simple Q&A. This is heavyweight for that.
  • You are on limited hardware. Running a local LLM plus SearXNG plus the app itself adds up. A GPU helps significantly.
  • You want a zero-config experience. The Docker path is smooth, but getting the full setup — GPU passthrough, encryption, custom models — takes some tinkering.

The SQLCipher setup is the roughest edge. Docker sidesteps it cleanly, but the pip path has caught people out. The project documents it well, but plan for some back-and-forth if you go that route.


Quick Reference

Repo github.com/LearningCircuit/local-deep-research
License MIT
Language Python (80%), JavaScript (14%)
Install Docker (recommended) or pip
Local LLM Ollama
Local Search SearXNG
Database SQLCipher (AES-256)
API REST + Python client
WebSocket Yes (live progress)
Benchmark ~95% SimpleQA (GPT-4.1-mini)

Further Reading