Skip to content

Latest commit

Β 

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ResearchAI

An AI-powered research agent that autonomously researches topics, gathers relevant information from multiple sources, synthesizes findings using AI, and produces structured reports.

ResearchAI TypeScript React Node.js

🌟 Features

  • Multi-Source Research: Searches web, Wikipedia, and news sources simultaneously
  • AI-Powered Synthesis: Uses OpenRouter (Claude, GPT-4, Llama) for intelligent analysis
  • Structured Reports: Generates executive summaries, key findings, and detailed sections
  • Real-Time Progress: Live progress tracking during research
  • Source Citations: All claims backed by clickable source links
  • Export Functionality: Download reports as Markdown

πŸ“‹ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                             RESEARCHAI                               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚   FRONTEND   │◄──►│   BACKEND    │◄──►│   AI MODEL LAYER    β”‚   β”‚
β”‚  β”‚   (React)    β”‚    β”‚   (Node.js)  β”‚    β”‚   (OpenRouter)       β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚         β”‚                   β”‚                        β”‚               β”‚
β”‚         β”‚                   β–Ό                        β”‚               β”‚
β”‚         β”‚          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                  β”‚               β”‚
β”‚         β”‚          β”‚ DATA LAYER   β”‚                  β”‚               β”‚
β”‚         β”‚          β”‚ - Source     β”‚                  β”‚               β”‚
β”‚         β”‚          β”‚   Aggregator β”‚                  β”‚               β”‚
β”‚         β”‚          β”‚ - Cache      β”‚β—„β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β”‚
β”‚         β”‚          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                                  β”‚
β”‚         β”‚                   β”‚                                       β”‚
β”‚         β”‚                   β–Ό                                       β”‚
β”‚         β”‚          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                                 β”‚
β”‚         β”‚          β”‚ EXTERNAL      β”‚                                 β”‚
β”‚         β”‚          β”‚ APIs          β”‚                                 β”‚
β”‚         β”‚          β”‚ - DuckDuckGo  β”‚                                 β”‚
β”‚         β”‚          β”‚ - Wikipedia   β”‚                                 β”‚
β”‚         β”‚          β”‚ - News APIs   β”‚                                 β”‚
β”‚         β”‚          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Quick Start

Prerequisites

Installation

  1. Clone the repository
git clone <repository-url>
cd intelligent-research-assistant
  1. Install dependencies
npm install
  1. Configure environment
cp .env.example .env
# Edit .env and add your OpenRouter API key
  1. Start development servers
npm run dev
  1. Open your browser Navigate to http://localhost:5173

πŸ”§ Configuration

Environment Variables

Variable Description Default
OPENROUTER_API_KEY Your OpenRouter API key Required
AI_MODEL AI model to use anthropic/claude-sonnet-4
PORT Backend server port 3000
NODE_ENV Environment mode development

Supported AI Models

  • anthropic/claude-sonnet-4 (Recommended)
  • anthropic/claude-3.5-sonnet
  • openai/gpt-4o
  • openai/gpt-4o-mini
  • meta-llama/llama-3.1-70b-instruct

πŸ“ Project Structure

intelligent-research-assistant/
β”œβ”€β”€ client/                          # Frontend (React + TypeScript)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ QueryInput.tsx       # Research query form
β”‚   β”‚   β”‚   β”œβ”€β”€ ProgressIndicator.tsx # Real-time progress
β”‚   β”‚   β”‚   └── ReportView.tsx       # Generated report display
β”‚   β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”‚   └── client.ts            # Backend API client
β”‚   β”‚   β”œβ”€β”€ App.tsx                  # Main application
β”‚   β”‚   └── main.tsx                 # Entry point
β”‚   └── package.json
β”œβ”€β”€ server/                          # Backend (Node.js + Express)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”‚   └── research.ts          # Research API endpoints
β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”‚   β”œβ”€β”€ searchService.ts      # Multi-source search
β”‚   β”‚   β”‚   β”œβ”€β”€ contentService.ts     # Content extraction
β”‚   β”‚   β”‚   β”œβ”€β”€ aiService.ts          # OpenRouter integration
β”‚   β”‚   β”‚   └── reportService.ts      # Report generation
β”‚   β”‚   └── index.ts                  # Server entry point
β”‚   └── package.json
β”œβ”€β”€ shared/                           # Shared types
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   └── index.ts                  # Shared type definitions
β”‚   └── package.json
β”œβ”€β”€ package.json                      # Root package.json
β”œβ”€β”€ .env.example                      # Environment variables template
└── README.md                         # This file

πŸ”Œ API Endpoints

POST /api/research

Start a new research query.

Request Body:

{
  "query": "What are the latest developments in quantum computing?",
  "sources": ["web", "wikipedia"],
  "maxResults": 10
}

Response:

{
  "researchId": "uuid-here"
}

GET /api/research/:id/progress

Get current research progress.

Response:

{
  "stage": "synthesizing",
  "message": "Synthesizing findings with AI...",
  "progress": 60,
  "sources": [...]
}

GET /api/research/:id/report

Get the completed research report.

πŸ§ͺ Development

Run in development mode

npm run dev

Build for production

npm run build

Run type checking

npm run typecheck

πŸ› οΈ Technical Stack

Layer Technology Purpose
Frontend React 18 + TypeScript + TailwindCSS Modern UI
Backend Node.js + Express API server
AI OpenRouter API Claude/GPT-4/Llama
Search DuckDuckGo + Wikipedia API Information retrieval
Build Vite Fast development

πŸ“ Key Features Explained

Multi-Source Research

The system searches multiple sources in parallel:

  • Web Search: DuckDuckGo for general web results
  • Wikipedia: Encyclopedia content for factual information
  • News: Current events and recent developments

AI-Powered Synthesis

Using OpenRouter, the system:

  1. Analyzes query intent
  2. Summarizes content from each source
  3. Identifies key themes and findings
  4. Generates coherent narrative with citations

Structured Output

Reports include:

  • Executive summary
  • Key findings with evidence
  • Detailed analysis sections
  • Source citations with links

πŸ“„ License

MIT License - feel free to use for your own projects!

πŸ™ Acknowledgments

  • OpenRouter for unified AI model access
  • DuckDuckGo for privacy-friendly search
  • Wikipedia for open knowledge

Built for the Inteledge Advisory & Labs Internship Evaluation

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages