This Slack bot integrates Athena Copilot's capabilities directly into your Slack workspace, allowing you to interact with your knowledge base (Brain) seamlessly.
- Chat with your Brain directly in Slack channels
- Retrieve information from your knowledge base quickly
- Continuous conversation in threads
- Easy setup and configuration
To add Athena Copilot to your Slack workspace, visit:
https://get-slack.athenacopilot.ai/slack/install
After installation, an admin needs to set up the bot. This can be done either through the app home or by sending a message in a channel where the bot is present.
-
You'll need your User ID and API Key. Follow the instructions at https://docs.athenacopilot.ai/Authentication to obtain these.
-
You'll also need a Brain UUID. To get this, open the brain page in Athena Copilot and copy the last part of the URL. For example, from
https://app.athenacopilot.ai/brain/bc4828ef-f17d-4269-9b9b-dd2103281bf4
, the Brain UUID would bebc4828ef-f17d-4269-9b9b-dd2103281bf4
. -
Follow the prompts in Slack to enter this information and complete the setup.
Once set up, you can interact with Athena Copilot in any channel where it's been added:
- Start a new conversation by mentioning the bot. For example:
@Athena Copilot what is react?
- The bot will create a thread with its response.
- Continue the conversation by replying in the thread and mentioning the bot again.
- To start a new conversation, simply send a new message in the channel mentioning the bot.
If you're looking to contribute or run your own instance, follow these steps:
- Clone the repository
- Install dependencies:
pnpm install
- Set up your environment variables (see below)
- Set up the database:
- Make sure your
DATABASE_URL
is set correctly in the.env
file - Run
npx prisma generate
to generate Prisma client - Run
npx prisma db push
to create the database tables based on the Prisma schema
- Make sure your
- Build the project:
pnpm run build
- Start the bot:
pnpm run start
For development, you can use: pnpm run dev
Create a .env
file with the following variables:
SLACK_BOT_TOKEN=
SLACK_SIGNING_SECRET=
SLACK_CLIENT_ID=
SLACK_CLIENT_SECRET=
SLACK_STATE_SECRET=
NGROK_AUTH_TOKEN=
NGROK_HOSTNAME=
PORT=
NODE_ENV="development"
DATABASE_URL=
This project uses Prisma as an ORM. The Prisma schema is already included in the project. To set up your database:
- Ensure your
DATABASE_URL
is correctly set in the.env
file. - Run
npx prisma generate
to generate the Prisma client. - Run
npx prisma db push
to create the database tables based on the Prisma schema.
If you need to make changes to the database schema, update the prisma/schema.prisma
file and run npx prisma db push
again.
Use this manifest when creating your Slack app (replace placeholders with your actual values):
{
"display_information": {
"name": "Athena Copilot",
"description": "Enterprise Search Powered by Gen AI",
"background_color": "#514287"
},
"features": {
"app_home": {
"home_tab_enabled": true,
"messages_tab_enabled": false,
"messages_tab_read_only_enabled": true
},
"bot_user": {
"display_name": "Athena Copilot",
"always_online": true
}
},
"oauth_config": {
"redirect_urls": ["https://{your-domain}/slack/oauth_redirect"],
"scopes": {
"bot": [
"app_mentions:read",
"channels:history",
"channels:read",
"chat:write",
"chat:write.public",
"groups:history",
"incoming-webhook",
"reactions:read",
"users.profile:read",
"users:read",
"reactions:write"
]
}
},
"settings": {
"event_subscriptions": {
"request_url": "https://{your-domain}/slack/events",
"bot_events": [
"app_home_opened",
"app_mention",
"message.channels",
"message.groups",
"reaction_added"
]
},
"interactivity": {
"is_enabled": true,
"request_url": "https://{your-domain}/slack/events"
},
"org_deploy_enabled": true,
"socket_mode_enabled": false,
"token_rotation_enabled": false
}
}
Replace {your-domain} with your actual domain or ngrok URL when setting up the app.
We welcome contributions! Please see our contributing guidelines for more information.