An intelligent AI agent that analyzes websites in real-time to detect trackers, monitor cookies, calculate privacy risk, and generate legal actions — all powered by Hugging Face's AI models.
- 🔍 Real-time website analysis
- 🔐 Tracker and cookie detection
- 🧠 AI-powered privacy recommendations
- 📊 Privacy risk scoring
- 📝 Legal request generation
- 📁 Report generation and logging
- Clone the repository:
git clone <your-repo-url>
cd privacy-guardian-ai- Create a virtual environment and install dependencies:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt- Create a
.envfile in the root directory and add your Hugging Face API key:
HUGGINGFACE_API_KEY=your_api_key_here
- Start the server:
uvicorn main:app --reloadThe API will be available at http://localhost:8000. Here are the main endpoints:
curl -X POST "http://localhost:8000/analyze" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "generate_legal_request": true}'curl "http://localhost:8000/reports"Once the server is running, visit http://localhost:8000/docs for interactive API documentation.
main.py: FastAPI application and endpointsscanner/: Privacy scanning componentsnetwork_scanner.py: Detects trackers and network activitycookie_parser.py: Analyzes cookies and their privacy implicationsrisk_engine.py: Calculates privacy risk scores
llm/: AI integrationhuggingface_integration.py: Handles LLM interactions
- All analysis is done locally
- No data is stored permanently
- Reports are saved only if explicitly requested
- Uses secure HTTPS for all external requests
MIT License