A Site Reliability Engineering (SRE) bot that integrates with Slack, GitHub, and Checkly to help manage incidents and improve Mean Time To Resolution (MTTR).
- Real-time incident management through Slack
- Integration with Checkly for monitoring alerts
- GitHub integration for tracking releases and changes
- AI-powered assistance using OpenAI
- Automatic context aggregation for incidents
- Node.js v22.11.0
- Docker and Docker Compose
- PostgreSQL (via Docker or local installation)
- Accounts and API keys for:
- OpenAI
- Slack
- GitHub
- Checkly
Duplicate the env.example
file in the root directory and add your keys as per requirements
The project uses PostgreSQL as its database. To set it up using Docker:
- Start the PostgreSQL container:
docker compose up -d
- Run database migrations:
npm run db:migrate
- (Optional) To explore the database using Prisma Studio:
npm run db:studio
To reset the database if needed:
docker compose down -v # Remove containers and volumes
docker compose up -d # Start fresh
npm run db:migrate # Run migrations again
- Install dependencies:
npm install
- Initialize the OpenAI assistant:
- First, get your OpenAI API key from https://platform.openai.com/api-keys
- Add the API key to your .env file
- Create the assistant by running:
npx ts-node scripts/init-assistant.ts
Go to https://platform.openai.com/assistants to find your assistant ID
There are several ways to run the application depending on your needs:
npm run dev
npm run bot:start
npm run build
npm start
npm test
/src/aggregator
: Context aggregation logic for incidents/src/ai
: AI assistant and tool implementations/src/checkly
: Checkly API integration/src/github
: GitHub API integration/src/routes
: API routes for webhooks/src/slackbot
: Slack bot implementation/src/sre-assistant
: Main SRE assistant logic/prisma
: Database schema and migrations
npm run dev
: Start development servernpm run bot:start
: Start Slack bot onlynpm run build
: Build the applicationnpm start
: Start the built applicationnpm test
: Run testsnpm run db:migrate
: Run database migrationsnpm run db:studio
: Open Prisma Studionpm run db:deploy
: Deploy database migrationsnpm run db:generate
: Generate Prisma client
- Create a new Slack app in your workspace: https://api.slack.com/apps
- Configure Bot Token Scopes:
- chat:write
- app_mentions:read
- commands
- Install the app to your workspace
- Copy the signing secret, bot token, and app token to your .env file
- Create a Personal Access Token with repo permissions
- Configure webhook in your organization/repository:
- Payload URL: your-server/github-webhook
- Content type: application/json
- Secret: Same as GH_WEBHOOK_SECRET in .env
- Events: Release events
- Get your API key and Account ID from Checkly: https://app.checklyhq.com/
- Configure webhook in Checkly:
- URL: your-server/checkly-webhook
- Select relevant alert types
ISC License - see the LICENSE file for details