Skip to content

About

πŸš€ End-to-end Generative AI pipeline using autonomous agents, LLM orchestration, web search, scraping, and iterative report refinement with LangChain.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”¬ Multi-Agent Research Assistant

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.


🧠 How It Works

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 βœ…

Agents & Chains

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 β€”

Iterative Refinement Loop

The writer and critic work in a quality control loop:

  1. Writer produces a first draft
  2. Critic scores it out of 10 and lists strengths and weaknesses
  3. If score is below 8, the writer revises using the feedback
  4. Loop repeats up to 2 times or until score reaches 8 or above

πŸ—‚οΈ Project Structure

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 ! 

βš™οΈ Tech Stack

Layer Technology
LLM LLaMA 3.3 70B via Groq
Agent Framework LangChain
Web Search Tavily Search API
Web Scraping Trafilatura, Readability, BeautifulSoup
UI Streamlit

πŸš€ Run Locally

Prerequisites


Using uv

uv is a fast Python package manager.

Install uv if you do not have it:

curl -Lf https://astral.sh/uv/install.sh | sh

Clone and set up the project:

git clone https://github.com/yourusername/multi-agent-research-assistant.git
cd multi-agent-research-assistant
uv venv
source .venv/bin/activate        # Mac / Linux
.venv\Scripts\activate           # Windows
uv add -r requirements.txt

Open .env and fill in your keys:

GROQ_API_KEY=your_groq_api_key_here
TAVILY_API_KEY=your_tavily_api_key_here

Run 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.

About

πŸš€ End-to-end Generative AI pipeline using autonomous agents, LLM orchestration, web search, scraping, and iterative report refinement with LangChain.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages