Boo — the (un)friendly Discord AI bot
A snark-powered Discord bot that blends LLM chat, image understanding, and handy utilities into a single docker-compose stack. Built for servers that want a fast, context-aware assistant with guardrails, a tiny admin API, and a smooth UX.
Overview
Boo is a production-ready Discord bot that brings AI-powered conversations, automatic image analysis, and useful utilities to your server. Unlike simple chatbots, Boo maintains context across conversations, understands images, and provides a web-based admin panel for managing system prompts and monitoring usage.
The entire stack runs in Docker Compose—no complex setup required. Just configure your API keys and you're ready to go.
Key Features
Architecture
Boo is built as a multi-service architecture running in Docker Compose:
Quick Start
# Clone the repository
git clone https://github.com/VVIP-Kitchen/boo.git
cd boo
# Create .env file with your API keys
cp .env.example .env
# Edit .env with your Discord token, API keys, etc.
# Bring the stack up
docker compose up -d
# Open admin panel at http://localhost:8080Commands
Configuration
Boo requires several API keys and configuration options:
# Discord
DISCORD_TOKEN=YOUR_DISCORD_BOT_TOKEN
ADMIN_LIST=123456789012345678,987654321098765432
CONTEXT_LIMIT=40
# APIs
TENOR_API_KEY=XXXXXXXXXXXX
TOMORROW_IO_API_KEY=XXXXXXXXXXXX
OPENROUTER_API_KEY=XXXXXXXXXXXX
OPENROUTER_MODEL=meta-llama/llama-4-maverick
TAVILY_API_KEY=XXXXXXXXXXXX
MANAGER_API_TOKEN=super-secure-shared-secret
# Database (compose wires these for containers)
POSTGRES_USER=db-user
POSTGRES_PASSWORD=db-password
POSTGRES_DB=db-nameManager API
The Go-based manager API provides a RESTful interface for managing prompts and viewing analytics:
GET /docs— Swagger UI documentationGET /admin— Web-based prompt manager UIGET /prompt?guild_id=...— Fetch per-guild system promptPOST /prompt— Add new promptPUT /prompt?guild_id=...— Update existing promptPOST /message— Archive messagesPOST /token— Record token usageGET /token/stats— View usage statistics
🔐 All API calls require Authorization: Bearer <MANAGER_API_TOKEN> header for authentication.
Tech Stack
Features in Detail
Context Management
Boo maintains conversation context using Redis as a rolling buffer. Each channel gets its own context window (configurable via CONTEXT_LIMIT), and messages older than 15 minutes are automatically pruned. This ensures relevant, recent context without unbounded memory growth.
Image Understanding
When images are uploaded, Boo automatically analyzes them using vision models via OpenRouter. Multi-image messages are processed sequentially, and the bot incorporates visual understanding into its conversational responses.
Inclusive Language
Boo includes optional "guys-check" functionality that gently nudges users toward more inclusive language. This feature can be customized or disabled based on your server's preferences.
Rate Limiting
Built-in rate limit handling ensures the bot gracefully handles API throttling. If OpenRouter returns a 429 status, Boo relays the retry ETA to users instead of silently failing.
Extensibility
- Add commands: Create a new cog in
src/commandsand load it inbot/bot.py - Swap LLMs: Change
OPENROUTER_MODELor extendLLMServicefor different providers - Storage: Extend manager internal services and Python
DBServicefor more analytics - Emoji/stickers: Tweak
utils/emoji_utils.pyto adjust patterns and rendering
Repository Structure
compose.yml: 4-service orchestration (postgres, redis, manager, bot)Dockerfile: Python 3.12 base with uv for the Discord botsrc/: Discord bot implementation with cogs, commands, and servicesmanager/: Go API + static Tailwind UI for prompts and analyticsmodal/: Serverless functions for ASR and embeddingssandbox/: Isolated Python execution environment