bot.yaml; the gateway loads it and connects the agent to every configured channel.
How It Works
Config Structure
Quick Start
Config Options Reference
agent section
| Key | Type | Default | Description |
|---|---|---|---|
agent.name | str | required | Agent display name, used as the agent_id for gateway routing |
agent.instructions | str | required | System prompt / instructions for the agent |
agent.llm | str | "gpt-4o-mini" | LLM model identifier (e.g. gpt-4o, gpt-4o-mini) |
gateway section
| Key | Type | Default | Description |
|---|---|---|---|
gateway.host | str | "127.0.0.1" | Host to bind the WebSocket server |
gateway.port | int | 8765 | Port to listen on |
platforms section
Each key under platforms is a platform name. Use ${VAR_NAME} for environment variable interpolation.
| Key pattern | Type | Description |
|---|---|---|
platforms.<name>.token | str | Bot token for the platform. Supports ${ENV_VAR} substitution |
telegram, discord, slack, whatsapp, and any platform registered via entry points.
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
| Scenario | Use |
|---|---|
| Operations team manages tokens | YAML — credentials stay out of code |
| Static single-agent setup | YAML — fewer moving parts |
| Dynamic agents (created at runtime) | Python — full control over register_agent() |
| Custom gateway middleware or hooks | Python — subclass or extend WebSocketGateway |
| Multiple environments (dev / staging / prod) | YAML — per-environment files with env vars |
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
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

