Skip to content

stkwer/OpenDeepResearcher-Agentic-LLM-Research-Framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

OpenDeepResearcher – AI Autonomous Research Assistant

An AI-powered autonomous research platform that automatically plans, searches, analyzes, and generates comprehensive academic research papers using a local LLM, eliminating cloud AI API costs.

Python React FastAPI LangGraph LM Studio


Overview

OpenDeepResearcher is a full-stack AI research assistant that mimics the workflow of a human researcher. Given any research topic, it automatically breaks the problem into sub-questions, searches the web, synthesizes information, evaluates research completeness, and produces a professional academic research paper.

The application is powered by a local Large Language Model (LLM) running through LM Studio, allowing users to perform advanced AI-powered research without paying for cloud AI APIs. The backend is built with FastAPI and LangGraph, while the frontend is developed using React and Vite, providing a fast and interactive user experience.


Features

  • πŸ€– Autonomous Multi-Agent Research Pipeline
  • 🧠 Local LLM Integration using LM Studio
  • 🌐 Real-time DuckDuckGo Web Search
  • πŸ”„ LangGraph-based Agent Workflow
  • πŸ“‘ Live Progress Updates using Server-Sent Events (SSE)
  • πŸ“„ Automatic Academic Research Report Generation
  • πŸ“‘ Export Reports as PDF
  • πŸ“Š Export Reports as PowerPoint (PPTX)
  • πŸ’¬ Follow-up Question Answering
  • 🎀 Voice Input Support
  • πŸ“š Retrieval-Augmented Generation (RAG)
  • πŸ“ Document Upload and Search
  • πŸŒ™ Dark & Light Theme
  • πŸ•’ Session History
  • πŸ“± Responsive Modern Interface

Architecture

                 User
                  β”‚
                  β–Ό
          React Frontend
             (Vite + React)
                  β”‚
          HTTP / SSE Requests
                  β”‚
                  β–Ό
          FastAPI Backend
             (server.py)
                  β”‚
                  β–Ό
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚     LangGraph Workflow    β”‚
    β”‚                           β”‚
    β”‚   Planner                 β”‚
    β”‚      β”‚                    β”‚
    β”‚      β–Ό                    β”‚
    β”‚   Searcher                β”‚
    β”‚      β”‚                    β”‚
    β”‚      β–Ό                    β”‚
    β”‚    Writer                 β”‚
    β”‚      β”‚                    β”‚
    β”‚      β–Ό                    β”‚
    β”‚  Reflection ─────────┐    β”‚
    β”‚      β”‚               β”‚    β”‚
    β”‚      └── Continue? β”€β”€β”˜    β”‚
    β”‚             β”‚             β”‚
    β”‚             β–Ό             β”‚
    β”‚         Reporter          β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                  β”‚
      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
      β”‚           β”‚             β”‚
      β–Ό           β–Ό             β–Ό
 PDF Export   PPT Export   Follow-up Q&A
                  β”‚
                  β–Ό
          Final Research Report


  External Services Used
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚ LM Studio (Local LLM)      β”‚
  β”‚ DuckDuckGo Search (DDGS)   β”‚
  β”‚ RAG Document Store         β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Tech Stack

Frontend

  • React 18
  • Vite
  • React Markdown
  • CSS Modules

Backend

  • Python 3.12
  • FastAPI
  • Uvicorn
  • LangGraph
  • LangChain
  • LangChain OpenAI

AI

  • LM Studio
  • Qwen2.5-3B-Instruct
  • OpenAI Compatible API

Search

  • DuckDuckGo Search (DDGS)

Export

  • ReportLab
  • python-pptx

Other Libraries

  • PyPDF2
  • python-dotenv

Multi-Agent Workflow

πŸ“ Planner

Breaks the research topic into focused sub-questions to create a structured research plan.

πŸ” Searcher

Retrieves real-time information using DuckDuckGo and searches uploaded RAG documents when available.

✍️ Writer

Summarizes search results into coherent research notes while continuously improving the report.

πŸ€” Reflection

Evaluates whether sufficient information has been collected or another research iteration is required.

πŸ“„ Reporter

Generates a polished academic research paper containing:

  • Title
  • Abstract
  • Introduction
  • Key Findings
  • Applications
  • Challenges
  • Future Outlook
  • Conclusion
  • References

Project Structure

OpenDeepResearcher/
β”‚
β”œβ”€β”€ agents/
β”‚   β”œβ”€β”€ planner.py
β”‚   β”œβ”€β”€ searcher.py
β”‚   β”œβ”€β”€ writer.py
β”‚   β”œβ”€β”€ reflection.py
β”‚   └── reporter.py
β”‚
β”œβ”€β”€ frontend/
β”‚
β”œβ”€β”€ utils/
β”‚   β”œβ”€β”€ llm_client.py
β”‚   β”œβ”€β”€ pdf_export.py
β”‚   β”œβ”€β”€ pptx_export.py
β”‚   β”œβ”€β”€ rag.py
β”‚   └── state.py
β”‚
β”œβ”€β”€ data/
β”‚
β”œβ”€β”€ graph.py
β”œβ”€β”€ server.py
β”œβ”€β”€ config.py
β”œβ”€β”€ requirements.txt
└── .env

API Endpoints

Endpoint Method Description
/research POST Generate complete research report
/research/stream POST Stream research progress
/followup POST Ask questions about the generated report
/export/pdf POST Download report as PDF
/export/pptx POST Download report as PowerPoint
/rag/upload POST Upload documents for RAG
/rag/search POST Search uploaded documents
/health GET Server health check

Installation

Clone Repository

git clone https://github.com/yourusername/OpenDeepResearcher.git
cd OpenDeepResearcher

Install Backend

pip install -r requirements.txt

Install Frontend

cd frontend
npm install

Environment Variables

Create a .env file:

LLM_BASE_URL=http://localhost:1234/v1
LLM_API_KEY=lm-studio
LLM_MODEL_NAME=qwen2.5-3b-instruct

MAX_SEARCH_RESULTS=5
MAX_RESEARCH_LOOPS=2

APP_HOST=0.0.0.0
APP_PORT=8000

Running the Application

Step 1: Start LM Studio

  • Load your preferred LLM
  • Start the Local Server

Step 2: Start Backend

python server.py

Step 3: Start Frontend

cd frontend
npm run dev

Open your browser:

http://localhost:5173


---

# Future Improvements

- Multiple LLM Support
- Google Scholar Integration
- Citation Quality Evaluation
- Research Mind Maps
- Docker Deployment
- Cloud Deployment
- Collaborative Research Sessions
- Advanced Semantic Search

---

# Why OpenDeepResearcher?

- Runs entirely on a local LLM
- No AI API costs
- Autonomous multi-agent workflow
- Real-time research progress
- Retrieval-Augmented Generation (RAG)
- Modern responsive UI
- Professional PDF and PPT exports
- Interactive follow-up Q&A

---

# Author

Shreeya Bhalwatkar
⭐ If you found this project useful, consider giving it a Star!

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages