Inspiration

If you have ever moderated a busy subreddit, you know the drill, you open the mod queue and find hundreds of items. Many are the same crypto post rewritten a little, others break formatting rules. You spend hours on repetitive cleanup that feels like data entry rather than community work, and new posts keep arriving while you work.

That exhaustion is what led us to build ComodAI. Volunteer moderators give their time to keep communities healthy and they’re burning out. We wanted to automate the repetitive pattern-matching tasks so moderators only handle posts that need a human judgment.

We also noticed moderation is usually reactive: teams write rules after a spam wave hits. We wanted a system that learns from past removals and helps stop the next wave before it spreads.

What it does

ComodAI runs inside Reddit as a Devvit app. Every post and comment goes through three checks in real time.

Rules engine instant: Moderators create regex patterns, domain blocklists, title-format rules, and keyword filters. Anything that matches a remove rule is taken down immediately. AI agent seconds: If enabled, the model reads the content, the subreddit’s active rules, and the author’s trust score, then returns a verdict: remove, approve, flag, or escalate. The system only auto-removes when confidence exceeds 85%; everything else goes to the moderator queue. Spam Sleuth background: This pattern learner reviews removal history to find recurring domains, phrases, and author clusters, and raises priority for matching new content. ComodAI also provides a full moderation workflow: weekly audit reports, automatic appeal detection and handling, a user trust score, comment-cleanup tools, and an AI Rule Builder that converts plain-English descriptions into tested regex rules.

How we built it

We built ComodAI with TypeScript on Devvit’s web server framework and Hono for routing. Rules, queue items, user profiles, appeals, and reports are stored in Redis via Devvit’s Redis client.

The AI layer is provider-agnostic. We wrote a single callLLM function that detects whether the endpoint is OpenAI-compatible or Google Gemini and formats requests accordingly. AI verdicts follow a strict JSON schema that we validate before acting; any remove verdict below 75% confidence is downgraded to a flag.

The moderation pipeline runs on real-time triggers post or comment submit, reports, mod-mail and on scheduled scans of new posts, hot posts, and the mod queue every 15–30 minutes. A Redis-based deduplication layer prevents items from being processed twice.

The moderator interface is built into Reddit’s mod menu using Devvit forms, so moderators don’t have to leave the site.

Challenges we faced

Getting Devvit's context system to behave across different trigger types was difficult. The OnAppInstall trigger didn’t include subreddit headers the same way menu actions did, which caused crashes when building context. We solved this with a custom context factory that handles missing or malformed headers without failing.

Integrating Gemini presented other quirks: a different URL structure, query-parameter authentication instead of an Authorization header, larger token needs, and occasional JSON wrapped in markdown fences. We handled these differences so moderators can just enter an endpoint and have it work.

Tuning the AI to be conservative enough to earn trust took time. An overaggressive model damages community trust, so we adjusted confidence thresholds and downgrade logic to favor human review whenever uncertainty exists.

Accomplishments we’re proud of

The appeals workflow drastically reduced manual work. A user sends mod-mail with “appeal” in the subject; the system detects it, creates a queue item, and a moderator can accept or reject the appeal with one click. Accepted appeals automatically unban and notify the user. What once took 10–15 minutes now takes about 30 seconds.

The AI Rule Builder is also valuable. Moderators can describe unwanted posts in plain English and get a tested regex rule back, complete with explanation. That makes rule creation accessible to moderators who know their community but don’t know regex.

Finally, running entirely inside Reddit no external dashboard, no separate login lowered friction and helped adoption.

What we learned

Designing for volunteer moderators means minimizing friction. Each extra step or external tool reduces adoption. Building inside Devvit’s form system forced us to simplify the UI and workflows.

We also learned the limits of LLM-based moderation. Models catch nuanced violations that regex misses, but they need strong guardrails. Treat the AI as a second opinion, not the final authority.

Technically, building a stateful, multi-trigger app on a serverless platform required careful concurrency handling. Two triggers firing on the same content at the same time is real; without deduplication we would have had duplicate processing and notifications.

What’s next

We plan to add a richer review-queue UI within Devvit so moderators can read AI reasoning and act with one click, without leaving Reddit.

We want to expand trust scoring with cross-subreddit signals, karma velocity, and behavior patterns to improve accuracy.

On the AI side, we’ll add per-subreddit system prompts so moderators can set community-specific guidance, for example, “this is a support community; avoid removing posts that express distress.”

Longer term, we aim to turn audit data into proactive recommendations: not just “here are patterns we found,” but “based on removals this month, here’s a rule we recommend adding.” Closing the loop between detection and action is the goal.

Built With

Share this project:

Updates