The chat bot and AI features
Your site has four optional AI features: a chat bot that answers when someone mentions it, automod, which checks chat messages for a moderator, a help desk that answers questions in the help pop-up, and memory, which lets the bot recall older chat. All four are off on a new install, and each one runs once you connect an AI provider of your own.
This page is for a streamer deciding whether to use AI on their site. After reading it you know what an AI provider is, how to connect one, what each feature does and costs, and how to switch each one on and off. In the Admin Panel, all of it lives under AI, on the pages Models, Chat Bot, Scoring, Automod, Help Desk and Embeddings. Scoring has nothing to set on a standard install.
Why you bring your own AI provider
Your site does not include an AI model. AI models run on a provider's computers, and each request costs the provider money, so every install connects its own account. That keeps the choice and the cost with you: you pick the provider and the model, you see the bill, and you can stop it at any time.
An AI provider is a company or program that runs AI models and answers requests from other software. Your site can use:
| Provider | What it is | Where to get a key |
|---|---|---|
| Anthropic | Makes the Claude models. Built in | Anthropic Console: API keys |
| OpenAI | Makes the GPT models. Built in. The only built-in provider that can power memory | OpenAI: API keys |
| Any OpenAI-compatible service | Many services answer in the same format as OpenAI: OpenRouter (one key for many providers' models), or a model on your own computer with Ollama, LM Studio or vLLM | That service's own settings |
Your site talks to a provider with an API key: a long secret password made in the provider's dashboard. Anyone who has your key can spend your money with that provider, so never paste it anywhere but your Admin Panel. Your site stores it encrypted, and only ever sends a key to the address of the connection it was saved for, so a key cannot leak to another service even if a connection's address is changed.
What it costs
Providers charge per request, by how much text goes in and comes out, counted in tokens (pieces of words). Prices differ a lot from model to model: small, fast models cost a small fraction of what the largest ones do. See each provider's current prices: Anthropic pricing, OpenAI pricing. A model on your own computer costs nothing per request, but needs a computer fast enough to run it.
What makes the requests on your site:
| Feature | One request each time | How often that is |
|---|---|---|
| Chat bot | Someone mentions the bot | Only on mentions, and at most 6 a minute |
| Automod | A chat message is checked | Every message from viewers who are not staff or mods. The busiest feature by far |
| Help desk | Someone asks a question in the help pop-up | Rarely |
| Memory | A chat message of four words or more is stored, and once more each time the bot recalls | Most chat messages, but embedding requests are very cheap |
Recommended: before switching anything on, set a monthly spending limit in your provider's billing settings. Then a busy stream can never run up a bill you did not expect. Start with a small, fast model; it is plenty for chat, and quick answers matter more than clever ones.
1. Connect a provider
- Make an account with the provider and add a payment method; most providers do not answer requests until you do.
- Make an API key in the provider's dashboard (links in the table above) and copy it. Most providers show a key only once.
- Open Admin Panel → AI → Models. Paste the key under Built-in connection keys, in Anthropic API key or OpenAI API key.
- For another OpenAI-compatible service, press Add connection instead. Give it an id and a label, its address (the part that ends just before
/modelsand/chat/completions, often ending in/v1), and its key if it needs one. - Press Detect models on the connection. It asks the provider which models your key can use. If it fails, the key is wrong, the account has no credit, or the address is wrong.
- Choose a Mode:
- Simple: one Default model runs every AI feature you switch on. Pick the connection and model under Default model and press Save.
- Advanced: each feature can have its own connection and model, and falls back to the default when it has none. Useful for a fast, cheap model on automod and a better one for the bot.
Each feature's own page has a task row with its switch, its model (in Advanced mode) and a max tokens box, which caps how long one answer can be.
2. The chat bot
The chat bot answers chat messages that mention its name, such as "Bot, when is the next stream?" or "@Bot". It is meant for quick answers and a little personality in chat, not for long conversations.
How it behaves:
- It reads recent chat, so it knows what is going on, and answers the message that mentioned it.
- It never answers itself, or any account you have listed as a bot.
- Every reply passes the same word filter and link rules as a viewer's message. A reply that would not pass is not sent.
- It answers one message at a time, at most once every 20 seconds for each person, and at most 6 times a minute overall. This keeps it from flooding chat and keeps your costs predictable.
It always answers in your site's chat. A mention typed on Twitch, YouTube, Kick or Streamplace is answered in your site's chat too, addressed to that person by name and quoting their line. Posting into the platforms' own chats needs the bot's own platform account signed in. Signing it in from the Admin Panel is coming; until then the bot answers everyone in your site's chat.
Setting it up
- Make a separate account on your site for the bot, the way a viewer signs up, with a name such as "Gadget". The bot posts as this account.
- Open Admin Panel → AI → Chat Bot. Under Accounts, put that account's Matrix ID (it looks like
@gadget:example.com) in Bot account. Its messages, avatar and staff badge come from this account. - In Bot usernames, list any platform usernames that belong to bots (another bot you run on Twitch, for example), so the bot never answers them and their chat is not counted.
- Give it a Name. This is the word viewers type to get its attention, and it is also the help desk's name. With no name it is called "Bot".
- Switch the Chat bot replies task on. In Advanced mode, pick its model here too.
- Switch Answer mentions on. The bot starts within a few seconds, with no restart.
Under the switch, Can speak on says where the bot can answer right now. If it says "nowhere yet", step 2 is missing. The same line counts the replies it has sent, skipped, held back by the chat filter or failed since it started.
🖼 Image: the Chat Bot tab, with the Name, Switch and Behavior file sections.
The behavior file
The Behavior file on the same page is the bot's instructions, in parts you fill in:
| Part | What it is |
|---|---|
| Persona | Who the bot is and how it talks. The default is a friendly, brief helper that never pretends to be a person |
| Never discuss | Topics it should stay away from, one per line |
| Facts | Things it should know, each tagged schedule, rules, links, jokes or other. For example: "Streams are Tuesday and Friday at 8pm" (schedule) |
| Reply length | short or medium |
| Swearing | avoid or allow |
| Emoji | allow or avoid |
Facts are added to the instructions in the order you list them, while they fit. A counter shows how much room is used, and a fact that does not fit is marked as left out. Put the most important facts first. Save behavior applies from the next reply. Revert to default goes back to the shipped file; your own file stays in the change history.
Recommended: keep the persona to a few sentences and put what the bot must know in Facts. Short instructions are cheaper on every reply and easier for the model to follow.
3. Automod
Automod uses the AI to check each chat message as it arrives. A risky message typed on your site is held: no one sees it until a moderator lets it through or it times out. A risky message from another platform is already public there, so it is flagged for your mods instead. Automod never removes a message, bans or times anyone out by itself; a person always decides.
It is set up in Admin Panel → AI → Automod:
| Setting | Default | What it does |
|---|---|---|
| Check chat messages | Off | The switch |
| Categories | harassment, hate, sexual, threat, self-harm, spam, scam | What the check may call risky |
| Confidence floor | 0.7 | How sure the model must be (0 to 1) before a message counts as risky |
| Time budget | 1,200 ms | How long a site message may wait for the check. Past it, the message goes through unchecked |
| Drop an unreviewed hold after | 120 s | How long a held message waits for a mod before it is dropped |
| Mark after | 3 messages in 24 hours | When mods see a "suspicious" mark on a person |
| Do not check paying supporters | Off | Skips supporters |
Staff, mods, the bot and fully encrypted messages are never checked. If the model is slow or down, messages go through unchecked rather than chat stopping: the site prefers missing a message to freezing your chat.
Recommended: use a small, fast model for automod. It has just over a second to answer, and it runs on almost every message, so speed and price matter more here than anywhere else.
What mods see and do with held messages is on The mod panel.
4. The help desk
The help pop-up on your site lets viewers ask for help. With the help desk off, a person answers. With it on, the AI answers first, using a reference text you write about your site, and every reply has buttons, including one that files the viewer's message as a bug report so a person follows up.
Set it up in Admin Panel → AI → Help Desk: switch on its task, write your reference text, then switch on Help desk answers with the AI. Its name is the bot's name ("Help" if the bot has none). It does not use memory: each conversation only sees itself.
5. Memory
With memory on, the bot can recall older chat messages that relate to what it is asked, such as something a viewer said last week. It works with embeddings: each message is turned into a list of numbers that describes its meaning, so messages about the same thing can be found later (OpenAI: embeddings).
Memory needs an OpenAI-compatible connection, such as OpenAI itself, Ollama or LM Studio. Anthropic has no embeddings service, so an Anthropic key alone cannot power memory.
- Open Admin Panel → AI → Embeddings.
- Pick the connection and an embedding model, and press Turn on memory.
- The site embeds one test message first, to learn the model's size. If that works, memory is on.
From then on, new chat messages are remembered; older ones are not. Messages under four words (not counting emotes) are skipped, because they rarely mean anything later. Memories are kept for 90 days unless you change Keep memories for.
Changing to a different embedding model starts memory again from empty, because numbers from two different models cannot be compared. You are told how many memories would be cleared before anything happens. If the embedder stops answering or answers wrongly, memory pauses by itself with one alarm instead of storing bad data; press Resume once it is fixed.
What is sent to your provider
| Feature | What it sends |
|---|---|
| Chat bot | The message that mentioned it, recent chat around it, and (with memory on) a few remembered messages |
| Automod | The text of each message it checks |
| Help desk | The viewer's question and the conversation so far, with your reference text |
| Memory | The text of each message it remembers, and each question the bot is asked |
Each provider has its own rules for what it keeps; read them before you choose. See also What is stored.
Turning features off
- Chat bot: switch Answer mentions off on the Chat Bot page. It stops within a few seconds.
- Automod: switch Check chat messages off.
- Help desk: switch Help desk answers with the AI off; people answer the help pop-up again.
- Everything: switch each task off, or remove your key under Built-in connection keys. With no key, nothing can reach your provider and nothing is charged.
Next: Moderating