Four specialized AI agents that collaborate to search, read, write, and critique β producing polished research reports on any topic.
ResearchMind is a production-ready multi-agent AI pipeline that automates the entire research workflow. You provide a topic; four autonomous agents handle the rest:
| Agent | Role |
|---|---|
| π Search Agent | Queries the web via Tavily for recent, reliable information |
| π Reader Agent | Picks the best URL and scrapes deep content from it |
| βοΈ Writer Chain | Synthesizes all gathered research into a structured report |
| π§ Critic Chain | Reviews the report and provides a score + constructive feedback |
The project ships with a polished Streamlit web UI that visualizes every pipeline step in real time, plus a headless CLI entrypoint (pipeline.py).
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β User (UI / CLI) β
ββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββ
β topic
βΌ
ββββββββββββββββββββββββ
β Search Agent β β Tavily Web Search
β (LangChain Agent) β
ββββββββββββ¬ββββββββββββ
β search_results
βΌ
ββββββββββββββββββββββββ
β Reader Agent β β BeautifulSoup Scraper
β (LangChain Agent) β
ββββββββββββ¬ββββββββββββ
β scraped_content
βΌ
ββββββββββββββββββββββββ
β Writer Chain β β GPT-4o-mini (LLM)
β (LCEL Chain) β
ββββββββββββ¬ββββββββββββ
β report
βΌ
ββββββββββββββββββββββββ
β Critic Chain β β GPT-4o-mini (LLM)
β (LCEL Chain) β
ββββββββββββ¬ββββββββββββ
β feedback
βΌ
ββββββββββββββββββββββββ
β Final Output β
β (Report + Review) β
ββββββββββββββββββββββββ
- π€ Multi-agent orchestration β independent agents with distinct responsibilities
- π Real-time web search via Tavily (not just static knowledge)
- πΈοΈ Intelligent web scraping with BeautifulSoup content extraction
- π Structured report generation (Introduction β Key Findings β Conclusion β Sources)
- π§ͺ Automated quality critique with scoring (X/10) and improvement suggestions
- π» Dual interface β Beautiful Streamlit UI and CLI mode
- β¬οΈ Download reports as
.mdfiles directly from the UI - π¨ Dark-mode premium UI with animated pipeline status cards
- Python 3.10+
- An OpenAI API key (get one here)
- A Tavily API key (get one here β free tier available)
git clone https://github.com/<your-username>/multi-research-agent.git
cd multi-research-agentpython -m venv venv
source venv/bin/activate # Linux / macOS
# venv\Scripts\activate # Windowspip install -r requirements.txtcp .env.example .envOpen .env and fill in your API keys:
OPENAI_API_KEY=sk-...
TAVILY_API_KEY=tvly-...
β οΈ Never commit your.envfile. It is already listed in.gitignore.
streamlit run app.pyOpen your browser at http://localhost:8501.
python pipeline.pyYou will be prompted to enter a research topic, and the full pipeline will run in your terminal.
multi-research-agent/
βββ app.py # Streamlit web application (main UI)
βββ pipeline.py # Headless CLI entrypoint
βββ agents.py # Agent & chain definitions (Search, Reader, Writer, Critic)
βββ tools.py # LangChain tools (web_search, scrape_url)
βββ requirements.txt # Python dependencies
βββ .env.example # Environment variable template (safe to commit)
βββ .env # Your actual secrets (NEVER commit this)
βββ .gitignore
βββ LICENSE
βββ README.md
| Variable | Description | Required |
|---|---|---|
OPENAI_API_KEY |
Your OpenAI API key | β Yes |
TAVILY_API_KEY |
Your Tavily Search API key | β Yes |
You can modify the model used in agents.py:
llm = ChatOpenAI(model="gpt-4o-mini", temperature=0)
# Change to "gpt-4o" for higher quality, or "gpt-3.5-turbo" for lower costUses the web_search tool (backed by Tavily) to retrieve up to 5 recent, reliable web results for the given topic β including title, URL, and a content snippet.
Takes the search results, picks the most relevant URL, and scrapes its full text using requests + BeautifulSoup. Scripts, styles, navigation, and footers are stripped for clean content.
An LCEL chain that feeds the combined search + scraped data into GPT-4o-mini with a structured prompt. Outputs a full markdown report with:
- Introduction
- Key Findings (β₯3 points)
- Conclusion
- Sources
An LCEL chain that reviews the generated report and returns:
- Score: X/10
- Strengths: bullet points
- Areas to Improve: bullet points
- One-line verdict
Contributions are welcome! Please read CONTRIBUTING.md first.
- Fork the repository
- Create your feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'feat: add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License β see the LICENSE file for details.
- LangChain β Agent & chain orchestration
- Streamlit β Web UI framework
- Tavily β AI-optimized web search API
- OpenAI β GPT-4o-mini language model
- BeautifulSoup β Web scraping