Every PraisonAI bot comes with built-in chat commands. Just type a command in your chat — no setup required.
Built-in Commands
/status Shows agent name, model, platform, and uptime.
/new Resets the conversation session. Starts a fresh chat with the agent.
/help Lists all available commands (built-in + custom) with descriptions.
Quick Start
Set Your Bot Token
export TELEGRAM_BOT_TOKEN = your_token_here
Start the Bot
praisonai bot telegram --token $TELEGRAM_BOT_TOKEN
Send a Command
Open your bot chat and type: You’ll see the agent name, model, platform, and uptime.
praisonai bot telegram --token $TELEGRAM_BOT_TOKEN
Command Details
/status
Shows current bot information:
Field Description Agent Name of the AI agent Model LLM model being used Platform telegram, discord, slack, or whatsapp Uptime How long the bot has been running Running Whether the bot is currently active
/new
Resets the conversation:
Clears all previous messages from the agent’s session
Replies with a confirmation message
Next message starts a completely new conversation
/help
Lists all available commands — both built-in and custom — with their descriptions.
Commands work the same way on all platforms — Telegram, Discord, Slack, and WhatsApp. The / prefix is the default command prefix.
Custom Commands
Register your own commands using register_command(). Available on all bot adapters.
from praisonai . bots import TelegramBot
from praisonaiagents import Agent
agent = Agent ( name = " assistant " , instructions = " Be helpful " )
bot = TelegramBot ( token = " YOUR_TOKEN " , agent = agent )
# Register a custom command
async def handle_ping ( message ):
return " Pong! Bot is alive. "
bot . register_command ( " ping " , handle_ping , description = " Check if bot is alive " )
import asyncio
asyncio . run ( bot . start ())
# Now /ping is available alongside /status, /new, /help
register_command() API
bot . register_command (
name = " mycommand " , # Command name (without /)
handler = my_handler , # Async or sync callable
description = " What it does " , # Shown in /help
usage = " /mycommand <arg> " , # Optional usage string
channels =[ " telegram " ], # Optional: restrict to specific platforms
)
Parameter Type Required Description namestrYes Command name without / prefix handlerCallableYes Function to call. Receives a BotMessage argument descriptionstrNo Human-readable description (shown in /help) usagestrNo Usage example string channelslist[str]No Restrict to specific platforms (e.g., ["telegram", "slack"]). Empty = all platforms
list_commands()
Get all registered commands:
commands = bot . list_commands ()
# Returns: [ChatCommandInfo(name="status", ...), ChatCommandInfo(name="new", ...), ...]
# Filter by platform
telegram_commands = bot . list_commands ( platform = " telegram " )
Python Usage
Start bots programmatically — built-in commands are always available:
Telegram
Discord
Slack
WhatsApp
from praisonai . bots import TelegramBot
from praisonaiagents import Agent
agent = Agent ( name = " assistant " , instructions = " Be helpful " )
bot = TelegramBot ( token = " YOUR_TOKEN " , agent = agent )
import asyncio
asyncio . run ( bot . start ())
# /status, /new, /help available automatically
Bot tokens should never be hardcoded. Use environment variables or a .env file to store them securely.