Agent on a standalone WebSocket gateway with three imports and one asyncio.run().
Quick Start
1
Install
2
Set credentials
3
Register an agent on the gateway
4
Verify the gateway is running
How It Works
The gateway routes messages from any connected channel to the registered agent. The agent never knows which channel the message came from — it just receives text and returns a response.Configuration Options
GatewayConfig fields
WebSocketGateway.register_agent() parameters
Returns: The
agent_id string used for registration.
CLI Equivalent
praisonai-bot gateway start is the canonical CLI command. When the praisonai wrapper is co-installed, praisonai gateway start is an alias that delegates to the bot tier.Common Patterns
Multiple agents on one gateway
Custom agent ID
Imports: bot-first and wrapper shims
Best Practices
Use agent_id for stable routing
Use agent_id for stable routing
Assign explicit
agent_id values. Channel clients connect by agent ID — changing it after deployment disconnects existing sessions.Bind to 0.0.0.0 only on trusted networks
Bind to 0.0.0.0 only on trusted networks
host="127.0.0.1" (loopback) is safe for local development. For production, bind to 0.0.0.0 only behind a reverse proxy with TLS termination.Check /health before routing traffic
Check /health before routing traffic
The health endpoint (
http://host:port/health) returns 200 OK when the gateway is ready. Use it in your load balancer or process manager health check.Use YAML for declarative configuration
Use YAML for declarative configuration
For multi-agent, multi-channel setups, use the standalone YAML format instead of Python to keep credentials and topology out of code.See Standalone Bot YAML for details.
Related
Standalone Bot YAML
Declarative gateway + agent + channels config
Gateway CLI
CLI commands for starting and managing the gateway
BotOS
Multi-platform bot orchestration
praisonai-bot SDK
Full bot-tier SDK reference

