Skip to content

Your emotionally secure digital companion: blending a friend's empathy with a therapist's neutrality to safeguard your mental well-being in every conversation.

License

Notifications You must be signed in to change notification settings

devpatel122003/SentiMind

Repository files navigation

🧠 Sentimind β€” The emotional radar for your digital world.

A comprehensive AI-powered system that detects and analyzes tone, trust and intent in real-time conversations across multiple platforms including Reddit, chat applications, and social media.

Python Chrome Extension AI License


πŸš€ Overview

Sentimind integrates a Chrome extension for live chat analysis and a Reddit MCP server for large-scale social data analysis.
Powered by Google Gemini 2.0 AI, the system identifies sentiment patterns, toxic behaviors, and offers constructive feedback to improve digital communication.

✨ Key Features

  • πŸ” Real-time Analysis: Monitors conversations as they happen
  • 🌐 Multi-Platform Support: Works with WhatsApp, Messenger, Telegram, Discord, and Reddit
  • πŸ€– AI-Powered Intelligence: Uses Gemini 2.0 Flash for advanced contextual sentiment detection
  • πŸ“Š Visual Feedback: Intuitive UI displaying sentiment and toxicity levels with suggestions
  • πŸ›‘οΈ Privacy-First: No user data stored β€” all analysis happens locally
  • ⚑ MCP Integration: Seamless AI orchestration using the Model Context Protocol

πŸ—οΈ Architecture

Sentimind System
β”œβ”€β”€ πŸ–₯️ Chrome Extension (Frontend)
β”‚   β”œβ”€β”€ Real-time chat monitoring
β”‚   β”œβ”€β”€ Sentiment & toxicity indicator overlay
β”‚   └── Gemini AI integration
β”œβ”€β”€ πŸ”Œ Reddit MCP Server (Backend)
β”‚   β”œβ”€β”€ Live Reddit data crawling
β”‚   β”œβ”€β”€ Sentiment and toxic pattern detection
β”‚   └── Conversation formatting
└── πŸ€– Dedalus Agent (Orchestration)
    β”œβ”€β”€ MCP client management
    β”œβ”€β”€ Gemini API coordination
    └── Analysis pipeline

πŸ› οΈ Installation & Setup

Prerequisites

  • Python 3.10+
  • Chrome Browser
  • Reddit API credentials
  • Gemini API key
  • Dedalus API key

1. Clone the Repository

git clone https://github.com/yourusername/sentiMind.git
cd sentiMind

2. Backend Setup (Reddit MCP Server)

cd reddit-mcp-server

# Install dependencies
pip install -r requirements.txt

# Configure environment
cp .env.example .env
# Edit .env with your API keys

# Start the server
python reddit_sentimind_server.py

3. Chrome Extension Setup

  1. Open Chrome and navigate to chrome://extensions/
  2. Enable Developer mode
  3. Click Load unpacked and select the chrome-extension/ folder
  4. Click the extension icon and enter your Gemini API key

4. Agent Setup

cd dedalus-agent

# Create virtual environment
python3.10 -m venv sentimind_env
source sentimind_env/bin/activate

# Install dependencies
pip install -r requirements.txt

# Configure environment
cp .env.example .env
# Edit .env with your API keys

# Run the agent
python agent.py

πŸ”‘ API Configuration

Required API Keys

Environment Variables

# dedalus-agent/.env
DEDALUS_API_KEY=your_dedalus_key
GEMINI_API_KEY=your_gemini_key
REDDIT_SERVER_URL=http://localhost:8000

# reddit-mcp-server/.env
REDDIT_CLIENT_ID=your_reddit_client_id
REDDIT_CLIENT_SECRET=your_reddit_secret

🎯 Usage

Real-time Chat Analysis

  1. Install the Chrome extension
  2. Navigate to any supported chat platform (WhatsApp Web, Messenger, etc.)
  3. Start chatting β€” Sentimind automatically analyzes conversations
  4. View sentiment and toxicity indicators with improvement suggestions

Reddit Analysis

  1. Start the Reddit MCP server
  2. Run the Dedalus Agent for live Reddit sentiment tracking
  3. Monitor results in real-time via WebSocket

βœ… Supported Platforms

  • WhatsApp Web
  • Facebook Messenger
  • Telegram Web
  • Discord
  • Slack
  • Microsoft Teams
  • Reddit (via MCP Server)

πŸ“Š Features in Detail

🧩 Sentiment & Toxicity Detection

  • Pattern Recognition β€” Detects insults, sarcasm, manipulation
  • Communication Analysis β€” Identifies tone, emotion, and passive-aggressive behavior
  • Real-time Scoring β€” Displays instant sentiment levels (Positive / Neutral / Negative)

πŸ’¬ User Interface

  • Floating Indicator β€” Non-intrusive overlay
  • Color-coded Alerts β€” Visual representation of sentiment intensity
  • Actionable Suggestions β€” Constructive communication improvement advice

βš™οΈ MCP Integration

  • Standard Protocol β€” Uses Model Context Protocol for orchestration
  • Extensible Design β€” Add new data sources easily
  • Scalable Deployment β€” Production-ready modular setup

πŸš€ Quick Start

# 1. Start Reddit server (Terminal 1)
cd reddit-mcp-server && python reddit_sentimind_server.py

# 2. Start WebSocket server (Terminal 2)
cd dedalus-agent && source sentimind_env/bin/activate && python websocket_server.py

# 3. Run agent (Terminal 3)
cd dedalus-agent && source sentimind_env/bin/activate && python agent.py

# 4. Load Chrome extension in browser

πŸ§ͺ Testing

# Test Reddit server
cd reddit-mcp-server && python test_reddit_server.py

# Test agent integration
cd dedalus-agent && python test_integration.py

# Run all tests
./run_tests.sh

πŸ“ Project Structure

sentimind/
β”œβ”€β”€ πŸ“– README.md
β”œβ”€β”€ πŸ“ chrome-extension/          # Browser extension
β”‚   β”œβ”€β”€ manifest.json
β”‚   β”œβ”€β”€ content.js               # Core analysis logic
β”‚   β”œβ”€β”€ popup.html               # Extension UI
β”‚   β”œβ”€β”€ content.css              # Styling
β”‚   └── icons/                   # Icons
β”œβ”€β”€ πŸ“ reddit-mcp-server/        # Reddit data server
β”‚   β”œβ”€β”€ reddit_sentimind_server.py
β”‚   β”œβ”€β”€ requirements.txt
β”‚   └── test_reddit_server.py
β”œβ”€β”€ πŸ“ dedalus-agent/            # AI orchestration
β”‚   β”œβ”€β”€ agent.py
β”‚   β”œβ”€β”€ websocket_server.py
β”‚   β”œβ”€β”€ requirements.txt
β”‚   └── .env.example
└── πŸ“ docs/                     # Documentation
    β”œβ”€β”€ architecture.md
    └── api-reference.md

πŸ”§ Development

Adding New Platforms

  1. Extend content.js with new platform selectors
  2. Update permissions in manifest.json
  3. Test extraction patterns

Customizing Analysis

  • Modify detection patterns in Reddit crawler
  • Adjust Gemini prompt templates for emotion depth
  • Extend MCP tools for multimodal understanding

Building for Production

# Package Chrome extension
cd chrome-extension && zip -r sentimind.zip .

# Dockerize servers
docker build -t sentimind .

🀝 Contributing

We welcome contributions! See CONTRIBUTING.md for details.

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push and open a pull request

πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.


πŸ™ Acknowledgments

  • Google Gemini for advanced AI capabilities
  • Reddit PRAW for API integration
  • Dedalus Labs for MCP orchestration
  • Chrome Extension API for seamless browser integration

About

Your emotionally secure digital companion: blending a friend's empathy with a therapist's neutrality to safeguard your mental well-being in every conversation.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published