Overview
Onyx can connect to your Slack workspace and answer questions. You can configure OnyxBot to respond to certain types of messages, in specific channels, and with selected data from your index.
Setup
Create a new Slack App
Use the YAML manifest
Generate an App Token
connections:write scope to the app-level token and click Generate.
Save this token for later.
Install the Slack App

Setup Onyx for the Slack Bot

Configure the Slack Bot's Behavior

Channel Configuration Options
For the default configuration and for each channel, you can set:- Agent: the Agent that answers in the channel. Use an Agent with a narrow knowledge scope so the bot does not answer from private data.
- Document Sets: limit the search to selected Document Sets.
- Respond to tags only: answer only when a user tags @OnyxBot or sends a DM, instead of every message.
- Only respond if citations found: stay silent when the answer has no supporting documents.
- Respond to user in a private (ephemeral) message: show the answer only to the person who asked. They can click Show everyone to share it.
- Respond to specific users or groups: limit who can trigger the bot in the channel.
- Follow-up tags: Slack users or groups to notify when a user asks for a human follow-up.
- Standard answer categories (Business plan and higher): post a predefined answer when a message matches a keyword.
How to use the Onyx Slack Bot
There are a few ways to chat with the Onyx Slack bot:Tag the bot with your question
Tag the bot with your question
Use a slash command
Use a slash command
Send a message in a channel with the bot added
Send a message in a channel with the bot added
Direct message the bot
Direct message the bot
Advanced Configuration (Self-Hosted)
Self-hosted deployments can set environment variables on the background worker that runs the Slack bot to change its behavior. You can find the full list of configuration options in the Onyx GitHub.ONYX_BOT_NUM_RETRIES
ONYX_BOT_NUM_RETRIES
5 (int)ONYX_BOT_NUM_DOCS_TO_DISPLAY
ONYX_BOT_NUM_DOCS_TO_DISPLAY
5 (int)ONYX_BOT_DISABLE_DOCS_ONLY_ANSWER
ONYX_BOT_DISABLE_DOCS_ONLY_ANSWER
false (bool)ONYX_BOT_REACT_EMOJI
ONYX_BOT_REACT_EMOJI
eyes (str)ONYX_BOT_FOLLOWUP_EMOJI
ONYX_BOT_FOLLOWUP_EMOJI
sos (str)ONYX_BOT_FEEDBACK_VISIBILITY
ONYX_BOT_FEEDBACK_VISIBILITY
private (only the clicking user),
anonymous (public but anonymous), public (public with username).Default: private (str)NOTIFY_SLACKBOT_NO_ANSWER
NOTIFY_SLACKBOT_NO_ANSWER
false (bool)ONYX_BOT_DISPLAY_ERROR_MSGS
ONYX_BOT_DISPLAY_ERROR_MSGS
false (bool)ONYX_BOT_MAX_QPM
ONYX_BOT_MAX_QPM
0 or leave unset for uncapped.Default: uncapped (int)ONYX_BOT_MAX_WAIT_TIME
ONYX_BOT_MAX_WAIT_TIME
180 (seconds; 3 minutes)ONYX_BOT_FEEDBACK_REMINDER
ONYX_BOT_FEEDBACK_REMINDER
0 to disable.Default: 0 (disabled; 0 minutes)ONYX_BOT_RESPONSE_LIMIT_PER_TIME_PERIOD
ONYX_BOT_RESPONSE_LIMIT_PER_TIME_PERIOD
0 to disable the limit.Default: 5000 (int)ONYX_BOT_RESPONSE_LIMIT_TIME_PERIOD_SECONDS
ONYX_BOT_RESPONSE_LIMIT_TIME_PERIOD_SECONDS
86400 (seconds; 24 hours)