Creating AI-Powered Custom Commands
The AI module allows you to move beyond static chat responses by using a language model to generate dynamic content. Instead of a command repeating the same line, an AI command can generate unique responses based on your channel’s “lore,” the specific viewer’s “persona,” and your chosen AI personality.
This guide walks you through setting up a dynamic command, such as a custom !roast command, to interact with your community.
Prerequisites
- Subscription Tier: You must be on the Affiliate tier or higher to use the AI module. See Module access by tier for details.
- Bot Identity: You must have a Twitch account configured to act as your bot identity to post the AI responses.
Step 1: Enable and Configure the AI Module
Before creating commands, you must activate the module and define how the AI behaves.
- Open the AI section in your dashboard sidebar.
- Enable the module for your channel using the toggle.
- Configure Bot Identity: Select the Twitch account that will be used to post all AI-generated messages in your chat.
- Set Personality Prompt: Enter a prompt that defines the AI’s tone and style (e.g., “You are a sarcastic, witty assistant who loves puns”). This prompt guides how every AI response is phrased.
Step 2: Build Your Channel Lore
To make the AI responses feel unique to your community, you need to provide context through Lore.
- Manual Lore: Add specific entries to the dashboard regarding recurring jokes, character names, or stream rules.
- Auto Lore: As you stream, the AI will observe facts and propose “Auto lore” drafts. You must review and approve these drafts in the dashboard before they become active.
Note: Lore limits vary by tier. See the Tier comparison for your specific limits.
Step 3: Create an AI Custom Command
Once your personality and lore are set, you can create a command that uses the AI engine.
- In the AI dashboard, navigate to the command management section.
- Create a new command (e.g.,
!roast). - Instead of entering a fixed text string, select the option to have the response generated by the AI.
- Save the command.
Note: AI commands count against your daily token budget, which resets at midnight UTC. See Tier comparison for per-tier token limits.
Worked Example: The !roast Workflow
Here is how the end-to-end process looks in a live chat environment:
- The Trigger: A viewer named “Alex” types
!roastin your chat. - Persona Retrieval: The module identifies “Alex” and retrieves their persona—a record of their tone and recurring topics observed from previous conversations.
- Context Synthesis: The AI synthesizes a response by combining:
- The Personality Prompt (e.g., “Sarcastic Robot”).
- The Channel Lore (e.g., “The streamer is obsessed with retro gaming”).
- The Viewer Persona (e.g., “Alex is a frequent supporter who loves jokes”).
- The Output: The bot identity posts a fresh, unique roast in chat: “Alex, you’ve been here for 50 hours and still haven’t mastered the jump button. Processing… error: skill not found.”
Managing Viewer Privacy
Because the AI builds personas based on chat interactions, viewers have the right to privacy. Viewers can opt out of the AI system at any time by typing !optout in your chat. Once opted out, they are excluded from all AI interactions and persona tracking.
For more advanced automation, see the AI — API endpoints documentation.
Share Feedback
Need help or want to chat? Join our Discord to get support, report bugs, and talk with other streamers.▸ What we're sending
| Module | — |
| Page | — |
| Browser | — |
| Screen | — |
| Channel | anonymous |
| Submitted | — |