Metadata-Version: 2.4
Name: ai-research-agent
Version: 1.1.0
Summary: Automate & accelerate AI research with Python! Focus on experiments, not setup, with smart topic planning, multi-source retrieval, and automated report generation.
Author-email: Mahdi Haqiqat <mahdihaqiqat55@gmail.com>
Maintainer-email: Mahdi Haqiqat <mahdihaqiqat@outlook.com>
License: MIT
Project-URL: Homepage, https://pypi.org/project/ai-research-agent/
Project-URL: Repository, https://github.com/Mahdi-Haqiqat/AI-Research-Agent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: ollama
Requires-Dist: python-dotenv
Requires-Dist: ddgs
Requires-Dist: httpx
Requires-Dist: questionary
Requires-Dist: python-docx
Requires-Dist: reportlab
Requires-Dist: arabic-reshaper
Requires-Dist: python-bidi
Requires-Dist: argparse
Requires-Dist: pathlib
Dynamic: license-file

# 🧠 AI Research CLI Agent

A powerful command-line research assistant built with Ollama Cloud API.  
It searches the web, summarizes results using AI, translates the content, and exports it into multiple file formats.

---

## 🚀 Features

- 🔍 Web search via DuckDuckGo (DDGS)
- 🧩 AI-powered summarization using Ollama Cloud models
- 🌐 Multi-language translation
- 📄 Export to: TXT, MD, DOCX, PDF (RTL supported)
- 🔐 Secure API key validation
- 🗂 Automatic logging system
- 🎯 Interactive CLI menus

---

## 🛠 Tech Stack

Python 3.10+  
ollama  
ddgs  
questionary  
python-dotenv  
httpx  
python-docx  
reportlab  
arabic-reshaper  
python-bidi  

---

## 📦 Installation

Clone the repository:

git clone https://github.com/Mahdi-Haqiqat/AI-Research-Agent.git  
cd AI-Research-Agent

Install dependencies:

pip install -r requirements.txt  

Or install manually:

pip install ollama ddgs questionary python-dotenv httpx python-docx reportlab arabic-reshaper python-bidi  

Note: If you want to install on mobile read [Mobile Installation](https://docs.google.com/document/d/1bDfO-2dRdam6HHqPnYnGtFQyHfOT8r6YC0CY-pFJDJc/edit?usp=sharing)

---

## 🔑 API Key

Get your API key from:
[Ollama](https://ollama.com/)

---

## ▶️ Usage

Run the program:

python agent.py  

Then:

1. Enter an API
2. Enter a topic to research  
3. Choose target language  
4. Choose output format  

The tool will:

- Search the web  
- Summarize the results  
- Translate (if needed)  
- Generate the output file  
- Log execution details  

---

## 📝 Logging System

All executions are logged inside the `/logs/` directory.

Each topic generates its own log file containing:

- Date & Time  
- Topic  
- Language  
- Output format  
- Execution status  
- Error details (with full traceback if failure occurs)  

---

## 🌍 Supported Languages

English  
Persian  
French  
German  
Arabic  
Spanish  
Italian  
Turkish  

PDF output supports RTL languages (Persian, Arabic, Turkish).

---

## ⚠️ Important Notes

- PDF generation requires [`DejaVuSans.ttf`](https://github.com/Mahdi-Haqiqat/AI-Research-Agent/blob/main/DejaVuSans.ttf) in the project root directory.
- Internet connection is required.
- Ollama Cloud models must be accessible in your account.
- Ensure model names in `.env` are correct.

---

## 🧠 Project Architecture

search_agent() → Web search  
summarize_agent() → AI summarization  
translator_agent() → AI translation  
writer_agent() → File export  
log_agent() → Execution logging  

---

## 📄 License

This project is licensed under the MIT License. See the [LICENSE](https://github.com/Mahdi-Haqiqat/AI-Research-Agent/tree/main?tab=MIT-1-ov-file) file for details.
