Overview
Rousseau in a Discord server, answering FAQ questions with docs citations. Scoped to specific channels through user-id allowlisting on the transport side (rousseau does not filter by channel today; add the bot to specific channels only, and set the allowlist to the user IDs of the community managers if you want to lock it down further).
Prerequisites
- Discord bot token; Message Content intent enabled.
- Docs directory bind-mounted at
/workspace/docs. - Any provider with tool-use.
Config
provider: anthropic
anthropic:
model: claude-sonnet-4-6
max_tokens: 4096
agent:
system_prompt: |
Answer community questions from the docs directory only.
When unsure, say "I don't know — try #help".
Keep responses to under 5 sentences. Cite `docs/<file>.md` when quoting.
approver:
mode: pattern
default: deny
allow:
- {tool: read, match: ".*"}
- {tool: grep, match: ".*"}
discord:
token: "MTIz…"
allowlist: [] # empty = anyone in the channels the bot is in
Launch
rousseau discord
Invite the bot to your Discord server with a scoped invite URL (Bot permissions: Read Messages, Send Messages, Read Message History).
Verification
- Post a common question; the bot answers within 3 s with a citation.
- Ask something outside the docs; the bot says it doesn't know and points to
#help. -
rousseau session list --limit 5shows one session per Discord user.
Failure modes
- Bot answers
Disallowed intents— the bot's invite lacks the Message Content intent scope. Regenerate with the correct intents. - Rate-limited — Discord 429s on burst posts. The transport retries with backoff.
- Cost spike — set the allowlist tightly or
max_tokenslower.