Skip to content

RunMaestro/Maestro-Discord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord Maestro Bot

Made with Maestro

A Discord bot that connects your server to Maestro AI agents through maestro-cli.

Features

  • Creates dedicated Discord channels for Maestro agents
  • Queues messages per channel for orderly processing
  • Streams agent replies back into Discord, including usage stats

Prerequisites

  • Node.js 18+
  • A Discord application + bot token
  • Maestro CLI installed and authenticated

CLI docs: https://docs.runmaestro.ai/

Quick start

  1. Install dependencies:
npm install
  1. Configure environment:
cp .env.example .env

Set these values in .env:

DISCORD_BOT_TOKEN=   # Bot token from Discord Developer Portal
DISCORD_CLIENT_ID=   # Application ID from Discord Developer Portal
DISCORD_GUILD_ID=    # Your server's ID (right-click server → Copy ID)
  1. Deploy slash commands:
npm run deploy-commands
  1. Start the bot (dev mode):
npm run dev

Production run

npm run build
npm start

Tests

node --test --import tsx

Coverage:

node --test --experimental-test-coverage --import tsx

Slash commands

Command Description
/health Verify Maestro CLI is installed and working
/agents list Show all available agents
/agents new <agent-id> Create a dedicated channel for an agent
/agents disconnect (Run inside an agent channel) Remove and delete the channel

How it works

  • /agents list reads running agents from Maestro.
  • /agents new creates a text channel under the Maestro Agents category.
  • Messages in agent channels are queued and forwarded to maestro-cli.
  • The bot adds a ⏳ reaction while waiting, shows typing, and splits long replies.
  • After each response, it posts a small usage footer with tokens, cost, and context.

Data storage

The bot stores channel ↔ agent mappings in a local SQLite database at maestro-bot.db. Delete this file to reset all channel bindings.

Discord bot permissions

  • Read Messages / View Channels
  • Send Messages
  • Manage Channels
  • Add Reactions
  • Read Message History

Security note

Only invite this bot to private servers you trust. There is currently no access control beyond Discord permissions.

Troubleshooting

  • If /health fails, ensure maestro-cli is on your PATH and you are logged in.
  • If commands don’t appear, re-run npm run deploy-commands after updating your bot or application settings.

About

Discord Bot for chatting with your Maestro Agents

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors