A powerful multi-agent research system built with LangChain that autonomously researches topics, gathers information, writes comprehensive reports, and evaluates their quality using AI-powered agents.
🔬 Research Automation • 🤖 Multi-Agent Orchestration • 📝 Intelligent Report Generation
- Multi-Agent Architecture: Specialized agents for searching, reading, writing, and critiquing
- Automated Web Research: Intelligent web search with Tavily API
- Smart Content Extraction: Advanced web scraping with multiple fallback strategies
- AI-Powered Report Generation: Automatically generates structured research reports
- Quality Evaluation: Built-in critic agent for report validation and scoring
- Interactive UI: Streamlit-based user interface for easy interaction
- Pipeline Orchestration: Seamless coordination of multiple agents
┌─────────────────────────────────────────────────────┐
│ Streamlit UI (app.py) │
│ Multi-Agent Research Assistant Interface │
└──────────────────┬──────────────────────────────────┘
│
┌──────────────────▼──────────────────────────────────┐
│ Research Pipeline (pipeline.py) │
│ Orchestrates multi-agent workflow │
└──────────────────┬──────────────────────────────────┘
│
┌──────────────┼──────────────┐
│ │ │
┌───▼───┐ ┌────▼─────┐ ┌───▼────┐
│Search │ │ Reader │ │ Writer │
│Agent │ │ Agent │ │ Chain │
└───┬───┘ └────┬─────┘ └───┬────┘
│ │ │
│ ┌──────────▼─────────┐ │
└─▶│ Tools Layer │◀──┘
│ │
│ • web_search │
│ • scrape_url │
│ │
└────────┬───────────┘
│
┌───▼────────┐
│ Critic │
│ Chain │
└────────────┘
- Search Agent: Discovers relevant information across the web using Tavily
- Reader Agent: Extracts clean, readable content from URLs
- Writer Chain: Composes structured, professional research reports
- Critic Chain: Evaluates reports and provides improvement suggestions
| Technology | Purpose |
|---|---|
| LangChain | Multi-agent orchestration and chain management |
| Groq (Qwen 3 32B) | Language model for agents and chains |
| Streamlit | Interactive web UI |
| Tavily API | Web search and information retrieval |
| BeautifulSoup4 | HTML parsing and content extraction |
| Trafilatura | Web content extraction |
| Readability-lxml | Article content extraction |
| Python-dotenv | Environment configuration management |
| Rich | Terminal output formatting |
- Python 3.11 or higher
- GROQ API Key
- Tavily API Key
git clone https://github.com/AmanXk/multiagent-research-agent.git
cd multiagent-research-agentconda create -n langagent python=3.11 -y
conda activate langagentOr with venv:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txtCreate a .env file in the project root:
GROQ_API_KEY=your_groq_api_key_here
TAVILY_API_KEY=your_tavily_api_key_hereGet your keys from:
streamlit run app.pyThen open http://localhost:8501 in your browser.
python main.pyEdit the topic variable in main.py to research different topics.
.
├── app.py # Streamlit web interface
├── main.py # CLI entry point
├── requirements.txt # Python dependencies
├── README.md # This file
│
└── src/
├── __init__.py
├── agents/
│ ├── __init__.py
│ └── agents.py # Search, Reader, Writer, Critic agents
├── tools/
│ ├── __init__.py
│ └── tools.py # web_search, scrape_url tools
└── pipelines/
├── __init__.py
└── pipeline.py # Main research orchestration
- User Input: Enter a research topic via UI or script
- Search Phase: Search agent queries the web using Tavily
- Reading Phase: Reader agent extracts content from relevant URLs
- Writing Phase: Writer chain synthesizes findings into a structured report
- Review Phase: Critic chain evaluates the report and provides scores
- Output: Display final report with feedback and scores
The system generates reports with:
- Comprehensive introduction and background
- Key findings with detailed explanations
- Well-sourced conclusions
- Structured sections and proper formatting
- Quality scores from 1-10
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with LangChain
- Search powered by Tavily
- UI built with Streamlit
- Inspired by agentic AI research patterns
For support, open an issue on GitHub
Happy Researching!