Bot Integration¶
KITT provides Slack and Discord bots that let team members trigger benchmarks and view results directly from chat.
Installation¶
The bot dependencies are optional extras:
# Slack (uses slack-bolt)
poetry install -E slack
# Discord (uses discord.py)
poetry install -E discord
Slack Bot Setup¶
- Create a Slack app at https://api.slack.com/apps.
- Enable Socket Mode and generate an app-level token (
xapp-...). - Under Slash Commands, add a
/kittcommand. - Install the app to your workspace and copy the bot token (
xoxb-...). - Start the bot:
The Slack bot uses slack-bolt in Socket Mode, so no public URL or ingress is
required. The /kitt slash command accepts the same arguments as the CLI.
Discord Bot Setup¶
- Create a Discord application at https://discord.com/developers.
- Under Bot, create a bot and copy the token.
- Enable the Message Content Intent under Privileged Gateway Intents.
- Generate an invite URL with the Send Messages permission and add the bot to your server.
- Start the bot:
The Discord bot listens for messages prefixed with !kitt and responds with
benchmark results.
Bot Commands¶
Both platforms support the same core commands:
| Command | Description |
|---|---|
run -m MODEL -e ENGINE -s SUITE |
Start a benchmark |
engines list |
List available engines |
results list |
List stored results |
status |
Show current run status |
Configuration Reference¶
View setup instructions for both platforms:
This prints step-by-step instructions for creating the Slack and Discord applications, obtaining tokens, and starting the bot.
Running in Production¶
For long-lived deployments, run the bot as a systemd service:
[Unit]
Description=KITT Slack Bot
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/local/bin/kitt bot start --platform slack --token xoxb-... --app-token xapp-...
Restart=on-failure
[Install]
WantedBy=multi-user.target
Store tokens in environment variables or a secrets manager rather than passing them directly on the command line in production.