A multi-agent research assistant that creates teams of AI analysts to conduct comprehensive research and generate frank, evidence-based, detailed reports
π Quick Start β’ πΉοΈ Live: Research Agent β’ π§ Installation
- π― Multi-Analyst Research: Creates specialized AI analyst teams for comprehensive topic coverage
- π€ Human-in-the-Loop: Review and approve analyst teams before research begins
- π Comprehensive Reports: Generates detailed research reports with introduction, analysis, conclusion, and sources
- π Multiple Interfaces: Web UI, Telegram Bot, and API access
- π± Modern UI: Clean, responsive React-based web interface with PDF export
- β‘ Real-time Progress: Live updates during research process
- π Multi-Source Research: Leverages Tavily Search, Wikipedia, and AI reasoning
graph TB
A[User Input] --> B{Interface}
B -->|Web| C[React Frontend]
B -->|Chat| D[Telegram Bot]
B -->|API| E[Flask API]
C --> F[Flask API Server]
D --> G[Research Assistant Core]
E --> G
F --> G
G --> H[LangGraph Orchestrator]
H --> I[AI Analyst Creation]
I --> J[Human Approval]
J --> K[Parallel Research]
K --> L[Report Generation]
K --> M[Tavily Search]
K --> N[Wikipedia]
K --> O[Google Gemini AI]
L --> P[Final Report]
- π§ Research Assistant Core (
src/): LangGraph-based orchestration engine - π Web Frontend (
frontend/): Modern React application with Flask API - π¬ Telegram Bot (
src/telegram_bot.py): Conversational research interface - π API Interface (
api/): RESTful API for programmatic access
- Python 3.8+ - Download here
- Node.js 14+ - Download here
- API Keys:
- Google AI API key (for Gemini)
- Tavily API key (for web search)
- Telegram Bot Token (optional, for bot interface)
-
Clone and setup:
git clone https://github.com/vijay-varadarajan/ResearchAgent-v0.git cd ResearchAgent-v0/frontend -
Automated setup:
# Windows setup.bat # Linux/Mac chmod +x setup.sh && ./setup.sh
-
Configure environment: Create
.envfile insrc/directory:GOOGLE_API_KEY=your_google_api_key TAVILY_API_KEY=your_tavily_api_key LANGSMITH_API_KEY=your_langsmith_api_key # optional
-
Start the application:
# Terminal 1: Backend API python api_server.py # Terminal 2: Frontend npm start
-
Access the application:
- Frontend: http://localhost:3000
- API Health: http://localhost:5000/api/health
-
Setup bot token: Add to your
.envfile:TELEGRAM_BOT_TOKEN=your_telegram_bot_token
-
Run the bot:
cd src python run_bot.py -
Start chatting: Find your bot on Telegram and send
/start
The web interface provides a modern, chatbot-style experience:
- Enter Research Topic: Type your research question or topic
- Review AI Analysts: Approve or modify the generated analyst team
- Watch Progress: Real-time updates during research
- Download Report: Export as PDF when complete
Key Features:
- π― Intuitive chat interface
- π₯ Analyst team customization
- π Real-time progress tracking
- π± Responsive design (mobile-friendly)
- π PDF export functionality
/start- Welcome message and instructions/new- Start a new research project/help- Get help and documentation- Send any message - Start research on that topic
-
Clone repository:
git clone https://github.com/vijay-varadarajan/ResearchAgent-v0.git cd ResearchAgent-v0 -
Install backend dependencies:
pip install -r requirements.txt
-
Install frontend dependencies:
cd frontend npm install -
Configure environment variables: Create
.envfile insrc/directory with your API keys -
Test installation:
# Test API cd frontend python test_api.py # Test core functionality cd ../src python test_graph.py
The application is configured for deployment on:
- Vercel (Frontend)
- Render/Railway (Backend API)
See deployment-specific configuration in:
frontend/package.json- Frontend build configurationrequirements.txt- Production dependenciesstart.sh- Deployment startup script
ResearchAgent-v0/
βββ π src/ # Core research engine
β βββ π§ research_assistant.py # Main LangGraph orchestrator
β βββ π schema.py # Data models and types
β βββ π¬ telegram_bot.py # Telegram interface
β βββ π run_bot.py # Bot runner script
β βββ π§ͺ test_*.py # Test utilities
βββ π frontend/ # Web application
β βββ π src/ # React components
β β βββ βοΈ App.js # Main application
β β βββ π¨ index.css # Styles
β β βββ βοΈ config.js # Configuration
β βββ π api_server.py # Flask API server
β βββ π README.md # Frontend documentation
β βββ π¦ package.json # Dependencies
β βββ π οΈ setup.sh/.bat # Setup scripts
βββ π api/ # API deployment
β βββ π index.py # API endpoint
βββ π requirements.txt # Python dependencies
βββ π start.sh # Startup script
βββ π README.md # This file
Create a .env file in the src/ directory:
# Required - Google AI (Gemini)
GOOGLE_API_KEY=your_google_ai_api_key
# Required - Web Search
TAVILY_API_KEY=your_tavily_api_key
# Optional - Telegram Bot
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
# Optional - LangSmith Tracing
LANGSMITH_API_KEY=your_langsmith_api_key
LANGCHAIN_TRACING_V2=true
LANGCHAIN_PROJECT=your-langchain-project-name
# Optional - Production Settings
FLASK_ENV=production
PORT=5000-
Google Gemini API:
- Go to Google AI Studio
- Sign in and navigate to the Gemini API section
- Create and copy your Gemini API key
- Ensure the Gemini API is enabled for your project
-
Tavily API:
- Sign up at Tavily
- Get your API key from the dashboard
-
Telegram Bot (optional):
- Message @BotFather on Telegram
- Create a new bot and get the token
Academic Research:
"Latest developments in quantum computing and their applications"
Business Analysis:
"Market trends in renewable energy sector 2024"
Technology Review:
"Comparison of large language models: GPT-4 vs Claude vs Gemini"
Health & Medicine:
"Recent advances in CRISPR gene editing technology"
When the system creates analyst teams, you can:
- β Approve the suggested team
- βοΈ Modify with feedback like:
- "Add a financial analyst perspective"
- "Focus more on technical implementation"
- "Include regulatory and ethical considerations"
- "Remove the [specific role] and add [new role]"
# Test API functionality
cd frontend
python test_api.py
# Test core research functionality
cd ../src
python test_graph.py
# Test report splitting (for Telegram)
python test_splitting.py# Check API health
curl http://localhost:5000/api/health
# Check active sessions
curl http://localhost:5000/api/sessionsWe welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes and test thoroughly
- Commit changes:
git commit -m "Add feature" - Push to branch:
git push origin feature-name - Submit a pull request
- π§ͺ Add tests for new features
- π Update documentation
- π¨ Follow existing code style
- β Ensure all tests pass
- π± Test on multiple interfaces (Web, Telegram, API)
"Module not found" errors:
# Ensure all dependencies are installed
pip install -r requirements.txt
cd frontend && npm installAPI connection issues:
# Check if API server is running
curl http://localhost:5000/api/health
# Verify environment variables
echo $GOOGLE_API_KEYTelegram bot not responding:
# Check bot token in .env file
# Ensure bot is running: python run_bot.py
# Verify webhook settings if using webhooksFrontend build issues:
# Clear cache and reinstall
cd frontend
rm -rf node_modules package-lock.json
npm install
npm start- π§ Issues: Open an issue on GitHub
- π¬ Discussions: Use GitHub Discussions
- π Documentation: Check the frontend README for detailed setup
- LangChain & LangGraph - AI orchestration framework
- Google AI - Gemini language model
- Tavily - Web search API
- React - Frontend framework
- Flask - Backend API framework
β If you find this project useful, please give it a star! β
Report Bug β’ Request Feature β’ Documentation