Skip to content

sheikhabd22/ai-agent-browser

Repository files navigation

Privacy Guardian AI Agent

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.

Features

  • 🔍 Real-time website analysis
  • 🔐 Tracker and cookie detection
  • 🧠 AI-powered privacy recommendations
  • 📊 Privacy risk scoring
  • 📝 Legal request generation
  • 📁 Report generation and logging

Setup

  1. Clone the repository:
git clone <your-repo-url>
cd privacy-guardian-ai
  1. 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
  1. Create a .env file in the root directory and add your Hugging Face API key:
HUGGINGFACE_API_KEY=your_api_key_here
  1. Start the server:
uvicorn main:app --reload

Usage

The API will be available at http://localhost:8000. Here are the main endpoints:

Analyze a URL

curl -X POST "http://localhost:8000/analyze" \
     -H "Content-Type: application/json" \
     -d '{"url": "https://example.com", "generate_legal_request": true}'

Get All Reports

curl "http://localhost:8000/reports"

API Documentation

Once the server is running, visit http://localhost:8000/docs for interactive API documentation.

Components

  • main.py: FastAPI application and endpoints
  • scanner/: Privacy scanning components
    • network_scanner.py: Detects trackers and network activity
    • cookie_parser.py: Analyzes cookies and their privacy implications
    • risk_engine.py: Calculates privacy risk scores
  • llm/: AI integration
    • huggingface_integration.py: Handles LLM interactions

Privacy First

  • All analysis is done locally
  • No data is stored permanently
  • Reports are saved only if explicitly requested
  • Uses secure HTTPS for all external requests

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages