Inspiration
With the increasing popularity of LLMs, I was surprised that very few moderation tools were exploring their potential for Reddit communities. Traditional AutoModerator setups often require large collections of rules and edge-case handling to capture moderation nuances, while modern language models can understand much of that context naturally.
The goal of this project was to create a moderation assistant that reduces repetitive moderation work while still keeping moderators fully in control of their communities.
What it does
AI AutoModerator reviews new subreddit posts against a community’s specific rules and moderation preferences.
The system sends rich contextual information to Gemini, including post titles, descriptions, flairs, metadata, subreddit rules, subreddit descriptions, timestamps, and attached images when available.
The moderation prompt instructs the model to behave as a subreddit-aware Reddit moderator following community-specific rules and preferences.
The app can:
- Detect rule violations, spam, and inappropriate content
- Review both text and image posts
- Check metadata such as flairs, NSFW tags, spoilers, and formatting
- Automatically take moderation actions such as removing, reporting, or commenting
- Work alongside existing AutoModerator configurations instead of replacing them
- Provide moderators with activity logs and moderation transparency tools
The only requirement for moderators is providing a Gemini API key for their subreddit.
How I built it
The moderator control panel was built from scratch as a custom Devvit post using PicoCSS and htmx 4.
Internally, moderation is triggered through the Devvit onPostCreate hook, which retrieves the stored subreddit configuration and sends all relevant post context to Gemini for analysis.
Version 2.1 introduced a major UI and architecture overhaul by migrating from simple settings/modmail-based interactions to a fully interactive Devvit custom-post interface.
The updated system also introduced:
- A complete moderation activity log
- Automatic Gemini connectivity checks
- Automatic version and update checks
- Improved moderation transparency and debugging tools
- Multiple stability and reliability improvements
All moderation actions are logged for moderator review to ensure transparency and maintain moderator oversight.
Challenges I ran into
Good UI/UX
Initially, the app relied on subreddit-specific settings, but this exposed API keys in plain text to moderators and imposed limitations on the overall user experience.
To solve this, I designed a hybrid system combining Devvit menu integrations with a custom post-based control panel, allowing moderators to securely manage configuration while maintaining accessibility and usability.
Prompt adjustment
LLMs are not perfect, and moderation edge cases can easily slip through. I had to run extensive testing to ensure moderation decisions behaved consistently across many different scenarios, and this remains ongoing work.
Stability of Gemini calls and Devvit
New AI models appear very quickly, so ensuring compatibility and availability is important.
I also had to carefully handle retry logic, API rate limits, duplicate trigger execution, and other edge cases to ensure the app remains stable and reliable at scale.
What I learned
As a Python backend developer, my experience with frontend technologies was initially limited. I had to learn most of the frontend stack used in this project from scratch and went through a large amount of trial and error before deciding on the final architecture and UI approach.
This project also taught me a lot about balancing AI automation with moderator transparency, usability, and reliability.
What’s next for AI AutoModerator
- Implement highly requested features from the public feedback board: https://aiautomoderator.fider.io/, prioritized by community votes
- Continuously improve contextual moderation accuracy using real-world edge-case feedback
- Further refine the moderator UI and user experience
- Add support for video post moderation
- Add support for OpenAI models
Built With
- devvit
- express.js
- gemini
- htmx
- node.js
- picocss
- redis
- typescript
Log in or sign up for Devpost to join the conversation.