cortex discord

Run a Discord bot that connects Cortex agents to Discord servers. The bot responds to messages using Cortex agents, providing AI-powered chat directly in Discord channels.

Usage

cortex discord [options]

Options

OptionDescription
--token, -tDiscord bot token
--prefixCommand prefix for bot messages (default: !cortex)
--model, -mModel to use for Discord responses
--helpShow help for this command

Setup

  1. Create a Discord application at https://discord.com/developers
  2. Add a bot to your application
  3. Copy the bot token
  4. Invite the bot to your server with appropriate permissions

Configuration

Discord configuration can also be set in ~/.cortex/config.json:

{
  "discord": {
    "token": "<bot-token>",
    "prefix": "!cortex",
    "model": "claude-sonnet-4-5"
  }
}

Examples

# Start the Discord bot
cortex discord -t <your-bot-token>

# Start with custom prefix
cortex discord -t <token> --prefix "!agent"

# Start with specific model
cortex discord -t <token> -m gpt-4o