This project is actively under development. New features and improvements are being added regularly.
- 🔌 Pluggable LLM Backend: Use any LLM service (OpenAI, Anthropic, or your own) by configuring the endpoint
- 🔐 Optional User Authentication: Built-in Prisma-based user management system
- 💾 Efficient Caching: Optimized response times with built-in caching
- 🎯 Modular Design: Enable/disable features based on your needs
- 🔄 Real-time Updates: Socket mode for instant message handling
- 📝 Conversation Context: Maintains chat history for better responses
The standout feature of this package is its ability to connect to any LLM backend service. This flexibility means you can:
- 🏢 Use your company's private LLM deployment
- 🔄 Switch between different LLM providers
- 🛠️ Implement custom preprocessing/postprocessing
- 💰 Control costs by managing requests
- 🔒 Maintain data privacy by keeping sensitive information in-house
Here's a glimpse of the Slack AI Assistant in action:
- Create a Slack App in your workspace with assistant .
For More reference : https://tools.slack.dev/bolt-js/getting-started
- Enable Socket Mode in your Slack App settings
npm install slack-ai-app-retoolify
- Create a
.env
file in your project root:
# Required: Slack Configuration
SLACK_BOT_TOKEN=xoxb-your-bot-token # Found in OAuth & Permissions
SLACK_SIGNING_SECRET=your-signing-secret # Found in Basic Information
SLACK_APP_TOKEN=xapp-your-app-token # Generated when enabling Socket Mode
# Optional: LLM Configuration
LLM_API_URL=your-llm-endpoint # Your LLM service endpoint
- Initialize and start the app:
require('dotenv').config();
const SlackAIApp = require('slack-ai-app-retoolify');
const app = new SlackAIApp({
SLACK_BOT_TOKEN: process.env.SLACK_BOT_TOKEN,
SLACK_SIGNING_SECRET: process.env.SLACK_SIGNING_SECRET,
SLACK_APP_TOKEN: process.env.SLACK_APP_TOKEN,
LLM_API_URL: process.env.LLM_API_URL, // Optional
enableUserIdentification: false // Optional: Enable user auth
});
app.start();
If you want to enable user authentication:
- Install Prisma:
npm install @prisma/client
npx prisma init
- Add this schema to
prisma/schema.prisma
:
model Users {
id Int @id @default(autoincrement())
name String
email String @unique
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
isDeleted Boolean @default(false)
isActive Boolean @default(true)
slackUser String? @unique
}
- Set up your database:
npx prisma migrate dev
- Update your configuration:
DATABASE_URL="your-database-url"
ENABLE_USER_IDENTIFICATION=true
Contributions are welcome! Feel free to:
- 🐛 Report bugs
- 💡 Suggest features
- 🔧 Submit pull requests
If you like this app and want to build similar features for your custom use case, feel free to connect with me:
Made with ❤️ by Vijay Singh