Skip to main content

🧠 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


🔑 API Key

Get your API key from: Ollama


▶️ 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 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 file for details.

Release files for ai-research-agent 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ai-research-agent 1.1.0
File Size Uploaded
ai_research_agent-1.1.0.tar.gz 394.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ai-research-agent 1.1.0
File Interpreter ABI Platform
ai_research_agent-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 797.6 kB

Release files / ai_research_agent-1.1.0.tar.gz

Download URL ai_research_agent-1.1.0.tar.gz
Size 394.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ebd837eda89fe4f9e5d21402fcbb8c1ac3a1ead7a92f2f7b23c98d05a5787c0a
BLAKE2b-256 checksum
How to use checksums
6e2c3a25de8e6e8d73fc2a8ae6bac09583fb315848b35c2e736e70c649944d84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / ai_research_agent-1.1.0-py3-none-any.whl

Download URL ai_research_agent-1.1.0-py3-none-any.whl
Size 403.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ce670efe29d186a05b24ab6b66b6fb6bf1a7b33a3d29bef6452f0cee4a037987
BLAKE2b-256 checksum
How to use checksums
5d0748b3b06ae1e78861db28f30ebbfb57663cc4cf7ed08a25387971e3d460c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page