Skip to main content
The Discord integration connects any Agno agent to Discord via the Gateway API, so you don’t need to set up webhooks.

Quick Start

discord_agent.py
from agno.agent import Agent
from agno.models.openai import OpenAIResponses
from agno.integrations.discord import DiscordClient

agent = Agent(name="Assistant", model=OpenAIResponses(id="gpt-5.4"))

discord_client = DiscordClient(agent)

if __name__ == "__main__":
    discord_client.serve()
uv pip install agno discord.py openai
python discord_agent.py

How It Works

ConceptBehavior
GatewayDirect connection to Discord, no webhooks or tunnels needed
ThreadsAuto-creates threads for conversations with isolated context
IntentsRequires Message Content Intent enabled in Developer Portal
PermissionsSend Messages, Read History, Create Threads, Attach Files

Setup

You need a Discord Application with a bot user. Create one in the Discord Developer Portal. Then set your bot token as an environment variable:
export DISCORD_BOT_TOKEN="..."

Next Steps

Full Guide

Bot setup, threads, intents, and permissions.

Examples

Basic agent, media handling, and user memory.

DiscordTools

Give agents channel, message, and reaction capabilities.

Discord Developer Portal

Create and manage your Discord application.