This repository contains a fully functional, modular Multi-Agent AI System designed to monitor, analyze, and quantify the digital brand reputation of KIKO Milano. By mining unstructured multi-platform public discourse (Trustpilot and YouTube), the system automatically processes multilingual feedback, evaluates sentiment polarity, detects specific reputational threat categories, and generates actionable analytical dashboards for strategic decision-making.
- Multi-Platform Data Ingestion: Automating large-scale extraction of structured reviews from Trustpilot (via Apify) and public comments from YouTube (via YouTube Data API).
- Multilingual Support & Translation: Automatically detecting European languages (Italian, French, German, Spanish, Dutch) and translating them to English for standardized processing.
- Contextual Threat Detection: Identifying high-risk reputational threats including Fraud & Scam, Product Quality, Customer Service, and Health & Safety concerns.
- Quantitative Validation & Reporting: Evaluating pipeline accuracy through precise empirical metrics and outputting visual trend dashboards[cite: 2].
- Fully automated multi-agent architecture orchestrated sequentially.
- YouTube Data API & Trustpilot structured review integration.
- Multilingual review translation with automated language identification.
- Deep sentiment analysis pipeline using customized polarity scales.
- Contextual rule-based threat detection with robust negation handling.
- Automated report generation, validation metrics, and temporal analysis graphs.
The system runs on an agentic workflow orchestrated sequentially to manage data pipeline execution without duplication[cite: 2].
┌──────────────────────────────┐
│ 1. COLLECTOR AGENT │ <── Ingests Trustpilot (Apify) & YouTube API
└──────────────┬───────────────┘
│ ──> Generates: kiko_trustpilot_raw.xlsx & kiko_youtube_raw.csv
v
┌──────────────────────────────┐
│ 2. PARSER AGENT │ <── Cleans text, detects language & translates
└──────────────┬───────────────┘
│ ──> Generates Unified Format: kiko_final_integrated.csv
v
┌──────────────────────────────┐
│ 3. THREAT DETECTOR AGENT │ <── Keyword mapping, sentiment filtering & rules
└──────────────┬───────────────┘
│ ──> Generates: kiko_threat_report.csv
v
┌──────────────────────────────┐
│ 4. VALIDATION AGENT │ <── Calculates precision & temporal trend lines
└──────────────┬───────────────┘
│ ──> Generates: validation_metrics.txt & temporal_threat_analysis.png
v
┌──────────────────────────────┐
│ 5. REPORTER AGENT │ <── Compiles donut charts & sentiment distribution
└──────────────────────────────┘
──> Generates Final Dashboard: kiko_reputation_report.png
| Agent | Responsibility |
|---|---|
| Collector Agent | Connects to Apify and YouTube Data API to harvest raw feedback while preserving critical metadata (timestamps, rating scores). |
| Parser Agent | Uses LangDetect and Deep Translator to normalize text, remove duplicate entries, and assign base sentiment ratings using TextBlob. |
| Threat Detector Agent | Evaluates contextual rule-based risks (e.g., mapping expressions regarding skin irritation to Health & Safety or delivery issues to Customer Service). |
| Validation Agent | Tracks statistical validity, performing precision-oriented evaluations on flagged anomalies over time. |
| Reporter Agent | Generates data-driven charts converting raw textual telemetry into visual executive assets. |
| Orchestrator | Central controller that cleans legacy data caches and automates the complete pipeline sequentially. |
The system delivers a highly reliable baseline for threat classification, verified through manual auditing metrics.
- Total Reviews Analyzed: 658
- Total Threats Flagged: 69
- True Positives (Verified Risks): 60
- System Precision Score: 86.96%
The rule-based threat agent classifies data patterns with contextual negation handling under these dimensions:
- Health & Safety Threats (e.g., skin irritation, allergic reactions)
- Fraud & Scam Threats (e.g., stolen orders, fake profiles)
- Product Quality Threats (e.g., damaged items, broken containers)
- Customer Service Threats (e.g., refund issues, poor support channels)
Below are the actual visual insights generated automatically by the pipeline and saved directly under the reports/ folder:
This dashboard illustrates the threat distribution donut chart, average sentiment ratings mapped on a 1–5 scale, and cross-platform analysis between Trustpilot and YouTube.
This chart tracks the chronological frequency and volume patterns of incoming reviews, highlighting specific timeline spikes where potential reputational threats were flagged.
Note: The model validation data, raw logs, and textual distribution summaries are documented concurrently inside reports/validation_metrics.txt.
Follow these precise instructions to provision the environment, resolve system dependencies, and execute the multi-agent orchestration layer.
- Python 3.8 or higher installed globally.
- Internet access for real-time translation and dependency fetching.
Open a terminal workspace or command prompt window and run:
git clone [https://github.com/Umme-Farwa/Brand_Reputation.git](https://github.com/Umme-Farwa/Brand_Reputation.git)
cd Brand_Reputationpython -m venv env
.\env\Scripts\activatepython3 -m venv env
source env/bin/activateInstall all dependencies:
pip install -r "Src/kiko agents/Requirements.txt"IMPORTANT NOTE: Setup YouTube API Credentials Before running the Collector Agent, you must configure your personal Google Cloud Developer credentials for the YouTube Data API:
Obtain an API key from the Google Cloud Console.
Enable the YouTube Data API v3 for your project.
Open Src/kiko agents/kiko_collector_agent.py and replace the placeholder API key variable with your own credentials:
MY_KEY = "YOUR_ACTUAL_API_KEY_HERE"
python "Src/kiko agents/Main.py"The orchestrator (Main.py) automatically executes:
- Parser Agent
- Threat Detector Agent
- Validation Agent
- Reporter Agent
- Python (Core Environment)
- Pandas (Data Engineering & Integration)
- Matplotlib & Seaborn (Statistical Data Visualizations)
- TextBlob (Sentiment Polarity Extraction)
- Deep Translator & LangDetect (Language Processing Core)
- YouTube Data API (Public Video Insights Extractor)

