✨ Features
- Deep Research Workflow: Multi-loop research process with query generation, web search, summarization, and reflection
- Local LLM Integration: Works with Ollama and LMStudio for complete privacy
- Multiple Search APIs: DuckDuckGo, Tavily, Perplexity, etc.
- Real-time Progress: Track progress in realtime step-by-step visualization
- Smart Source Management: Automatic deduplication and relevance scoring
- Vector Embeddings: Semantic search across research history using sentence transformers
- Research History: Persistent storage with similarity search
- Configuration Management: Easy LLM and search API configuration
- Export Capabilities: Download results in Markdown or text format
🚀 Quick Start
| Requirement | Version | Description |
|---|---|---|
| 🐍 Python | 3.11+ | Core runtime environment |
| 🦙 Ollama/LMStudio | Latest | Local LLM provider |
| 📦 Git | Latest | Version control |
# 1. Clone and navigate to the directory
cd streamlit-deep-researcher
# 2. Install dependencies
pip install -r requirements.txt
# 3. Configure environment
cp .env.example .env
# Edit .env with your settings
# 4. Run the application
streamlit run app.py
# 5. Open your browser at http://localhost:8501- Navigate to
http://localhost:8501 - Configure your LLM settings in the sidebar
- Start researching!
⚙️ Configuration
Ollama (Recommended)
# Install Ollama
curl -fsSL https://ollama.ai/install.sh | sh
# Pull a model
ollama pull gemma3:latest
# or
ollama pull llama3.2
# Start Ollama (usually runs automatically)
ollama serveLMStudio
- Download and install LMStudio
- Load a model in LMStudio
- Start the local server
- Configure the base URL in the sidebar
Configuration File (.env)
# LLM Settings
LOCAL_LLM="gemma3:latest"
LLM_PROVIDER="ollama"
OLLAMA_BASE_URL="http://localhost:11434/"
LMSTUDIO_BASE_URL="http://localhost:1234/v1"
# Research Settings
MAX_WEB_RESEARCH_LOOPS=3
SEARCH_API="duckduckgo"
FETCH_FULL_PAGE=true
# API Keys (optional)
TAVILY_API_KEY=""
PERPLEXITY_API_KEY=""
# Vector Embeddings
EMBEDDING_MODEL="all-MiniLM-L6-v2"🎯 Usage Guide
| Step | Action | Description |
|---|---|---|
| 1️⃣ | Configure LLM | Use the sidebar to set up your local LLM |
| 2️⃣ | Test Connection | Click "Test LLM Connection" to verify setup |
| 3️⃣ | Enter Research Topic | Type your research question in the main input |
| 4️⃣ | Start Research | Click "🚀 Start Research" and watch the progress |
| 5️⃣ | View Results | Explore the comprehensive research summary |
Sample Research Topics
- 🔬 "Latest developments in quantum computing 2024"
- 🌱 "Climate change impact on agriculture"
- 🤖 "Artificial intelligence safety research"
- ⚡ "Renewable energy storage technologies"
- 🧬 "CRISPR gene editing recent advances"
Research History
- Automatic Saving: All research sessions are saved automatically
- Semantic Search: Find similar research using vector embeddings
- Session Management: Load, view, and manage previous research
Configuration Options
- Research Depth: Adjust number of research loops (1-10)
- Search APIs: Choose between different search providers
- LLM Models: Switch between different local models
- Embedding Models: Select sentence transformer models
📊 Architecture
streamlit-deep-researcher/
├── 📱 app.py # Main Streamlit application
├── 📋 requirements.txt # Python dependencies
├── ⚙️ .env # Configuration file
├── 📂 config/
│ ├── __init__.py
│ └── ⚙️ settings.py # Configuration management
├── 📂 research/
│ ├── __init__.py
│ ├── 🔄 graph.py # LangGraph research workflow
│ ├── 📊 state.py # Research state management
│ ├── 🔍 utils.py # Search utilities
│ ├── 💬 prompts.py # LLM prompts
│ └── 🤖 llm_providers.py # Ollama/LMStudio integration
├── 📂 storage/
│ ├── __init__.py
│ └── 🗄️ vector_store.py # Vector embeddings storage
├── 📂 components/
│ ├── __init__.py
│ ├── 📈 progress_display.py # Progress visualization
│ └── 🎛️ sidebar.py # Configuration sidebar
└── 📂 assets/
└── 🗃️ research_history.db # SQLite database (auto-created)
| Component | Purpose | Technology |
|---|---|---|
| Frontend | User interface | Streamlit |
| Research Engine | Core logic | LangGraph |
| LLM Integration | AI processing | Ollama/LMStudio |
| Vector Store | Embeddings | Sentence Transformers |
| Search APIs | Web research | Multiple providers |
🔧 Troubleshooting
🔌 LLM Connection Failed
# Check if Ollama is running
ollama list
# Restart Ollama
ollama serveSolution: Ensure Ollama service is running and accessible on the configured port.
📦 Module Import Errors
# Reinstall dependencies
pip install -r requirements.txt --force-reinstallSolution: Clean reinstall of all Python dependencies.
🐌 Slow Research Performance
Quick Fixes:
- Reduce research depth in sidebar
- Use lighter LLM models
- Disable "Fetch Full Page Content"
💾 Memory Issues
Optimization Steps:
- Use smaller embedding models
- Reduce research loops
- Clear old research sessions
| Optimization | Recommendation | Impact |
|---|---|---|
| Model Size | Use gemma3:2b instead of larger models |
🚀 Faster |
| Embeddings | Use all-MiniLM-L6-v2 |
🚀 Faster |
| Search Settings | Disable full page content | 🚀 Faster |
| Research Depth | Start with 2-3 loops | ⚖️ Balanced |
🚀 Recent Updates
- 🔧 Enhanced research capabilities
- ⚡ Improved performance and reliability
- 🎨 Better user interface design
- 🔍 Advanced search functionality
- Faster LLM response times
- Optimized vector embeddings
- Reduced memory usage
- Better error handling
Happy Researching! 🔬✨
