# Community Question Triage Agent

> A community triage agent that routes and answers incoming questions from your knowledge base, flags duplicates, and sends spam, abuse, and safety issues to moderators.

- **Category:** Social & Community
- **Difficulty:** Advanced
- **Setup time:** 45 min
- **Stacks:** Claude, LangGraph, OpenAI
- **Version:** 2.0.0 (updated 2026-06-21)
- **Source:** https://agent-kits.com/kit/community-question-triager

## Overview

Triages incoming community questions: categorizes, answers the clear ones, routes the rest.

Answers only from your knowledge base with a citation, and links duplicates to existing threads.

Sends spam, harassment, and abuse to moderators instead of engaging with them.

Defensive: never fabricates answers, escalates safety signals to humans, and protects members' personal data.

## When to use it

- Your community gets more questions than your team can triage by hand.
- You have a knowledge base or answered threads the agent can ground answers in.
- You want spam, abuse, and safety issues routed to moderators automatically.
- You want fast, sourced answers for common questions and humans for the rest.

## When not to use it

- You want it to answer everything, even without a reliable source — it routes instead.
- You have no knowledge base for it to ground answers in.
- You can't provide human moderators for escalations.
- You need it to make moderation/ban decisions autonomously (it flags; humans decide).

## Architecture

- **Post intake** — Receives the incoming community post and prepares it for safety and topic analysis.
- **Safety filter (first)** — Runs before anything else: detects spam, harassment, hate, harmful content, and distress, deciding whether to proceed or route.
- **Topic classifier** — Categorizes safe posts by area so they can be matched, answered, or routed to the right team.
- **Duplicate detector** — Checks for an existing answered thread so common questions are linked rather than re-answered.
- **Knowledge-base search** — Looks for a grounded answer in the knowledge base or prior answers, with a citation.
- **Answer-or-route gate** — Drafts a sourced answer only when confident; otherwise routes to a human, recording the reason.
- **Escalation & handoff** — Routes abuse to moderators and safety signals to a person, and hands clear answers back with citations and confidence.

## Files in this bundle

- `system-prompt.md` — the agent's system prompt
- `tools.json` — tool/function definitions the agent expects
- `workflow.md` — step-by-step run loop
- `.env.example` — environment variables to fill in
- `kit.json` — full structured metadata
- `starters/` — minimal starter snippets
- `LICENSE` — Apache-2.0 (code, configuration, and schema)
- `LICENSE-CONTENT` — CC BY 4.0 (specification text and documentation)
- `NOTICE` — attribution and trademark notice
- `run.py` — **runnable demo**: real agent loop with mock tools (`pip install anthropic`, set `ANTHROPIC_API_KEY`, `python run.py`)
- `agentaz.json` / `agentaz.schema.json` — AgentAz™ governance spec + schema

## Implementation notes

- Run the safety filter before anything else and never let an answer path handle an abusive or crisis post; engaging abuse or auto-replying to distress is the worst failure mode here.
- Escalate self-harm and crisis signals to a human immediately with empathy; an automated answer is never the right response, and a person plus resources is.
- Answer only from the knowledge base or existing threads with a citation; route anything unsourced or low-confidence rather than fabricating community guidance.
- Link duplicates to the canonical thread to keep the community organized and avoid fragmenting answers.
- Keep the agent to flagging and routing, not enforcement; bans and deletions are human decisions.
- Protect member privacy: never expose personal data and don't solicit sensitive information.
- Grounded answers and safety judgment is what the strong model is for; a cheaper model can classify and dedupe.

## Variations

- **Basic — Question router:** Triages posts, links duplicates, and answers clear questions from the knowledge base. Routes the rest to humans.
- **Advanced — Safety-aware triage:** Adds the safety-first filter, abuse/crisis routing, grounded source-only answers with confidence, and privacy protection.
- **Enterprise — Community operations layer:** Adds multi-channel support, moderator dashboards, trust-and-safety workflows, analytics on common questions, and human-in-the-loop for enforcement.

## FAQ

**Will it answer questions it isn't sure about?**

No. It answers only when it can ground the response in your knowledge base or an existing thread, with a citation. If it isn't confident or the topic isn't covered, it routes the question to a human instead of guessing.

**How does it handle abuse and spam?**

Its safety filter runs first. Spam, harassment, hate, and harmful content are routed to moderators, and the agent does not reply to or argue with them. It flags; your moderators decide on enforcement.

**What about someone in crisis?**

Signals of distress or self-harm are escalated to a human immediately, with an empathetic response, rather than handled as an automated Q&A. A real person can then respond with care and appropriate resources.

**Does it ban or delete posts?**

No. It flags and routes; it never takes punitive action on its own. Bans, deletions, and other enforcement remain human decisions.

**Will it expose members' personal information?**

No. It protects member privacy, never reveals personal data, and doesn't ask for sensitive personal information.

**Does it reduce duplicate threads?**

Yes. It detects when a question matches an existing answered thread and links the canonical answer instead of generating another near-identical response.


---

© 2026 AgentKits · www.agent-kits.com

**Open source.** Code, configuration, and the AgentAz™ schema are licensed under
**Apache-2.0**; specification text and documentation under **CC BY 4.0** (with
attribution to AgentKits, link to https://www.agent-kits.com). See LICENSE, LICENSE-CONTENT,
and NOTICE in this bundle. "AgentAz" and "AgentKits" are trademarks of AgentKits.

**Flagship reference blueprint.** View the source, AgentAz™ spec, and frozen v1.0 schema
in the public registry: https://github.com/agent-kits/agentaz
Original: https://agent-kits.com/kit/community-question-triager
