Discord Integration
Run your AVCodex agent inside the AVCodex builders community, your dealer support server, or your internal programmer Discord. Slash commands, @mentions, and DMs. Programmers ask, the agent answers, with full knowledge of your codebase and SOPs.
Deploy your AVCodex agent as a Discord bot. Users interact through slash commands, @mentions in server channels, and direct messages. Useful for the AVCodex builders community, a dealer-support Discord, or an internal "ask the codebase" channel for your Q-SYS team.
Note: Discord integration requires a Builder plan or higher. <a href="https://app.avcodex.com/plans" target="_blank" rel="noopener noreferrer" > Upgrade to Builder </a>
- Slash commands:
/askwith a question,/helpfor information - @mentions:
@YourBot what's the Crestron pin assignment for an HD-TX-301-C-E?in any server channel - Direct messages: Private conversations with the bot
- Conversational memory: Maintains context within session timeouts
- Knowledge base access: Uses your agent's knowledge sources (Crestron, QSC, Biamp docs) for informed responses
- Human takeover: Builders can take over conversations in real-time
1. Create a Discord Application
Visit the Discord Developer Portal and click New Application. Give it a name.
1. Go to the Bot section and click Add Bot 2. Click Reset Token to reveal your bot token (save it securely) 3. Enable Message Content Intent under Privileged Gateway Intents 4. Go to General Information and copy your Application ID and Public Key
2. Connect in AVCodex
In your agent's settings, find the Discord configuration and paste: - Bot Token (from step 1) - Application ID (from step 1) - Public Key (from step 1)
AVCodex will test the connection and register slash commands automatically.
3. Invite Bot to Your Server
Use the invite URL provided after connecting. Select the server(s) where you want the bot active. The bot receives permissions to send messages, embed links, read message history, and use slash commands.
4. Test It Out
Try these in your server: - Slash command: /ask What's the recommended Q-SYS Core for a 12-room corporate refresh? - Mention: @YourBot tell me about your capabilities - Direct message: Send any message to the bot privately - Help: /help to see available commands
Session Management#
The bot maintains conversation context within session timeouts:
| Channel Type | Session Timeout | Scope |
|---|---|---|
| Server channels | 30 minutes | Per user, per channel |
| Direct messages | 60 minutes | Per user |
After the timeout, a new conversation starts fresh. Your agent's knowledge sources provide persistent context across sessions.
Response Format#
Responses are sent as Discord embeds with your agent's branding. Long responses (over 2,000 characters, common when explaining a multi-step Q-SYS Designer config) are automatically split across multiple messages at natural breakpoints.
Slash Commands vs. Mentions#
| Method | How It Works | Best For |
|---|---|---|
| `/ask` | Deferred response (shows "thinking" status) | Structured queries |
| @mention | Real-time response via Gateway | Conversational flow |
| Direct message | Private 1:1 conversation | Client-sensitive deal info |
The bot inherits your agent's full configuration:
- LLM Model: Which AI model powers responses
- System prompt: Custom personality and instructions
- Knowledge sources: Manufacturer spec sheets, your SOPs, your control system code conventions
- Custom tools: Any HTTP actions or integrations you've configured
- Temperature: Creativity level for responses
No Discord-specific configuration is needed beyond the initial connection.
Discord uses your standard LLM token billing. There's no separate per-message fee. Each bot response consumes tokens based on the model and conversation length.
Bot not responding to mentions?
- Verify Message Content Intent is enabled in the Discord Developer Portal
- Confirm the bot is installed in the server
- Check the bot has permission to send messages in the channel
- Test the connection via the settings panel
Slash commands not appearing?
- Commands register globally and can take up to an hour to propagate
- Try the command in a different channel or server
Long response times?
- Slash commands show "thinking" status while processing
- Complex queries with large knowledge bases take longer (a 600-page Biamp spec library is heavy)
- Consider using a faster model for simpler use cases
Session history not persisting?
- Sessions time out after 30 minutes (channels) or 60 minutes (DMs)
- Start a new conversation by mentioning the bot or using
/ask
Note: MCP server access requires a Builder plan or higher. See the MCP Setup Guide to get started.
*AVCodex · Your AV expertise. Amplified by AI.*