Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
from agno.agent import Agent from agno.app.discord import DiscordClient from agno.models.openai import OpenAIChat basic_agent = Agent( name="Basic Agent", model=OpenAIChat(id="gpt-4o"), add_history_to_messages=True, num_history_responses=3, add_datetime_to_instructions=True, ) discord_agent = DiscordClient(basic_agent) if __name__ == "__main__": discord_agent.serve()
创建虚拟环境
Terminal
python3 -m venv .venv source .venv/bin/activate
设置您的 API 密钥
export OPENAI_API_KEY=xxx export DISCORD_BOT_TOKEN=xxx
安装库
pip install -U agno openai discord.py
运行 Agent
python cookbook/apps/discord/basic.py