local-deep-research 0.1.20__tar.gz → 0.1.21__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. {local_deep_research-0.1.20/src/local_deep_research.egg-info → local_deep_research-0.1.21}/PKG-INFO +99 -87
  2. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/README.md +98 -86
  3. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/pyproject.toml +1 -1
  4. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/defaults/search_engines.toml +33 -33
  5. {local_deep_research-0.1.20 → local_deep_research-0.1.21/src/local_deep_research.egg-info}/PKG-INFO +99 -87
  6. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research.egg-info/SOURCES.txt +0 -1
  7. local_deep_research-0.1.20/requirements.txt +0 -26
  8. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/LICENSE +0 -0
  9. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/MANIFEST.in +0 -0
  10. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/setup.cfg +0 -0
  11. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/__init__.py +0 -0
  12. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/citation_handler.py +0 -0
  13. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/config.py +0 -0
  14. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/defaults/__init__.py +0 -0
  15. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/defaults/llm_config.py +0 -0
  16. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/defaults/local_collections.toml +0 -0
  17. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/defaults/main.toml +0 -0
  18. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/main.py +0 -0
  19. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/report_generator.py +0 -0
  20. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/search_system.py +0 -0
  21. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/utilties/__init__.py +0 -0
  22. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/utilties/enums.py +0 -0
  23. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/utilties/llm_utils.py +0 -0
  24. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/utilties/search_utilities.py +0 -0
  25. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/utilties/setup_utils.py +0 -0
  26. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web/__init__.py +0 -0
  27. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web/app.py +0 -0
  28. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web/static/css/styles.css +0 -0
  29. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web/static/js/app.js +0 -0
  30. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web/static/sounds/README.md +0 -0
  31. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web/static/sounds/error.mp3 +0 -0
  32. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web/static/sounds/success.mp3 +0 -0
  33. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web/templates/api_keys_config.html +0 -0
  34. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web/templates/collections_config.html +0 -0
  35. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web/templates/index.html +0 -0
  36. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web/templates/llm_config.html +0 -0
  37. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web/templates/main_config.html +0 -0
  38. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web/templates/search_engines_config.html +0 -0
  39. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web/templates/settings.html +0 -0
  40. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web/templates/settings_dashboard.html +0 -0
  41. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web_search_engines/__init__.py +0 -0
  42. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web_search_engines/engines/__init__.py +0 -0
  43. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web_search_engines/engines/full_search.py +0 -0
  44. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web_search_engines/engines/meta_search_engine.py +0 -0
  45. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web_search_engines/engines/search_engine_arxiv.py +0 -0
  46. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web_search_engines/engines/search_engine_brave.py +0 -0
  47. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web_search_engines/engines/search_engine_ddg.py +0 -0
  48. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web_search_engines/engines/search_engine_github.py +0 -0
  49. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web_search_engines/engines/search_engine_google_pse.py +0 -0
  50. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web_search_engines/engines/search_engine_guardian.py +0 -0
  51. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web_search_engines/engines/search_engine_local.py +0 -0
  52. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web_search_engines/engines/search_engine_local_all.py +0 -0
  53. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web_search_engines/engines/search_engine_pubmed.py +0 -0
  54. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web_search_engines/engines/search_engine_searxng.py +0 -0
  55. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web_search_engines/engines/search_engine_semantic_scholar.py +0 -0
  56. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web_search_engines/engines/search_engine_serpapi.py +0 -0
  57. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web_search_engines/engines/search_engine_wayback.py +0 -0
  58. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web_search_engines/engines/search_engine_wikipedia.py +0 -0
  59. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web_search_engines/search_engine_base.py +0 -0
  60. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web_search_engines/search_engine_factory.py +0 -0
  61. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research/web_search_engines/search_engines_config.py +0 -0
  62. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research.egg-info/dependency_links.txt +0 -0
  63. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research.egg-info/entry_points.txt +0 -0
  64. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research.egg-info/requires.txt +0 -0
  65. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/src/local_deep_research.egg-info/top_level.txt +0 -0
  66. {local_deep_research-0.1.20 → local_deep_research-0.1.21}/tests/test_google_pse.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: local-deep-research
3
- Version: 0.1.20
3
+ Version: 0.1.21
4
4
  Summary: AI-powered research assistant with deep, iterative analysis using LLMs and web searches
5
5
  Author-email: LearningCircuit <185559241+LearningCircuit@users.noreply.github.com>, HashedViking <6432677+HashedViking@users.noreply.github.com>
6
6
  License: MIT License
@@ -106,6 +106,13 @@ ldr # (OR python -m local_deep_research.main)
106
106
  Access the web interface at `http://127.0.0.1:5000` in your browser.
107
107
 
108
108
  ## Features
109
+ <div align="center">
110
+ <a href="https://www.youtube.com/watch?v=4tDqV__jzKY">
111
+ <img src="https://img.youtube.com/vi/4tDqV__jzKY/0.jpg" alt="Local Deep Research">
112
+ <br>
113
+ <span>▶️ Watch Video</span>
114
+ </a>
115
+ </div>
109
116
 
110
117
  - 🔍 **Advanced Research Capabilities**
111
118
  - Automated deep research with intelligent follow-up questions
@@ -151,17 +158,17 @@ The package automatically creates and manages configuration files in your user d
151
158
 
152
159
  ### Default Configuration Files
153
160
 
154
- If you prefere environment variables please refere to this file: https://github.com/LearningCircuit/local-deep-research/blob/main/docs/env_configuration.md
155
-
156
161
  When you first run the tool, it creates these configuration files:
157
162
 
158
163
  | File | Purpose |
159
164
  |------|---------|
160
165
  | `settings.toml` | General settings for research, web interface, and search |
161
- | `llm_config.py` | Configure which LLM to use (local or cloud-based) |
166
+ | `llm_config.py` | Advanced LLM configuration (rarely needs modification) |
162
167
  | `search_engines.toml` | Define and configure search engines |
163
168
  | `local_collections.toml` | Configure local document collections for RAG |
164
- | `.secrets.toml` | Store API keys for cloud services |
169
+ | `.env` | Environment variables for configuration (recommended for API keys) |
170
+
171
+ > **Note:** For comprehensive environment variable configuration, see our [Environment Variables Guide](https://github.com/LearningCircuit/local-deep-research/blob/main/docs/env_configuration.md).
165
172
 
166
173
  ## Setting Up AI Models
167
174
 
@@ -175,42 +182,34 @@ The system supports multiple LLM providers:
175
182
 
176
183
  ### Cloud Models
177
184
 
178
- Edit your `.secrets.toml` file to add API keys:
185
+ Add API keys to your environment variables (recommended) by creating a `.env` file in your config directory:
179
186
 
180
- ```toml
181
- ANTHROPIC_API_KEY = "your-api-key-here" # For Claude models
182
- OPENAI_API_KEY = "your-openai-key-here" # For GPT models
183
- OPENAI_ENDPOINT_API_KEY = "your-key-here" # For OpenRouter or similar services
187
+ ```bash
188
+ # Set API keys for cloud providers in .env
189
+ ANTHROPIC_API_KEY=your-api-key-here # For Claude models
190
+ OPENAI_API_KEY=your-openai-key-here # For GPT models
191
+ OPENAI_ENDPOINT_API_KEY=your-key-here # For OpenRouter or similar services
192
+
193
+ # Set your preferred LLM provider and model (no need to edit llm_config.py)
194
+ LDR_LLM__PROVIDER=ollama # Options: ollama, openai, anthropic, etc.
195
+ LDR_LLM__MODEL=gemma3:12b # Model name to use
184
196
  ```
185
197
 
186
- Then edit `llm_config.py` to change the default provider:
187
-
188
- ```python
189
- # Set your preferred model provider here
190
- DEFAULT_PROVIDER = ModelProvider.OLLAMA # Change to your preferred provider
191
-
192
- # Set your default model name here
193
- DEFAULT_MODEL = "mistral" # Change to your preferred model
194
- ```
198
+ > **Important:** In most cases, you don't need to modify the `llm_config.py` file. Simply set the `LDR_LLM__PROVIDER` and `LDR_LLM__MODEL` environment variables to use your preferred model.
195
199
 
196
200
  ### Supported LLM Providers
197
201
 
198
202
  The system supports multiple LLM providers:
199
203
 
200
- | Provider | Type | Configuration | Notes |
201
- |----------|------|--------------|-------|
202
- | `OLLAMA` | Local | No API key needed | Default - install from ollama.ai |
203
- | `OPENAI` | Cloud | Requires `OPENAI_API_KEY` | GPT models (3.5, 4, 4o) |
204
- | `ANTHROPIC` | Cloud | Requires `ANTHROPIC_API_KEY` | Claude models (3 Opus, Sonnet, Haiku) |
205
- | `OPENAI_ENDPOINT` | Cloud | Requires `OPENAI_ENDPOINT_API_KEY` | For any OpenAI-compatible API |
206
- | `VLLM` | Local | No API key needed | For hosting models via vLLM |
207
-
208
- You can configure the OpenAI-compatible endpoint URL in `llm_config.py`:
209
-
210
- ```python
211
- # For OpenRouter, Together.ai, Azure OpenAI, or any compatible endpoint
212
- OPENAI_ENDPOINT_URL = "https://openrouter.ai/api/v1"
213
- ```
204
+ | Provider | Type | API Key | Setup Details | Models |
205
+ |----------|------|---------|---------------|--------|
206
+ | `OLLAMA` | Local | No | Install from [ollama.ai](https://ollama.ai) | Mistral, Llama, Gemma, etc. |
207
+ | `OPENAI` | Cloud | `OPENAI_API_KEY` | Set in environment | GPT-3.5, GPT-4, GPT-4o |
208
+ | `ANTHROPIC` | Cloud | `ANTHROPIC_API_KEY` | Set in environment | Claude 3 Opus, Sonnet, Haiku |
209
+ | `OPENAI_ENDPOINT` | Cloud | `OPENAI_ENDPOINT_API_KEY` | Set in environment | Any OpenAI-compatible model |
210
+ | `VLLM` | Local | No | Requires GPU setup | Any supported by vLLM |
211
+ | `LMSTUDIO` | Local | No | Use LM Studio server | Models from LM Studio |
212
+ | `LLAMACPP` | Local | No | Configure model path | GGUF model formats |
214
213
 
215
214
  The `OPENAI_ENDPOINT` provider can access any service with an OpenAI-compatible API, including:
216
215
  - OpenRouter (access to hundreds of models)
@@ -219,26 +218,43 @@ The `OPENAI_ENDPOINT` provider can access any service with an OpenAI-compatible
219
218
  - Groq
220
219
  - Anyscale
221
220
  - Self-hosted LLM servers with OpenAI compatibility
222
- - Any other service that implements the OpenAI API specification
223
221
 
224
222
  ## Setting Up Search Engines
225
223
 
226
- The system includes multiple search engines. Some require API keys:
224
+ Some search engines require API keys. Add them to your environment variables by creating a `.env` file in your config directory:
227
225
 
228
- Use .env in config folder if .secrets.toml doesnt work.
226
+ ```bash
227
+ # Search engine API keys (add to .env file)
228
+ SERP_API_KEY=your-serpapi-key-here # For Google results via SerpAPI
229
+ GOOGLE_PSE_API_KEY=your-google-key-here # For Google Programmable Search
230
+ GOOGLE_PSE_ENGINE_ID=your-pse-id-here # For Google Programmable Search
231
+ BRAVE_API_KEY=your-brave-search-key-here # For Brave Search
232
+ GUARDIAN_API_KEY=your-guardian-key-here # For The Guardian
233
+
234
+ # Set your preferred search tool
235
+ LDR_SEARCH__TOOL=auto # Default: intelligently selects best engine
236
+ ```
229
237
 
230
- You can also overwrite other settings via environment variables, e.g. to overwrite [web] port setting in settings.toml please use: **LDR_WEB__PORT=8080**
238
+ > **Tip:** To override other settings via environment variables (e.g., to change the web port), use: **LDR_WEB__PORT=8080**
231
239
 
232
- ```toml
233
- # Add to .secrets.toml
234
- SERP_API_KEY = "your-serpapi-key-here" # For Google results via SerpAPI
235
- GOOGLE_PSE_API_KEY = "your-google-key-here" # For Google Programmable Search
236
- GOOGLE_PSE_ENGINE_ID = "your-pse-id-here" # For Google Programmable Search
237
- BRAVE_API_KEY = "your-brave-search-key-here" # For Brave Search
238
- GUARDIAN_API_KEY = "your-guardian-key-here" # For The Guardian
239
- ```
240
+ ### Available Search Engines
241
+
242
+ | Engine | Purpose | API Key Required? | Rate Limit |
243
+ |--------|---------|-------------------|------------|
244
+ | `auto` | Intelligently selects the best engine | No | Based on selected engine |
245
+ | `wikipedia` | General knowledge and facts | No | No strict limit |
246
+ | `arxiv` | Scientific papers and research | No | No strict limit |
247
+ | `pubmed` | Medical and biomedical research | No | No strict limit |
248
+ | `semantic_scholar` | Academic literature across all fields | No | 100/5min |
249
+ | `github` | Code repositories and documentation | No | 60/hour (unauthenticated) |
250
+ | `brave` | Web search (privacy-focused) | Yes | Based on plan |
251
+ | `serpapi` | Google search results | Yes | Based on plan |
252
+ | `google_pse` | Custom Google search | Yes | 100/day free tier |
253
+ | `wayback` | Historical web content | No | No strict limit |
254
+ | `searxng` | Local web search engine | No (requires local server) | No limit |
255
+ | Any collection name | Search your local documents | No | No limit |
240
256
 
241
- No API key required for: Wikipedia, arXiv, PubMed, Semantic Scholar, and local collections.
257
+ > **Note:** For detailed SearXNG setup, see our [SearXNG Setup Guide](https://github.com/LearningCircuit/local-deep-research/blob/main/docs/SearXNG-Setup.md).
242
258
 
243
259
  ## Local Document Search (RAG)
244
260
 
@@ -262,8 +278,6 @@ max_filtered_results = 5
262
278
  chunk_size = 1000
263
279
  chunk_overlap = 200
264
280
  cache_dir = "__CACHE_DIR__/local_search/project_docs"
265
-
266
- # More collections defined in the file...
267
281
  ```
268
282
 
269
283
  2. Create your document directories:
@@ -279,34 +293,29 @@ You can use local document search in several ways:
279
293
  3. **All collections**: Set `tool = "local_all"` to search across all collections
280
294
  4. **Query syntax**: Type `collection:project_docs your query` to target a specific collection
281
295
 
282
- ## Available Search Engines
296
+ ## Docker Support
283
297
 
284
- | Engine | Purpose | API Key Required? | Rate Limit |
285
- |--------|---------|-------------------|------------|
286
- | `auto` | Intelligently selects the best engine | No | Based on selected engine |
287
- | `wikipedia` | General knowledge and facts | No | No strict limit |
288
- | `arxiv` | Scientific papers and research | No | No strict limit |
289
- | `pubmed` | Medical and biomedical research | No | No strict limit |
290
- | `semantic_scholar` | Academic literature across all fields | No | 100/5min |
291
- | `github` | Code repositories and documentation | No | 60/hour (unauthenticated) |
292
- | `brave` | Web search (privacy-focused) | Yes | Based on plan |
293
- | `serpapi` | Google search results | Yes | Based on plan |
294
- | `google_pse` | Custom Google search | Yes | 100/day free tier |
295
- | `wayback` | Historical web content | No | No strict limit |
296
- | `searxng` | Local web search engine | No (requires local server) | No limit |
297
- | Any collection name | Search your local documents | No | No limit |
298
+ Local Deep Research can run in Docker containers for easy deployment across environments.
298
299
 
299
- > **Support Free Knowledge:** If you frequently use the search engines in this tool, please consider making a donation to these organizations. They provide valuable services and rely on user support to maintain their operations:
300
- > - [Donate to Wikipedia](https://donate.wikimedia.org)
301
- > - [Support arXiv](https://arxiv.org/about/give)
302
- > - [Donate to DuckDuckGo](https://duckduckgo.com/donations)
303
- > - [Support PubMed/NCBI](https://www.nlm.nih.gov/pubs/donations/donations.html)
300
+ ### Quick Docker Run
301
+
302
+ ```bash
303
+ # Run with default settings (connects to Ollama running on the host)
304
+ docker run --network=host \
305
+ -e LDR_LLM__PROVIDER="ollama" \
306
+ -e LDR_LLM__MODEL="mistral" \
307
+ local-deep-research
308
+ ```
309
+
310
+ For comprehensive Docker setup information, see:
311
+ - [Docker Usage Guide](https://github.com/LearningCircuit/local-deep-research/blob/main/docs/docker-usage-readme.md)
312
+ - [Docker Compose Guide](https://github.com/LearningCircuit/local-deep-research/blob/main/docs/docker-compose-guide.md)
304
313
 
305
314
  ## Advanced Configuration
306
315
 
307
316
  ### Research Parameters
308
317
 
309
- Edit `settings.toml` to customize research parameters:
318
+ Edit `settings.toml` to customize research parameters or use environment variables:
310
319
 
311
320
  ```toml
312
321
  [search]
@@ -324,8 +333,13 @@ max_results = 50
324
333
 
325
334
  # Results after relevance filtering
326
335
  max_filtered_results = 5
336
+ ```
327
337
 
328
- # More settings available...
338
+ Using environment variables:
339
+ ```bash
340
+ LDR_SEARCH__TOOL=auto
341
+ LDR_SEARCH__ITERATIONS=3
342
+ LDR_SEARCH__QUESTIONS_PER_ITERATION=2
329
343
  ```
330
344
 
331
345
  ## Web Interface
@@ -338,9 +352,6 @@ The web interface offers several features:
338
352
  - **PDF Export**: Download reports
339
353
  - **Research Management**: Terminate processes or delete records
340
354
 
341
- ![Web Interface](./web1.png)
342
- ![Web Interface](./web2.png)
343
-
344
355
  ## Command Line Interface
345
356
 
346
357
  The CLI version allows you to:
@@ -363,8 +374,6 @@ cd local-deep-research
363
374
  pip install -e .
364
375
  ```
365
376
 
366
- This creates an "editable" installation that uses your local code, so any changes you make are immediately available without reinstalling.
367
-
368
377
  You can run the application directly using Python module syntax:
369
378
 
370
379
  ```bash
@@ -375,12 +384,6 @@ python -m local_deep_research.web.app
375
384
  python -m local_deep_research.main
376
385
  ```
377
386
 
378
- This approach is useful for development and debugging, as it provides more detailed error messages and allows you to make code changes on the fly.
379
-
380
- ## Example Research
381
-
382
- The repository includes complete research examples like our [fusion energy research analysis](https://github.com/LearningCircuit/local-deep-research/blob/main/examples/fusion-energy-research-developments.md) showcasing the system's capabilities.
383
-
384
387
  ## Community & Support
385
388
 
386
389
  Join our [Discord server](https://discord.gg/2E6gYU2Z) to exchange ideas, discuss usage patterns, and share research approaches.
@@ -393,24 +396,33 @@ This project is licensed under the MIT License.
393
396
 
394
397
  - Built with [Ollama](https://ollama.ai) for local AI processing
395
398
  - Search powered by multiple sources:
396
- - [Wikipedia](https://www.wikipedia.org/) for factual knowledge (default search engine)
399
+ - [Wikipedia](https://www.wikipedia.org/) for factual knowledge
397
400
  - [arXiv](https://arxiv.org/) for scientific papers
398
401
  - [PubMed](https://pubmed.ncbi.nlm.nih.gov/) for biomedical literature
402
+ - [Semantic Scholar](https://www.semanticscholar.org/) for academic literature
399
403
  - [DuckDuckGo](https://duckduckgo.com) for web search
400
404
  - [The Guardian](https://www.theguardian.com/) for journalism
401
- - [SerpAPI](https://serpapi.com) for Google search results (requires API key)
405
+ - [SerpAPI](https://serpapi.com) for Google search results
402
406
  - [SearXNG](https://searxng.org/) for local web-search engine
403
407
  - [Brave Search](https://search.brave.com/) for privacy-focused web search
404
- - [Semantic Scholar](https://www.semanticscholar.org/) for academic literature
405
408
  - Built on [LangChain](https://github.com/hwchase17/langchain) framework
406
409
  - Uses [justext](https://github.com/miso-belica/justext), [Playwright](https://playwright.dev), [FAISS](https://github.com/facebookresearch/faiss), and more
407
410
 
411
+ > **Support Free Knowledge:** If you frequently use the search engines in this tool, please consider making a donation to these organizations:
412
+ > - [Donate to Wikipedia](https://donate.wikimedia.org)
413
+ > - [Support arXiv](https://arxiv.org/about/give)
414
+ > - [Donate to DuckDuckGo](https://duckduckgo.com/donations)
415
+ > - [Support PubMed/NCBI](https://www.nlm.nih.gov/pubs/donations/donations.html)
416
+
408
417
  ## Contributing
409
418
 
410
419
  Contributions are welcome! Please feel free to submit a Pull Request.
411
420
 
412
421
  1. Fork the repository
413
422
  2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
414
- 3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
415
- 4. Push to the branch (`git push origin feature/AmazingFeature`)
416
- 5. Open a Pull Request
423
+ 3. Make your changes
424
+ 4. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
425
+ 5. Push to the branch (`git push origin feature/AmazingFeature`)
426
+ 6. **Important:** Open a Pull Request against the `dev` branch, not the `main` branch
427
+
428
+ We prefer all pull requests to be submitted against the `dev` branch for easier testing and integration before releasing to the main branch.
@@ -37,6 +37,13 @@ ldr # (OR python -m local_deep_research.main)
37
37
  Access the web interface at `http://127.0.0.1:5000` in your browser.
38
38
 
39
39
  ## Features
40
+ <div align="center">
41
+ <a href="https://www.youtube.com/watch?v=4tDqV__jzKY">
42
+ <img src="https://img.youtube.com/vi/4tDqV__jzKY/0.jpg" alt="Local Deep Research">
43
+ <br>
44
+ <span>▶️ Watch Video</span>
45
+ </a>
46
+ </div>
40
47
 
41
48
  - 🔍 **Advanced Research Capabilities**
42
49
  - Automated deep research with intelligent follow-up questions
@@ -82,17 +89,17 @@ The package automatically creates and manages configuration files in your user d
82
89
 
83
90
  ### Default Configuration Files
84
91
 
85
- If you prefere environment variables please refere to this file: https://github.com/LearningCircuit/local-deep-research/blob/main/docs/env_configuration.md
86
-
87
92
  When you first run the tool, it creates these configuration files:
88
93
 
89
94
  | File | Purpose |
90
95
  |------|---------|
91
96
  | `settings.toml` | General settings for research, web interface, and search |
92
- | `llm_config.py` | Configure which LLM to use (local or cloud-based) |
97
+ | `llm_config.py` | Advanced LLM configuration (rarely needs modification) |
93
98
  | `search_engines.toml` | Define and configure search engines |
94
99
  | `local_collections.toml` | Configure local document collections for RAG |
95
- | `.secrets.toml` | Store API keys for cloud services |
100
+ | `.env` | Environment variables for configuration (recommended for API keys) |
101
+
102
+ > **Note:** For comprehensive environment variable configuration, see our [Environment Variables Guide](https://github.com/LearningCircuit/local-deep-research/blob/main/docs/env_configuration.md).
96
103
 
97
104
  ## Setting Up AI Models
98
105
 
@@ -106,42 +113,34 @@ The system supports multiple LLM providers:
106
113
 
107
114
  ### Cloud Models
108
115
 
109
- Edit your `.secrets.toml` file to add API keys:
116
+ Add API keys to your environment variables (recommended) by creating a `.env` file in your config directory:
110
117
 
111
- ```toml
112
- ANTHROPIC_API_KEY = "your-api-key-here" # For Claude models
113
- OPENAI_API_KEY = "your-openai-key-here" # For GPT models
114
- OPENAI_ENDPOINT_API_KEY = "your-key-here" # For OpenRouter or similar services
118
+ ```bash
119
+ # Set API keys for cloud providers in .env
120
+ ANTHROPIC_API_KEY=your-api-key-here # For Claude models
121
+ OPENAI_API_KEY=your-openai-key-here # For GPT models
122
+ OPENAI_ENDPOINT_API_KEY=your-key-here # For OpenRouter or similar services
123
+
124
+ # Set your preferred LLM provider and model (no need to edit llm_config.py)
125
+ LDR_LLM__PROVIDER=ollama # Options: ollama, openai, anthropic, etc.
126
+ LDR_LLM__MODEL=gemma3:12b # Model name to use
115
127
  ```
116
128
 
117
- Then edit `llm_config.py` to change the default provider:
118
-
119
- ```python
120
- # Set your preferred model provider here
121
- DEFAULT_PROVIDER = ModelProvider.OLLAMA # Change to your preferred provider
122
-
123
- # Set your default model name here
124
- DEFAULT_MODEL = "mistral" # Change to your preferred model
125
- ```
129
+ > **Important:** In most cases, you don't need to modify the `llm_config.py` file. Simply set the `LDR_LLM__PROVIDER` and `LDR_LLM__MODEL` environment variables to use your preferred model.
126
130
 
127
131
  ### Supported LLM Providers
128
132
 
129
133
  The system supports multiple LLM providers:
130
134
 
131
- | Provider | Type | Configuration | Notes |
132
- |----------|------|--------------|-------|
133
- | `OLLAMA` | Local | No API key needed | Default - install from ollama.ai |
134
- | `OPENAI` | Cloud | Requires `OPENAI_API_KEY` | GPT models (3.5, 4, 4o) |
135
- | `ANTHROPIC` | Cloud | Requires `ANTHROPIC_API_KEY` | Claude models (3 Opus, Sonnet, Haiku) |
136
- | `OPENAI_ENDPOINT` | Cloud | Requires `OPENAI_ENDPOINT_API_KEY` | For any OpenAI-compatible API |
137
- | `VLLM` | Local | No API key needed | For hosting models via vLLM |
138
-
139
- You can configure the OpenAI-compatible endpoint URL in `llm_config.py`:
140
-
141
- ```python
142
- # For OpenRouter, Together.ai, Azure OpenAI, or any compatible endpoint
143
- OPENAI_ENDPOINT_URL = "https://openrouter.ai/api/v1"
144
- ```
135
+ | Provider | Type | API Key | Setup Details | Models |
136
+ |----------|------|---------|---------------|--------|
137
+ | `OLLAMA` | Local | No | Install from [ollama.ai](https://ollama.ai) | Mistral, Llama, Gemma, etc. |
138
+ | `OPENAI` | Cloud | `OPENAI_API_KEY` | Set in environment | GPT-3.5, GPT-4, GPT-4o |
139
+ | `ANTHROPIC` | Cloud | `ANTHROPIC_API_KEY` | Set in environment | Claude 3 Opus, Sonnet, Haiku |
140
+ | `OPENAI_ENDPOINT` | Cloud | `OPENAI_ENDPOINT_API_KEY` | Set in environment | Any OpenAI-compatible model |
141
+ | `VLLM` | Local | No | Requires GPU setup | Any supported by vLLM |
142
+ | `LMSTUDIO` | Local | No | Use LM Studio server | Models from LM Studio |
143
+ | `LLAMACPP` | Local | No | Configure model path | GGUF model formats |
145
144
 
146
145
  The `OPENAI_ENDPOINT` provider can access any service with an OpenAI-compatible API, including:
147
146
  - OpenRouter (access to hundreds of models)
@@ -150,26 +149,43 @@ The `OPENAI_ENDPOINT` provider can access any service with an OpenAI-compatible
150
149
  - Groq
151
150
  - Anyscale
152
151
  - Self-hosted LLM servers with OpenAI compatibility
153
- - Any other service that implements the OpenAI API specification
154
152
 
155
153
  ## Setting Up Search Engines
156
154
 
157
- The system includes multiple search engines. Some require API keys:
155
+ Some search engines require API keys. Add them to your environment variables by creating a `.env` file in your config directory:
158
156
 
159
- Use .env in config folder if .secrets.toml doesnt work.
157
+ ```bash
158
+ # Search engine API keys (add to .env file)
159
+ SERP_API_KEY=your-serpapi-key-here # For Google results via SerpAPI
160
+ GOOGLE_PSE_API_KEY=your-google-key-here # For Google Programmable Search
161
+ GOOGLE_PSE_ENGINE_ID=your-pse-id-here # For Google Programmable Search
162
+ BRAVE_API_KEY=your-brave-search-key-here # For Brave Search
163
+ GUARDIAN_API_KEY=your-guardian-key-here # For The Guardian
164
+
165
+ # Set your preferred search tool
166
+ LDR_SEARCH__TOOL=auto # Default: intelligently selects best engine
167
+ ```
160
168
 
161
- You can also overwrite other settings via environment variables, e.g. to overwrite [web] port setting in settings.toml please use: **LDR_WEB__PORT=8080**
169
+ > **Tip:** To override other settings via environment variables (e.g., to change the web port), use: **LDR_WEB__PORT=8080**
162
170
 
163
- ```toml
164
- # Add to .secrets.toml
165
- SERP_API_KEY = "your-serpapi-key-here" # For Google results via SerpAPI
166
- GOOGLE_PSE_API_KEY = "your-google-key-here" # For Google Programmable Search
167
- GOOGLE_PSE_ENGINE_ID = "your-pse-id-here" # For Google Programmable Search
168
- BRAVE_API_KEY = "your-brave-search-key-here" # For Brave Search
169
- GUARDIAN_API_KEY = "your-guardian-key-here" # For The Guardian
170
- ```
171
+ ### Available Search Engines
172
+
173
+ | Engine | Purpose | API Key Required? | Rate Limit |
174
+ |--------|---------|-------------------|------------|
175
+ | `auto` | Intelligently selects the best engine | No | Based on selected engine |
176
+ | `wikipedia` | General knowledge and facts | No | No strict limit |
177
+ | `arxiv` | Scientific papers and research | No | No strict limit |
178
+ | `pubmed` | Medical and biomedical research | No | No strict limit |
179
+ | `semantic_scholar` | Academic literature across all fields | No | 100/5min |
180
+ | `github` | Code repositories and documentation | No | 60/hour (unauthenticated) |
181
+ | `brave` | Web search (privacy-focused) | Yes | Based on plan |
182
+ | `serpapi` | Google search results | Yes | Based on plan |
183
+ | `google_pse` | Custom Google search | Yes | 100/day free tier |
184
+ | `wayback` | Historical web content | No | No strict limit |
185
+ | `searxng` | Local web search engine | No (requires local server) | No limit |
186
+ | Any collection name | Search your local documents | No | No limit |
171
187
 
172
- No API key required for: Wikipedia, arXiv, PubMed, Semantic Scholar, and local collections.
188
+ > **Note:** For detailed SearXNG setup, see our [SearXNG Setup Guide](https://github.com/LearningCircuit/local-deep-research/blob/main/docs/SearXNG-Setup.md).
173
189
 
174
190
  ## Local Document Search (RAG)
175
191
 
@@ -193,8 +209,6 @@ max_filtered_results = 5
193
209
  chunk_size = 1000
194
210
  chunk_overlap = 200
195
211
  cache_dir = "__CACHE_DIR__/local_search/project_docs"
196
-
197
- # More collections defined in the file...
198
212
  ```
199
213
 
200
214
  2. Create your document directories:
@@ -210,34 +224,29 @@ You can use local document search in several ways:
210
224
  3. **All collections**: Set `tool = "local_all"` to search across all collections
211
225
  4. **Query syntax**: Type `collection:project_docs your query` to target a specific collection
212
226
 
213
- ## Available Search Engines
227
+ ## Docker Support
214
228
 
215
- | Engine | Purpose | API Key Required? | Rate Limit |
216
- |--------|---------|-------------------|------------|
217
- | `auto` | Intelligently selects the best engine | No | Based on selected engine |
218
- | `wikipedia` | General knowledge and facts | No | No strict limit |
219
- | `arxiv` | Scientific papers and research | No | No strict limit |
220
- | `pubmed` | Medical and biomedical research | No | No strict limit |
221
- | `semantic_scholar` | Academic literature across all fields | No | 100/5min |
222
- | `github` | Code repositories and documentation | No | 60/hour (unauthenticated) |
223
- | `brave` | Web search (privacy-focused) | Yes | Based on plan |
224
- | `serpapi` | Google search results | Yes | Based on plan |
225
- | `google_pse` | Custom Google search | Yes | 100/day free tier |
226
- | `wayback` | Historical web content | No | No strict limit |
227
- | `searxng` | Local web search engine | No (requires local server) | No limit |
228
- | Any collection name | Search your local documents | No | No limit |
229
+ Local Deep Research can run in Docker containers for easy deployment across environments.
229
230
 
230
- > **Support Free Knowledge:** If you frequently use the search engines in this tool, please consider making a donation to these organizations. They provide valuable services and rely on user support to maintain their operations:
231
- > - [Donate to Wikipedia](https://donate.wikimedia.org)
232
- > - [Support arXiv](https://arxiv.org/about/give)
233
- > - [Donate to DuckDuckGo](https://duckduckgo.com/donations)
234
- > - [Support PubMed/NCBI](https://www.nlm.nih.gov/pubs/donations/donations.html)
231
+ ### Quick Docker Run
232
+
233
+ ```bash
234
+ # Run with default settings (connects to Ollama running on the host)
235
+ docker run --network=host \
236
+ -e LDR_LLM__PROVIDER="ollama" \
237
+ -e LDR_LLM__MODEL="mistral" \
238
+ local-deep-research
239
+ ```
240
+
241
+ For comprehensive Docker setup information, see:
242
+ - [Docker Usage Guide](https://github.com/LearningCircuit/local-deep-research/blob/main/docs/docker-usage-readme.md)
243
+ - [Docker Compose Guide](https://github.com/LearningCircuit/local-deep-research/blob/main/docs/docker-compose-guide.md)
235
244
 
236
245
  ## Advanced Configuration
237
246
 
238
247
  ### Research Parameters
239
248
 
240
- Edit `settings.toml` to customize research parameters:
249
+ Edit `settings.toml` to customize research parameters or use environment variables:
241
250
 
242
251
  ```toml
243
252
  [search]
@@ -255,8 +264,13 @@ max_results = 50
255
264
 
256
265
  # Results after relevance filtering
257
266
  max_filtered_results = 5
267
+ ```
258
268
 
259
- # More settings available...
269
+ Using environment variables:
270
+ ```bash
271
+ LDR_SEARCH__TOOL=auto
272
+ LDR_SEARCH__ITERATIONS=3
273
+ LDR_SEARCH__QUESTIONS_PER_ITERATION=2
260
274
  ```
261
275
 
262
276
  ## Web Interface
@@ -269,9 +283,6 @@ The web interface offers several features:
269
283
  - **PDF Export**: Download reports
270
284
  - **Research Management**: Terminate processes or delete records
271
285
 
272
- ![Web Interface](./web1.png)
273
- ![Web Interface](./web2.png)
274
-
275
286
  ## Command Line Interface
276
287
 
277
288
  The CLI version allows you to:
@@ -294,8 +305,6 @@ cd local-deep-research
294
305
  pip install -e .
295
306
  ```
296
307
 
297
- This creates an "editable" installation that uses your local code, so any changes you make are immediately available without reinstalling.
298
-
299
308
  You can run the application directly using Python module syntax:
300
309
 
301
310
  ```bash
@@ -306,12 +315,6 @@ python -m local_deep_research.web.app
306
315
  python -m local_deep_research.main
307
316
  ```
308
317
 
309
- This approach is useful for development and debugging, as it provides more detailed error messages and allows you to make code changes on the fly.
310
-
311
- ## Example Research
312
-
313
- The repository includes complete research examples like our [fusion energy research analysis](https://github.com/LearningCircuit/local-deep-research/blob/main/examples/fusion-energy-research-developments.md) showcasing the system's capabilities.
314
-
315
318
  ## Community & Support
316
319
 
317
320
  Join our [Discord server](https://discord.gg/2E6gYU2Z) to exchange ideas, discuss usage patterns, and share research approaches.
@@ -324,24 +327,33 @@ This project is licensed under the MIT License.
324
327
 
325
328
  - Built with [Ollama](https://ollama.ai) for local AI processing
326
329
  - Search powered by multiple sources:
327
- - [Wikipedia](https://www.wikipedia.org/) for factual knowledge (default search engine)
330
+ - [Wikipedia](https://www.wikipedia.org/) for factual knowledge
328
331
  - [arXiv](https://arxiv.org/) for scientific papers
329
332
  - [PubMed](https://pubmed.ncbi.nlm.nih.gov/) for biomedical literature
333
+ - [Semantic Scholar](https://www.semanticscholar.org/) for academic literature
330
334
  - [DuckDuckGo](https://duckduckgo.com) for web search
331
335
  - [The Guardian](https://www.theguardian.com/) for journalism
332
- - [SerpAPI](https://serpapi.com) for Google search results (requires API key)
336
+ - [SerpAPI](https://serpapi.com) for Google search results
333
337
  - [SearXNG](https://searxng.org/) for local web-search engine
334
338
  - [Brave Search](https://search.brave.com/) for privacy-focused web search
335
- - [Semantic Scholar](https://www.semanticscholar.org/) for academic literature
336
339
  - Built on [LangChain](https://github.com/hwchase17/langchain) framework
337
340
  - Uses [justext](https://github.com/miso-belica/justext), [Playwright](https://playwright.dev), [FAISS](https://github.com/facebookresearch/faiss), and more
338
341
 
342
+ > **Support Free Knowledge:** If you frequently use the search engines in this tool, please consider making a donation to these organizations:
343
+ > - [Donate to Wikipedia](https://donate.wikimedia.org)
344
+ > - [Support arXiv](https://arxiv.org/about/give)
345
+ > - [Donate to DuckDuckGo](https://duckduckgo.com/donations)
346
+ > - [Support PubMed/NCBI](https://www.nlm.nih.gov/pubs/donations/donations.html)
347
+
339
348
  ## Contributing
340
349
 
341
350
  Contributions are welcome! Please feel free to submit a Pull Request.
342
351
 
343
352
  1. Fork the repository
344
353
  2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
345
- 3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
346
- 4. Push to the branch (`git push origin feature/AmazingFeature`)
347
- 5. Open a Pull Request
354
+ 3. Make your changes
355
+ 4. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
356
+ 5. Push to the branch (`git push origin feature/AmazingFeature`)
357
+ 6. **Important:** Open a Pull Request against the `dev` branch, not the `main` branch
358
+
359
+ We prefer all pull requests to be submitted against the `dev` branch for easier testing and integration before releasing to the main branch.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "local-deep-research"
7
- version = "0.1.20"
7
+ version = "0.1.21"
8
8
  description = "AI-powered research assistant with deep, iterative analysis using LLMs and web searches"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"