Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔬 Autonomous Research Agent

AI agent that researches any topic — PubMed + Semantic Scholar for academic papers, DuckDuckGo for web. Multi-round autonomous research with structured Markdown reports.

Built with Python + GLM-5.2 LLM. Part of my AI Agent Career Portfolio.


🎯 Features

  • 🔬 Scholarly + Web Research — Auto-detects academic topics → uses PubMed & Semantic Scholar. General topics → DuckDuckGo web search.
  • 🔄 Multi-round agent loop — Generates diverse queries → searches → extracts → synthesizes → refines based on gaps
  • 📊 Structured reports — Executive Summary, Key Findings, Detailed Analysis, Controversies, Practical Implications, Sources
  • 🎨 Beautiful CLI — Rich formatting with live progress panels
  • ⚙️ Configurable — Rounds, max results, temperature, sources

🏗️ Architecture

Topic → [LLM: Generate queries] → [Is it academic?]
                                        ├─ Yes → PubMed + Semantic Scholar
                                        └─ No  → DuckDuckGo web search
                                              ↓
                                    [Extract abstracts/content]
                                              ↓
                                    [LLM: Synthesize round]
                                              ↓
                                    [Refine queries from gaps]
                                              ↓
                                    [Generate structured report]

🚀 Quick Start

git clone https://github.com/Meshkat22/research-agent.git
cd research-agent
pip install -r requirements.txt

# Academic research (auto-uses PubMed + Semantic Scholar)
python main.py -t "BCI motor imagery CNN Transformer hybrid architectures" -r 1

# General research (auto-uses DuckDuckGo)
python main.py -t "AI agent job market trends 2026" -r 2 -o report.md

# Verbose debug mode
python main.py -t "Quantum computing 2026" --verbose

🛠️ Tech Stack

Layer Technology
LLM GLM-5.2 (OpenAI-compatible)
Academic Search PubMed Entrez API + Semantic Scholar
Web Search DuckDuckGo
Content Extraction trafilatura + BeautifulSoup fallback
CLI rich
Language Python 3.9+

📁 Project Structure

research_agent/
├── main.py              # CLI entry point
├── agent.py             # ResearchAgent class (orchestration)
├── scholarly_tools.py   # PubMed + Semantic Scholar integration
├── tools.py             # DuckDuckGo web search + scraping
├── config.py            # LLM, agent, PubMed configuration
├── requirements.txt     # Dependencies
└── README.md

🎯 Impact

This project demonstrates:

  1. Agent Loop Design — Multi-step autonomous research cycle
  2. Tool Selection — Auto-detects academic vs web-appropriate sources
  3. API Integration — PubMed, Semantic Scholar, DuckDuckGo, OpenAI-compatible
  4. Prompt Engineering — Query generation, synthesis, structured reporting
  5. Error Resilience — Graceful degradation when APIs fail (LLM knowledge fallback)
  6. Clean Architecture — Separated concerns, configurable, testable

🔜 Roadmap

  • Streamlit web UI
  • SerpAPI fallback for web search
  • Europe PMC / OpenAlex integration
  • PDF report output
  • LangFuse observability
  • Source claim verification

Built by Meshkat Ahmad — AI Agent Career Portfolio Project 1/7

About

AI agent that researches any topic — PubMed + Semantic Scholar for academic papers, DuckDuckGo for web. Multi-round autonomous research with structured Markdown reports.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages