mirror of
https://github.com/MervinPraison/PraisonAI.git
synced 2026-11-08 17:31:00 -10:00
14 lines
420 B
Python
14 lines
420 B
Python
"""Discord Approval — route tool approvals to a Discord channel."""
|
|
|
|
from praisonaiagents import Agent
|
|
from praisonai.bots import DiscordApproval
|
|
|
|
agent = Agent(
|
|
name="assistant",
|
|
instructions="Help users with system tasks",
|
|
tools=["execute_command"],
|
|
approval=DiscordApproval(channel_id="YOUR_CHANNEL_ID"), # token from DISCORD_BOT_TOKEN env
|
|
)
|
|
|
|
agent.start("List the files in the current directory")
|