bot.yaml; the gateway loads it and connects the agent to every configured channel.
How It Works
Config Structure
Quick Start
1
Install
2
Set credentials
3
Create bot.yaml
4
Start the gateway with your YAML
Config Options Reference
agent section
gateway section
platforms section
Each key under platforms is a platform name. Use ${VAR_NAME} for environment variable interpolation.
Supported platforms:
telegram, discord, slack, whatsapp, and any platform registered via entry points.
Single-platform shorthand
For one platform, declare a top-levelplatform: (and optionally token:) instead of a platforms: map:
token: is optional โ omit it and the declared platform: resolves the platformโs own documented env var (TELEGRAM_BOT_TOKEN, DISCORD_BOT_TOKEN, etc.):
bot start refuses to auto-enable them and logs a warning:
Admission policy (unknown_user_policy / owner_user_id)
Control who may DM a single-bot instance directly from bot.yaml. Since PR #5111, praisonai bot start wires unknown_user_policy and owner_user_id into the running bot for telegram / discord / slack โ matching the gateway path exactly.
Values are case-insensitive on load (
ALLOW normalises to allow) and whitespace is trimmed. An unquoted numeric owner_user_id (e.g. 987654321) is coerced to a string automatically.
On startup, The line reflects the YAML value, or
praisonai bot start prints the resolved policy so you can confirm it at a glance:deny when omitted โ the secure default is now visible rather than silent. It only prints on platforms that actually wire the policy (telegram / discord / slack).Unknown-User Pairing
Full owner-approval flow, inline buttons, and CLI fallback.
Slack single-bot shorthand
Slack Socket Mode also needs an app-level token, so add a top-levelapp_token: alongside token::
app_token: accepts the same three forms as token: โ plaintext, ${ENV} interpolation, and the { source, id } secret reference.
app_token is Slack-specific. When platform: is anything other than slack, a top-level app_token: is ignored โ this keeps a strict non-Slack adapter from rejecting an unexpected keyword. For the multi-channel form, set app_token under the Slack entry in channels: (see Messaging Bots).Bot startup exit codes:
praisonai bot start now exits 1 on any startup failure (bad config path, missing token, unknown platform). This makes systemd Restart=on-failure and if praisonai bot start ... ; then scripting work as expected.Shell execution keys
Add these per-channel keys to let a bot run shell commands with approval routing.Bot Shell Execution
Full routing ladder, per-platform ID resolution, and recipes.
Environment Variable Interpolation
Values in the form${VAR_NAME} are resolved from the current environment at startup:
~/.praisonai/.env (written by praisonai-bot onboard) are loaded automatically before interpolation.
When to Pick YAML vs Python
Common Patterns
Multi-platform setup
Custom port from environment
GATEWAY_PORT environment variable โ the CLI reads it automatically when --port is not passed.
Best Practices
Always use ${...} for tokens
Always use ${...} for tokens
Never hardcode tokens in YAML. Use environment variables and store them in
~/.praisonai/.env (written by praisonai-bot onboard) or your secrets manager.Run praisonai-bot gateway doctor before going live
Run praisonai-bot gateway doctor before going live
token, app_token, and verify_token โ including the secret-reference form โ without revealing any value.Use separate YAML files per environment
Use separate YAML files per environment
Keep
dev.yaml, staging.yaml, and prod.yaml โ each referencing different environment variables. Pass the right one with --config.Related
Standalone Bot Gateway (Python)
Python API equivalent โ register agents programmatically
Gateway CLI
Full list of gateway CLI commands
BotOS
Multi-platform bot orchestration
praisonai-bot SDK
Full bot-tier SDK reference

