Four specialized AI agents work in concert — searching, scraping, writing, and critiquing — to deliver polished, in-depth research reports on any topic.
ResearchMind is a premium, state-of-the-art multi-agent research assistant built using Streamlit, LangChain, and Google's Gemini 2.5 Flash. By combining the power of web search tools, scrapers, and structured LLM chains, it automates the laborious research lifecycle, transforming a simple prompt into an academic-grade report with critical evaluation scores.
ResearchMind orchestrates four distinct intelligence units to perform deep investigation:
graph TD
User([User Prompt]) --> SearchAgent[🔎 1. Search Agent<br/>Tavily Search API]
SearchAgent --> ReaderAgent[📄 2. Reader Agent<br/>BeautifulSoup Web Scraper]
ReaderAgent --> WriterChain[✍️ 3. Writer Chain<br/>Gemini 2.5 Flash]
WriterChain --> CriticChain[⚖️ 4. Critic Chain<br/>Gemini 2.5 Evaluation]
CriticChain --> UI[[🧠 ResearchMind UI]]
- 🔎 Search Agent: Generates tailored search queries, scans the web using the Tavily Search API, and retrieves reliable metadata (Titles, Snippets, URLs). It includes automatic query sanitization and fallback fallback-logic.
- 📄 Reader Agent: Selects the most relevant resource and extracts up to 3,000 characters of clean text (excluding headers, footers, and scripts) using BeautifulSoup.
- ✍️ Writer Chain: Consolidates all gathered web snippets and scraped text to draft a comprehensive, structured markdown report (Introduction, Key Findings, Conclusion, Sources).
- ⚖️ Critic Chain: Acts as an objective reviewer, evaluating the report for factual consistency and depth, scoring it out of 10, outlining strengths and areas for improvement, and providing a final verdict.
- 💎 Premium Glassmorphic UI: Beautiful dark theme styled with custom Google Fonts (Space Grotesk, Inter, JetBrains Mono), ambient glowing gradient backdrops, animated noise overlays, and floating background orbs.
- 📡 Real-Time Agent Progress Tracker: Visual progress bar showing which agent is currently active, complete with step logs, status indicators, and execution time tracking.
- 💻 Dual Execution Modes:
- Web App: Complete interactive experience via Streamlit (
app.py). - CLI Pipeline: Rapid command-line research execution (
pipline.py).
- Web App: Complete interactive experience via Streamlit (
- ⚙️ Smart Search Sanitizer: Automatically cleans queries containing unsupported search operators (like
site:) and retries searches automatically to ensure high reliability. - 🔒 Secure Secret Fallbacks: Seamlessly switches between local
.envvariables and production Streamlit Cloud Secrets (st.secrets).
- Front-End: Streamlit with custom CSS styling.
- Orchestration: LangChain &
langchain-corefor agent tools and chain piping. - LLM Service: Google Gemini 2.5 Flash via
langchain-google-genai(optimized for speed and free-tier compatibility). - Search: Tavily Search API for developer-friendly search results.
- Scraping:
BeautifulSoup4+requests+lxml.
├── .streamlit/
│ └── config.toml # Streamlit dark theme & layout configuration
├── agents.py # Agent definitions & LangChain setup
├── app.py # Premium Streamlit web UI & orchestration
├── pipline.py # Command Line Interface (CLI) version
├── tools.py # Custom tools (web_search, scrape_url)
├── requirements.txt # Project dependencies
└── README.md # Project documentation (this file)
- Python 3.9 or higher
- A Google Gemini API Key (Get one from Google AI Studio)
- A Tavily Search API Key (Get one from Tavily)
-
Clone the Repository:
git clone https://github.com/prathamesh-6099/Multi-Agent-AI-Research-System.git cd Multi-Agent-AI-Research-System -
Create and Activate Virtual Environment:
- Windows:
python -m venv .venv .venv\Scripts\activate
- macOS / Linux:
python3 -m venv .venv source .venv/bin/activate
- Windows:
-
Install Dependencies:
pip install -r requirements.txt
-
Set Up Environment Secrets: Create a file named
.envin the root of the project and add your API keys:GEMINI_API_KEY=your_gemini_api_key_here TAVILY_API_KEY=your_tavily_api_key_here
Run the Streamlit application to experience the high-end dashboard:
streamlit run app.pyThis will spin up a local server, usually opening automatically at http://localhost:8501.
For a text-based, lightning-fast execution:
python pipline.pyYou will be prompted to enter a topic, and the research stages will print directly in your terminal.
To host this application for free on Streamlit Community Cloud:
- Push the project to your GitHub repository.
- Log in to Streamlit Share and click New app.
- Select your repository, branch (
main), and main file path (app.py). - Expand the Advanced settings section.
- In the Secrets text area, paste your production API keys in TOML format:
GEMINI_API_KEY = "your-actual-gemini-api-key" TAVILY_API_KEY = "your-actual-tavily-api-key"
- Click Deploy! The app will be built and launched online.
This project is licensed under the MIT License - see the LICENSE file for details.