File size: 2,473 Bytes
8646e47
61f47ab
 
 
8ef29eb
8646e47
 
 
 
 
61f47ab
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
title: Deep Research Agent
emoji: 🧬
colorFrom: red
colorTo: yellow
sdk: gradio
app_file: app.py
pinned: false
---

# Deep Research Agents πŸ”

An agentic research pipeline that helps you clarify topics, plan research, and automatically gather information from the web to generate comprehensive Markdown reports.

## πŸš€ Features

- **Topic Clarification**: Iteratively refines broad research questions into specific, actionable topics.
- **Strategic Planning**: Generates structured research plans to cover all necessary aspects of a topic.
- **Agentic Coordination**: Uses `smolagents` and **Tavily Search** to orchestrate specialized agents that browse the web and synthesize findings.
- **Robust Model Support**: Specifically optimized for "Reasoning" models (like DeepSeek-R1) and stable tool-calling models (like Qwen-2.5-Coder and MiniMax).
- **Corporate Network Ready**: Includes automated SSL certificate handling via `truststore` to bypass common proxy errors.

## πŸ› οΈ Project Structure

```text
researcher-agents/
β”œβ”€β”€ main.py              # CLI Entry point
β”œβ”€β”€ app.py               # Streamlit UI
β”œβ”€β”€ requirements.txt     # Dependencies
└── src/                 # Core Agents
    β”œβ”€β”€ clarifier.py     # Topic refinement
    β”œβ”€β”€ planner.py       # Strategic planning
    β”œβ”€β”€ splitter.py      # Task decomposition
    β”œβ”€β”€ coordinator.py   # Agent orchestration
    └── prompts.py       # LLM Instructions
```

## βš™οΈ Setup

1. **Clone the repository**:
   ```bash
   git clone https://github.com/vizcayal/researcher_agents.git
   cd researcher_agents
   ```

2. **Create a virtual environment**:
   ```bash
   python -m venv .venv
   .\.venv\Scripts\activate
   ```

3. **Install dependencies**:
   ```bash
   pip install -r requirements.txt
   ```

4. **Environment Variables**:
   Create a `.env` file in the root directory:
   ```env
   HF_KEY=your_huggingface_token
   FIRECRAWL_KEY=your_firecrawl_api_key
   ```

## πŸ“– Usage

### Command Line Interface
Run the full automated research pipeline:
```bash
python main.py
```

### Gradio Web App
Run the interactive UI:
```bash
python app.py
```

## πŸ€– Recommended Models
The project is configured to work with the Hugging Face Serverless Inference API:
- **Reasoning**: `deepseek-ai/DeepSeek-R1-Distill-Llama-8B`
- **Orchestration**: `Qwen/Qwen2.5-Coder-32B-Instruct`
- **Output**: `meta-llama/Llama-3.3-70B-Instruct`

## πŸ“„ License
MIT