praisonai-bot

Standalone bots, gateway, and channel CLI — Tier 2b between praisonaiagents and the praisonai wrapper

praisonai-bot is the channel runtime package: messaging bots (Telegram, Discord, Slack, …), the WebSocket gateway control plane, and the praisonai-bot console script. Install it when you need gateway or bots without the full praisonai wrapper.

Diagram

praisonaiagents\nCore SDK

praisonai-bot\nBots + Gateway

praisonai\nFull wrapper

praisonai-code\nTerminal CLI

Four-tier ownership

PackageOwnsMust not depend on
praisonaiagentsAgent, tools, memory, hooks, bot/gateway protocolspraisonai, praisonai-code, praisonai-bot
praisonai-codeTerminal CLI: run/chat/code, runtime, LLMPyPI cycle on praisonai (lazy bridge only)
praisonai-botBots, gateway, channel CLI, OS daemon, gateway scheduler tickPyPI cycle on praisonai (lazy bridge for jobs/UI)
praisonai wrapperFramework adapters, train, serve, dashboard, async jobs API—

Publish order: praisonaiagents → praisonai-code + praisonai-bot → praisonai


Quick Start

  1. Install
    bash
    pip install praisonaiagents "praisonai-bot[gateway,bot]"
  2. Set credentials
    bash
    export OPENAI_API_KEY=your_openai_api_key
    export TELEGRAM_BOT_TOKEN=your_telegram_token   # optional
  3. Start the gateway
    bash
    praisonai-bot gateway start --host 127.0.0.1 --port 8765

    Health check: http://127.0.0.1:8765/health


Python API (bot-first imports)

python
from praisonaiagents import Agent
from praisonaiagents.gateway import GatewayConfig
from praisonai_bot.bots import Bot, BotOS
from praisonai_bot.gateway import WebSocketGateway

agent = Agent(name="assistant", instructions="You are helpful.")
gateway = WebSocketGateway(config=GatewayConfig(host="127.0.0.1", port=8765))
gateway.register_agent(agent, agent_id="assistant")

# Shims: ``from praisonai.gateway import WebSocketGateway`` works when the wrapper is installed.
# Shims: ``from praisonai.bots import Bot, BotOS`` also works when the wrapper is installed.

Scheduler imports

python
from praisonai_bot.scheduler import ScheduledAgentExecutor, JobResult
from praisonai_bot.scheduler.condition_gate import ShellConditionGate

Scheduled jobs (standalone)

The gateway scheduler tick lives in praisonai-bot, so you can run scheduled agents without the full wrapper.

python
from praisonaiagents import Agent
from praisonaiagents.scheduler import ScheduleRunner, FileScheduleStore
from praisonai_bot.scheduler import ScheduledAgentExecutor

agent = Agent(name="watcher", instructions="Summarise new alerts.")

runner = ScheduleRunner(FileScheduleStore("./schedules"))
executor = ScheduledAgentExecutor(
    runner=runner,
    agent_resolver=lambda _job_id: agent,
)

import asyncio
asyncio.run(executor.run_loop(interval=15.0))

Console script

CommandPurpose
praisonai-bot gateway startWebSocket gateway + health endpoint
praisonai-bot bot startSingle-platform bot
praisonai-bot onboardMessaging onboarding wizard
praisonai-bot pairingDM pairing allowlist

When the full wrapper is installed, the same commands are available as praisonai gateway, praisonai bot, etc.


What is not in this package

  • Agentic hot path (run, chat, code) — use praisonai-code or praisonai
  • Framework adapters (CrewAI, AutoGen) — wrapper only
  • Async jobs HTTP API (praisonai.jobs) — wrapper only (UI bridge when co-installed)
  • Unified dashboard (praisonai dashboard) — wrapper only
  • RunPolicy (safety gate for unattended runs) — wrapper only (praisonai.scheduler.run_policy)

When to pick this vs other packages

Use caseInstall
Gateway + bots only, minimal depspip install "praisonai-bot[gateway,bot]"
Terminal agents without botspip install praisonai-code
Full stack (recommended default)pip install praisonai
Embed agents in your apppip install praisonaiagents

Related