A Slack agent that uses the Real-Time Search (RTS) API to help users find solutions to past problems in a help channel.
- Real-Time Search: Searches Slack messages in real-time using the RTS API
- Bot Mentions: Responds when @mentioned in channels
- Direct Messages: Handles direct messages for private queries
- Context-Aware: Returns relevant past conversations with solutions
- Node.js (v14 or higher)
- npm or yarn
- Slack app with the following scopes:
assistant.search.context(for RTS API)channels:historychannels:readchat:writeim:write
-
Clone the repository
-
Install dependencies:
npm install
-
Create a
.envfile with your Slack credentials:SLACK_BOT_TOKEN=xoxb-your-bot-token SLACK_USER_TOKEN=xoxp-your-user-token PORT=3000 SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/WEBHOOK/URL BOTS_TO_IGNORE=POC App,Demo Bot,Test Bot
Development mode (with auto-reload):
npm run devProduction mode:
npm startThe app will start on http://localhost:3000
- Invite the bot to your help channel
- Mention the bot with your problem:
@Help-Agent My database connection is timing out - The bot will search for similar past problems and return relevant solutions
- Open a direct message with the bot
- Describe your problem:
I'm getting a 404 error when accessing the API - The bot will search and return relevant past solutions
The project includes a script for testing Slack webhook notifications. This is intended for development/testing purposes only.
-
Add your Slack incoming webhook URL to your
.envfile:SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/WEBHOOK/URL
-
Run the deployment alert script with a test message:
node scripts/send-deployment-alert.js "Test deployment tag 2.3.4 to staging failed"You can also test a failed deployment message:
node scripts/send-deployment-alert.js "Deployment tag 2.3.4 failed on production successfully"
Note: This webhook testing script is for development purposes only and should not be used in production environments.
slack-poc/
├── .env # Environment variables (tokens)
├── .gitignore # Git ignore file
├── package.json # Dependencies
├── server.js # Express server for Slack events
├── bot.js # Bot logic for handling messages
├── rts-search.js # Real-Time Search API integration
└── README.md # Documentation
- Slack Real-Time Search API: For searching messages in real-time
- Slack Bolt SDK: For Slack app integration
- Express: For HTTP server
- Node.js: Runtime environment
This project is submitted for the Slack Agent Builder Challenge in the New Slack Agent track.
- ✅ Real-Time Search API
- New Slack Agent
- Integrate with an LLM to synthesize and summarize search results
- Add MCP Server integration for standardized tool access
- Implement feedback mechanism to improve search relevance
- Add support for file search (attachments, documents)
- Create a knowledge base from resolved issues