BotOS

Turn your AI agent into a messaging bot — step by step

Your AI agent can live inside messaging apps. Users chat with it like a friend — no app to install, no website to visit.

Diagram

BotOS

sends message

delivers to

asks

replies

sends reply

shows reply

👤 User

📱 Messaging App

🤖 Your Bot

🧠 AI Agent


What Is a BotOS?

BotOS is your AI agent wrapped in a messaging app interface. Instead of typing prompts in a terminal, users send normal messages on Telegram, Discord, Slack, or WhatsApp.

ConceptWhat It Means
AgentThe AI brain — understands questions, uses tools, generates answers
BotThe messenger — receives messages from the app, sends them to the agent, delivers replies
PlatformWhere users chat — Telegram, Discord, Slack, or WhatsApp

Step-by-Step: How a Message Flows

Diagram
🧠 Agent🤖 Bot📱 Messaging App👤 User🧠 Agent🤖 Bot📱 Messaging App👤 User“What’s the weather?”Delivers message“What’s the weather?”Thinks + uses tools“It’s 72°F and sunny”Sends reply“It’s 72°F and sunny ☀️”
StepWhat Happens
1User types a message in their favorite app
2The messaging platform sends it to your bot
3Your bot passes the message to the AI agent
4The agent thinks, searches the web, checks documents — whatever you’ve configured
5The agent sends an answer back through the bot
6The user sees the reply in their chat

Which Platform Should I Use?

Diagram

My team at work

A community

Anyone with a phone

Yes, I have one

No, keep it simple

Who is the bot for?

💼 Slack

💬 Discord

Need a business account?

📲 WhatsApp

📱 Telegram

PlatformBest ForSetup Difficulty
TelegramPersonal bots, public bots, quick prototypes⭐ Easy
DiscordCommunities, gaming, developer groups⭐ Easy
SlackWorkplaces, teams, internal tools⭐⭐ Medium
WhatsAppBusiness communication, customer support⭐⭐⭐ Advanced

Getting Started — 3 Ways

Pick the way that fits you best:

Diagram

Choose Your Style

🖥️ CLI
One command, no code

🐍 Python
Full control

📄 YAML
Config file

CLI (Easiest)

No code needed. One command:

bash
# Telegram
praisonai bot telegram --token $TELEGRAM_BOT_TOKEN

# Discord
praisonai bot discord --token $DISCORD_BOT_TOKEN

# Slack
praisonai bot slack --token $SLACK_BOT_TOKEN --app-token $SLACK_APP_TOKEN

A default AI assistant is created automatically.

Python

python
from praisonaiagents import Agent
from praisonai.bots import TelegramBot

agent = Agent(
    name="assistant",
    instructions="You are a helpful assistant",
    llm="gpt-4o-mini"
)

bot = TelegramBot(token="YOUR_BOT_TOKEN", agent=agent)

import asyncio
asyncio.run(bot.start())

YAML

yaml
platform: telegram
token: "${TELEGRAM_BOT_TOKEN}"

agent:
  name: "My Assistant"
  instructions: "You are a helpful AI assistant."
  llm: "gpt-4o-mini"
bash
praisonai bot start --config bot.yaml

Adding Superpowers

Your bot can do more than just chat. Add capabilities with simple flags:

Diagram

🤖 Bot

🧠 Memory
Remembers conversations

📚 Knowledge
Answers from your docs

🌐 Web Search
Finds info online

💡 Thinking
Deeper reasoning

CapabilityCLI FlagWhat It Does
Memory--memoryRemembers what users said in previous messages. Safe for multi-worker deployments — messages survive concurrent updates
Knowledge--knowledgeAnswers from your PDF, text, or markdown files
Web Search--webSearches the internet for up-to-date info
Thinking--thinking highTakes more time to give better, deeper answers
bash
# A bot that remembers conversations and searches the web
praisonai bot telegram --token $TOKEN --memory --web

Bot vs Gateway

Two ways to deploy your agent for real-time chat:

Diagram

Gateway

Multiple platforms

Multiple agents

Bot

One platform

One agent

BotGateway
PlatformsOne at a timeAll at once
AgentsOne per botMultiple, with routing
Best forQuick start, single platformProduction, multi-channel
Commandpraisonai bot telegrampraisonai gateway --config gateway.yaml

Best Practices

Start with Telegram

Telegram is the easiest platform to set up — just message @BotFather and get a token in seconds.

Add memory for better conversations

Enable --memory so your bot remembers context between messages. Users get a much better experience.

Keep instructions simple

Write bot instructions like you’re talking to a person: “You are a helpful assistant for our customer support team. Be friendly and concise.”

Test locally, deploy with Docker

Use Socket Mode or polling for local testing. When ready for production, deploy with Docker and webhook mode.


Related