Skip to main content

MNKY Discord Agent Bots

The MNKY Discord bots extend the three agents (MOOD MNKY, SAGE MNKY, CODE MNKY) into Discord with slash commands, event ingestion for gamification, and agent replies via the web app.

Architecture

  • Location: services/discord-bots/ in the monorepo
  • Stack: Redis + three Node.js bots (Discord.js), built and run via Docker Compose
  • Orchestration: Bots call the web app for profile resolution (GET /api/discord/profile-by-discord-id), event ingestion (POST /api/discord/events), and agent replies (POST /api/discord/agent-reply). Auth: MOODMNKY_API_KEY (Bearer)

Slash commands

BotCommands
MOOD MNKY/mood (query), /scent (fragrance), /blend (theme), /verse (link to MNKY VERSE)
SAGE MNKY/sage (question), /reflect (topic), /learn (topic), /dojo (link to Dojo)
CODE MNKY/code (question), /deploy (context), /pr (topic), /lab (link to MNKY LABZ)
Commands are registered automatically when each bot starts.

Docker Compose

From services/discord-bots/:
docker compose up -d
Services: redis, mood-mnky-bot, sage-mnky-bot, code-mnky-bot. Set env via .env (copy from .env.example). See repo services/discord-bots/README.md for quick start.

Environment variables

Required: bot tokens (MOOD_MNKY_DISCORD_BOT_TOKEN, SAGE_MNKY_DISCORD_BOT_TOKEN, CODE_MNKY_DISCORD_BOT_TOKEN), MOODMNKY_API_KEY, VERSE_APP_URL, REDIS_URL. Tokens come from Notion Credentials; create three Discord applications in the Discord Developer Portal.

Gamification

When a user with a linked Discord account (Verse → Link Discord) uses a slash command, the bot sends a message event to the web app. Events flow to discord_event_ledger and trigger quest evaluation and XP.