Skip to content

sleroq/slusha

Repository files navigation

Slusha

Smartest girl in telegram.

Try it out - @sl_chatbot yourself or check out quotes - @slushaquotes

Features

  • Human-like responses in multiple messages Multi-line responses
  • Characters from Chub.ai Character selection
  • Video, voice, photo, round videos, stickers input support (and more) Media support showcase
  • Long-term memory and chat summary command
  • Smart replies with ability to answer multiple people in one go Smart reply
  • Extensive per-chat configuration
  • Undertanding of Telegram-specific features, like reply threads, via bot messages, quotes and forwards
  • Optional AI telemetry for debugging and cost/prompt review Langfuse screenshot

Requirements

  • deno
  • gemini api key (or other supported by ai-sdk)

Preparation

  1. cp scripts/env.bash.example scripts/env.bash
  2. set up environment variables

Start:

scripts/run.bash

Config web widget (Telegram Mini App)

  • Set WIDGET_BASE_URL to your public bot URL (example: https://example.com)
  • Optional web server env vars: WEB_HOST (default 0.0.0.0), WEB_PORT (default 8080)
  • Build widget assets (Deno-first):
scripts/build-widget.bash
  • Use /config in chat (/config global for global config)

Metrics (Prometheus + Grafana)

  • slusha_http_requests_total
  • slusha_http_request_duration_seconds
  • slusha_telegram_updates_total
  • slusha_telegram_handler_errors_total
  • slusha_ai_requests_total
  • slusha_ai_request_duration_seconds
  • slusha_ai_failures_total
  • slusha_ai_finish_reason_total
  • slusha_ai_tokens_total
  • slusha_rate_limit_exceeded_total
  • slusha_usage_downgraded_total
  • slusha_process_uptime_seconds
  • slusha_process_resident_memory_bytes

Prometheus scrape config

Add a target in your prometheus.yml:

scrape_configs:
  - job_name: slusha
    metrics_path: /metrics
    static_configs:
      - targets:
          - localhost:8080

If Slusha runs in Docker or another host, replace localhost:8080 with the reachable address.

Grafana dashboard

Import the dashboard JSON from:

  • grafana/slusha-observability-dashboard.json

In Grafana:

  1. Go to Dashboards -> Import
  2. Upload grafana/slusha-observability-dashboard.json
  3. Select your Prometheus datasource when prompted

Docker Production

# Build and run
docker build -t slusha-bot .
docker run -d \
  --name slusha-bot \
  --restart unless-stopped \
  -e BOT_TOKEN=your_bot_token \
  -e AI_TOKEN=your_ai_token \
  slusha-bot

# Using Docker Compose
docker-compose --profile production up -d slusha-prod