🚀 Live Demo: https://multi-agent-research-systems.streamlit.app/
An AI-powered research system where four specialized agents collaborate to search the web, scrape content, write a structured report, and critically review it — all from a single topic input.
Built with LangChain, Mistral AI, Tavily Search, and Streamlit.
The pipeline runs in 4 sequential steps:
| Step | Agent | Role |
|---|---|---|
| 01 | Search Agent | Searches the web via Tavily and collects titles, URLs, and snippets |
| 02 | Reader Agent | Picks the most relevant URL and scrapes its full content |
| 03 | Writer Chain | Combines research and writes a structured report using an LLM |
| 04 | Critic Chain | Reviews the report and gives a score, strengths, and areas to improve |
- LangChain — agent orchestration and chain composition
- Mistral AI — LLM backend for writing and critiquing
- Tavily API — real-time web search
- BeautifulSoup — web scraping and content extraction
- Streamlit — frontend UI
- python-dotenv — environment variable management
├── app.py # Streamlit UI
├── agents.py # Search agent, Reader agent, Writer chain, Critic chain
├── tools.py # web_search and scrape_url tools
├── pipeline.py # Core pipeline logic (CLI entry point)
├── requirements.txt # Dependencies
└── .env # API keys (never commit this)
git clone https://github.com/tahirshamim/multi-agent-research-system.git
cd multi-agent-research-systempython -m venv .venv
.venv\Scripts\activate # Windows
source .venv/bin/activate # Mac/Linuxpip install -r requirements.txtCreate a .env file in the project root:
MISTRAL_API_KEY=your-mistral-key-here
TAVILY_API_KEY=your-tavily-key-here
Get your keys:
- Mistral → console.mistral.ai
- Tavily → app.tavily.com
# Streamlit UI
streamlit run app.py
# Or CLI mode
python pipeline.pyDeployed on Streamlit Cloud. To deploy your own:
- Push the repo to GitHub (without
.env) - Go to share.streamlit.io
- Connect your repo and set main file as
app.py - Add your API keys under Settings → Secrets:
MISTRAL_API_KEY = "your-mistral-key-here"
TAVILY_API_KEY = "your-tavily-key-here"Tahir Shamim
CS Student @ NED University Karachi
github.com/tahirshamim