Skip to main content
Proactive delivery lets your bot push messages outbound — reply back to the requesting chat, deliver to a home channel set with /sethome, or target explicit delivery tokens without hardcoding IDs in every job.

Home Channels (/sethome)

Mark a chat once as the platform default for scheduled deliveries. Settings persist to ~/.praisonai/state/home_channels.json.
# In Telegram (or any bot chat):
/sethome

# Then schedule without a numeric chat id:
praisonai schedule add "daily-news" -s daily -m "Summarise AI news" --deliver telegram
Delivery tokenResolves to
originChat where the job was created (--channel + --channel-id required at creation)
<platform> (e.g. telegram)That platform’s home channel from /sethome
<platform>:<chat_id>[:<thread_id>]Explicit target
allFan-out to every platform with a configured home channel
See Bot Chat Commands for the /sethome command.

Quick Start

1

Reply to where the request came from

from praisonai.bots import BotOS, Bot, SessionSource
from praisonaiagents import Agent
import asyncio

agent = Agent(name="ops", instructions="You alert humans about incidents.")
botos = BotOS(bots=[Bot("telegram", agent=agent)])

botos.configure_channels({
    "telegram": {"home_channel": "123456", "aliases": {"ops-alerts": "123456"}},
})

async def notify():
    src = SessionSource(platform="telegram", channel_id="123456")
    await botos.deliver("origin", "Build finished!", origin=src)

asyncio.run(notify())
2

Send to a platform's default channel

await botos.deliver("telegram", "Nightly digest ready")
Requires home_channel configured for that platform.
3

Send to a named alias

await botos.deliver("ops-alerts", "Disk usage at 90%")

How It Works

TargetResolves toExample
originChat that triggered the requestdeliver("origin", text, origin=src)
<platform>Platform’s home_channeldeliver("telegram", text)
<platform>:<id>Explicit channeldeliver("telegram:123456", text)
<alias>Friendly name from directorydeliver("ops-alerts", text)
Resolution order: originplatform:channel_id → bare platform name → alias. Platform names win over aliases — do not name an alias the same as a platform. Scheduled jobs use DeliveryRouter automatically, defaulting to "origin" when delivery context is present.

Choosing a Target Form

Configuration

YAML

channels:
  telegram:
    token: ${TELEGRAM_BOT_TOKEN}
    home_channel: "123456"
    aliases:
      ops-alerts: "123456"
      dev-chat: "789012"

Python

botos.configure_channels({
    "telegram": {"home_channel": "123456", "aliases": {"ops-alerts": "123456"}},
    "discord": {"home_channel": "789012"},
})

# Or use the directory directly
botos.delivery_router.directory.add_alias("ops-alerts", "telegram", "123456")
botos.delivery_router.directory.set_home_channel("telegram", "123456")

Common Patterns

Scheduled digest to a named channel

summary = agent.start("Summarise today's incidents")
await botos.deliver("ops-alerts", summary)

Cross-channel notification from a tool

await botos.deliver("slack:C123ABC", "FYI: deploy complete")

Best Practices

Aliases survive channel renumbering and read better in logs.
Bare-platform targets fail loudly without a configured home channel.
Platform-name lookup wins; the alias becomes unreachable by bare name.
deliver() returns False on resolution or send failure — log and retry as appropriate.

BotOS

Multi-platform orchestration

Bot Gateway

Run multiple bots from one server