?

Overview

Invite @rousseau-bot:matrix.example into your community room. It answers questions from documented sources, and every conversation is FTS5-indexed so future queries recall past answers.

Prerequisites

  • Self-hosted Synapse (or Dendrite / Conduwuit) with a bot user provisioned.
  • Access token for the bot user.
  • Docs and knowledge base bind-mounted at /workspace/docs.

Config

provider: anthropic

anthropic:
  model: claude-sonnet-4-6
  max_tokens: 4096

agent:
  system_prompt: |
    You are a community helper. Answer only from the docs directory.
    When you don't know, say so and point at a channel where a human
    can help. Keep responses under 400 words.
  approver:
    mode: pattern
    default: deny
    allow:
      - {tool: read, match: ".*"}
      - {tool: grep, match: ".*"}

matrix:
  homeserver_url: "https://matrix.example"
  access_token: "syt_…"
  user_id: "@rousseau-bot:matrix.example"
  allowlist: []      # empty = anyone in a room the bot is invited to

Launch

rousseau matrix

Invite the bot from your Matrix client. It responds to any message in the room.

Verification

  • journalctl … | grep matrix.starting and matrix.connected (if emitted) at boot.
  • @rousseau-bot: how do I install? returns a docs-anchored answer.
  • Ask the same question two days later; the FTS5 recall retrieves the previous answer for consistency.

Failure modes

  • M_UNKNOWN_TOKEN — access token expired or revoked. Re-login the bot user.
  • Bot spams the room — you forgot to set matrix.user_id and the bot answers its own messages.
  • Slow first response after long idle — the /sync cursor rebuilds. This is one-time per restart.

Related pages

Type to search 150+ pages. Ranking: BM25 with title/description boost.