A fully autonomous research pipeline powered by multiple AI agents that search the web, scrape sources, write structured reports, and iteratively refine them based on critic feedback.
Built with LangChain, Groq (LLaMA 3.3 70B), Tavily, and Streamlit.
The pipeline runs 4 specialized agents and chains in sequence:
- π Search Agent β finds recent web sources
- π Reader Agent β scrapes the most relevant URL
- βοΈ Writer Chain β drafts a structured report
- π§ Critic Chain β scores the report out of 10
score < 8 βββ revise (max 2 attempts) score β₯ 8 βββ approved β
| Component | Role | Tool |
|---|---|---|
| Search Agent | Finds recent and reliable sources on the topic | Tavily Search API |
| Reader Agent | Scrapes and extracts clean content from URLs | Custom web scraper |
| Writer Chain | Drafts a structured report with headings and citations | β |
| Critic Chain | Scores the report and gives structured feedback | β |
The writer and critic work in a quality control loop:
- Writer produces a first draft
- Critic scores it out of 10 and lists strengths and weaknesses
- If score is below 8, the writer revises using the feedback
- Loop repeats up to 2 times or until score reaches 8 or above
multi-agent-research-assistant/
βββ app.py # Streamlit UI - call pipeline, display results
βββ agents/
β βββ __init__.py
β βββ agents.py # Agent and chain definitions
βββ pipeline/
β βββ __init__.py
β βββ pipeline.py # Orchestration β runs agents, manages revision loop
βββ tools/
β βββ __init__.py
β βββ tools.py # Web search and URL scraper tools
βββ utils/
β βββ __init__.py
β βββ utils.py # Logger setup
βββ requirements.txt # Dependencies
βββ README.md # You are here !
| Layer | Technology |
|---|---|
| LLM | LLaMA 3.3 70B via Groq |
| Agent Framework | LangChain |
| Web Search | Tavily Search API |
| Web Scraping | Trafilatura, Readability, BeautifulSoup |
| UI | Streamlit |
- Python 3.10 or higher
- A Groq API key
- A Tavily API key
uv is a fast Python package manager.
Install uv if you do not have it:
curl -Lf https://astral.sh/uv/install.sh | shClone and set up the project:
git clone https://github.com/yourusername/multi-agent-research-assistant.git
cd multi-agent-research-assistantuv venv
source .venv/bin/activate # Mac / Linux
.venv\Scripts\activate # Windowsuv add -r requirements.txtOpen .env and fill in your keys:
GROQ_API_KEY=your_groq_api_key_here
TAVILY_API_KEY=your_tavily_api_key_hereRun the app:
streamlit run app.pyπ€ Author Amine Sellami
GitHub: @amijen LinkedIn: Amine Sellami
π License This project is licensed under the Apache-2.0 License β see the LICENSE file for details.