Skip to main content
The Discord interface lets you serve Agno agents, teams, and workflows as Discord bots. It supports two concurrent transports: HTTP webhook (slash commands) and Gateway WebSocket (@mentions and DMs).

Key Features

  • Dual transport - Slash commands via HTTP webhook and @mentions/DMs via Gateway WebSocket
  • Streaming responses - Progressively updates messages as content is generated (Agent and Team)
  • Thread support - Auto-creates threads for each conversation, keeping channels clean
  • Full media support - Handles image, video, audio, and file attachments in both directions
  • Works with Agent, Team, and Workflow - Any Agno entity can power a Discord bot

Quick Start

from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.os import AgentOS
from agno.os.interfaces.discord import Discord

agent = Agent(name="Bot", model=OpenAIChat(id="gpt-4o-mini"))

agent_os = AgentOS(
    agents=[agent],
    interfaces=[Discord(agent=agent, stream=True)],
)
app = agent_os.get_app()

Required Configuration

VariableDescription
DISCORD_BOT_TOKENBot token from the Discord Developer Portal
DISCORD_PUBLIC_KEYApplication public key for webhook signature verification
DISCORD_APPLICATION_IDApplication ID for webhook API calls

Resources