ResearchMind is an advanced, automated research assistant powered by a multi-agent AI architecture. It takes a research topic from the user and systematically gathers, analyzes, and synthesizes information from the web to produce a comprehensive, structured research report.
Conducting deep research manually involves endless searching, reading through fragmented sources, and synthesizing facts into a cohesive reportโa highly time-consuming process. ResearchMind automates this pipeline entirely.
By dividing the task among specialized agents (Search, Read, Write, and Critic), the system ensures higher accuracy, reduces hallucination, and delivers deeper insights. Each agent handles a single responsibility, passing structured data to the next agent in the pipeline.
- ๐ค Multi-Agent Workflow: Specialized agents working collaboratively to search, scrape, write, and review.
- ๐ Web Search: Integration with Tavily Search to find the most recent and reliable information.
- ๐ท๏ธ Web Scraping: Deep content extraction from top resources using BeautifulSoup.
- ๐ AI Report Generation: High-quality, structured markdown reports generated by Mistral AI.
- ๐ง Research Critique: An independent critic agent reviews the drafted report and provides actionable feedback and scoring.
- ๐ฅ๏ธ Streamlit UI: A beautiful, responsive, and interactive frontend for tracking the pipeline's progress in real time.
- ๐พ Markdown Report Download: One-click download of the final research report.
graph TD
User([User Input: Topic]) --> UI[Streamlit UI]
UI --> Search[Search Agent]
subgraph Multi-Agent Pipeline
Search -- Tavily API --> WebSearch[(Web Search)]
WebSearch --> Search
Search -- Search Results --> Reader[Reader Agent]
Reader -- URL --> Scraper[(Web Scraper - BeautifulSoup)]
Scraper --> Reader
Reader -- Scraped Content --> Writer[Writer Chain]
Writer -- Draft Report --> Critic[Critic Chain]
end
Writer -.-> FinalReport[(Final Report .md)]
Critic -.-> Feedback[(Critic Feedback)]
FinalReport --> UI
Feedback --> UI
The pipeline executes through a carefully orchestrated sequence of steps:
- User Input: The user enters a research topic in the Streamlit web interface (or CLI).
- Search Agent: Queries the Tavily API to gather a curated list of recent, relevant URLs and snippets based on the topic.
- Reader Agent: Analyzes the search results, identifies the single most relevant URL, and deeply scrapes its text content.
- Writer Chain: Synthesizes the initial search snippets and the deeply scraped content to draft a highly detailed, professional research report.
- Critic Chain: Reviews the generated report, scores it out of 10, highlights strengths, and suggests areas for improvement.
- Delivery: The final report and the critic's review are displayed in the UI, and the user can download the report as a Markdown file.
.
โโโ app.py # Streamlit web application and UI layout
โโโ pipeline.py # CLI entry point to run the research pipeline
โโโ agents.py # AI agent definitions (Search, Reader, Writer, Critic)
โโโ tools.py # Custom LangChain tools (Tavily search, Web scraper)
โโโ requirements.txt # Project dependencies
โโโ LICENSE # MIT License
โโโ README.md # Project documentation
app.py: Contains the entire Streamlit frontend, managing the visual pipeline progress and rendering the final output.pipeline.py: A pure-Python implementation of the pipeline for running the system via the command line.agents.py: Configures thelangchain-mistralaimodel and defines the prompts and chains for each specialized agent.tools.py: Implements theweb_searchtool (Tavily API) andscrape_urltool (Requests + BeautifulSoup).
| Component | Technology / Library | Description |
|---|---|---|
| Language | Python | Core programming language |
| Frontend | Streamlit | Web framework for the interactive UI |
| Orchestration | LangChain | Framework for developing LLM applications |
| LLM Provider | Mistral AI | mistral-small-2506 model for reasoning and generation |
| Search Engine | Tavily Search | Search API optimized for AI agents |
| Web Scraping | BeautifulSoup & Requests | HTML parsing and HTTP requests for deep content extraction |
Follow these steps to set up the project locally.
git clone https://github.com/sumitjadhav1703/Multi_agent_research_system.git
cd Multi_agent_research_systempython3 -m venv venv
source venv/bin/activatepip install -r requirements.txtCreate a .env file in the root directory:
touch .envAdd your API keys to the .env file (see the Environment Variables section below).
The system requires specific API keys to function. Add the following to your .env file:
# Required for the LLM reasoning, writing, and critiquing (Agents & Chains)
MISTRAL_API_KEY=your_mistral_api_key_here
# Required for the Search Agent to query the web
TAVILY_API_KEY=your_tavily_api_key_hereNote: You can get a Mistral API key from console.mistral.ai and a Tavily API key from tavily.com.
You can run ResearchMind either via the interactive Web UI or through the Command Line.
Launch the Streamlit application:
streamlit run app.py- Open the provided Local URL in your browser (usually
http://localhost:8501). - Enter your research topic in the input field.
- Click "โก Run Research Pipeline".
- Watch the agents progress through the steps in real-time.
- Read the final report and critic feedback directly in the app.
- Click "โฌ Download Report (.md)" to save the results.
If you prefer a terminal interface, run the pipeline script directly:
python pipeline.pyWhen prompted, enter your research topic, and the agents will output their progress and final results directly to your terminal.
Initial view of the ResearchMind application.
Research pipeline in progress.
The generated report and critic feedback.
Based on the current architecture, potential enhancements include:
- Parallel Web Scraping: Upgrading the Reader Agent to scrape multiple URLs concurrently instead of just the top result.
- Persistent Storage: Adding a database (e.g., SQLite or Postgres) to save past research reports and user query history.
- PDF Export: Implementing a feature to download reports in PDF format in addition to Markdown.
- Agent Memory: Incorporating memory into the agents to allow users to ask follow-up questions about the generated report.
- Citation Linking: Automatically hyperlinking citations directly to the scraped sources within the report body.
Contributions to ResearchMind are welcome! To contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature/AmazingFeature). - Make your changes and commit them (
git commit -m 'Add some AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
Please ensure your code adheres to standard Python styling (PEP 8) and that all required environment variables are documented if you introduce new dependencies.
This project is licensed under the MIT License - see the LICENSE file for details.