Guide
Connect Twitch Chat to Your AI Agent
An agent in your Twitch chat can answer the same three questions you get every stream, keep an eye on chat while you play, and react to what people actually say rather than to fixed commands.
Read the Token Warning First
This is the thing that catches everyone. The quick way to get a Twitch token is a generator site, and those tokens last a few hours and cannot be refreshed automatically. Your bot works during setup, works during your test, and is silently dead by the next stream.
So decide up front: either accept that you regenerate the token before each session, or register a proper Twitch application so you get a refreshable token. For anything you rely on, do the second one.
Install the Plugin
From your instance's Web Terminal:
openclaw plugins install @openclaw/twitchInstalling registers and enables it. This channel needs a reasonably recent OpenClaw build, which a hosted instance will already have.
Get a Token
Create a separate Twitch account for the bot rather than using your own — you want chat to show the bot as its own name, and you do not want your streaming account's credentials on a server.
Sign in as that bot account when you generate the token, not as yourself. Getting this backwards is why people end up with an agent posting under their main handle.
Configure and Run
Add the token to the channel config and start the gateway:
openclaw gateway runThe token can also come from an environment variable rather than sitting in the config file, which is the neater option if you rotate it often.
Access Control
Twitch chat is public by definition — everyone watching can talk to your agent. That is the point, and it is also the cost: every message is an opportunity for someone to waste your model credits or bait the bot into saying something you would rather it did not.
Decide deliberately whether the agent replies to everyone or only when addressed. On a busy stream, requiring a mention is the difference between a helpful bot and an expensive one.
Troubleshooting
- It worked yesterday and is silent today. The token expired. This is almost always the answer.
- It posts under the wrong account. The token was generated while signed in as your main account.
- It joins but never speaks. It is likely waiting to be mentioned, or it lacks permission to post in that channel.
- Chat is spamming it. Require a mention, and consider limiting how often it replies.
Need a Hand?
Contact support from your dashboard and we will get it connected. Never paste the token into chat — treat it like a password, and regenerate it at Twitch if it has ever been shared.