AuraMod — AI-Powered Proactive Reddit Moderation

Inspiration

  • Mods always find flame wars after the damage is done
  • Existing tools are reactive — we wanted proactive detection
  • Key insight: toxicity is about patterns, not just single comments

How It Works

  • Velocity Tracking — Redis sorted sets count replies per thread in a 10-min sliding window
  • AI Analysis — When 3+ replies hit in 10 min, OpenRouter AI (Gemini 2.0 Flash) scores toxicity from 0.0 (toxic) → 1.0 (safe)
  • Auto-Intervention — Lock, remove, or report based on configurable thresholds
  • Cooldown Guard — 30-min Redis TTL prevents duplicate actions on same thread
  • Keyword Fallback — Works without an API key using tiered keyword heuristics

Mod Tools

  • 🔍 Analyze Comment — Right-click menu for instant AI toxicity score
  • 📋 Intervention Log — View recent automated actions per subreddit
  • 📧 Modmail Alerts — Auto-notifies mod team with score + context

Challenges Faced

  • Nested replies broke velocity tracking → fixed by tracking per-post instead of per-parent
  • Bot re-triggered repeatedly on hot threads → added Redis cooldown system
  • AI sometimes returns text instead of numbers → built regex extraction + multi-layer fallback

What We Learned

  • Redis sorted sets are ideal for time-windowed counting
  • LLM outputs need guardrails and fallback chains
  • Devvit triggers are stateless — Redis becomes your app's memory

Built With

  • Platform: Reddit Devvit (TypeScript)
  • AI: OpenRouter API → Google Gemini 2.0 Flash
  • Storage: Devvit Redis (velocity, cooldowns, intervention logs)

Built With

Share this project:

Updates