Use this file to discover all available pages before exploring further.
Deploy a Hermes-style AI workforce using PraisonAI Gateway with multiple specialized Telegram bots, each serving different business functions while sharing common knowledge.
Save each token separately - never reuse tokens between bots.
2
Configure Multi-Channel Gateway
Create gateway.yaml with Hermes workforce pattern:
gateway: host: "127.0.0.1" port: 8765agents: cfo: model: gpt-4o-mini instructions: | You are a CFO assistant. Help with financial analysis, reporting, budgeting, and strategic financial decisions. You have access to company financial data and industry knowledge. tools: [search_knowledge] ops: model: gpt-4o-mini instructions: | You are an operations assistant. Help with process optimization, workflow design, resource management, and operational efficiency. You have access to internal processes and best practices. tools: [search_knowledge] content: model: gpt-4o-mini instructions: | You are a content assistant. Help with marketing content, documentation, copywriting, and brand messaging. You have access to brand guidelines and content libraries. tools: [search_knowledge]channels: telegram_cfo: platform: telegram token: ${TELEGRAM_CFO_TOKEN} routes: default: cfo telegram_ops: platform: telegram token: ${TELEGRAM_OPS_TOKEN} routes: default: ops telegram_content: platform: telegram token: ${TELEGRAM_CONTENT_TOKEN} routes: default: content
3
Configure Environment
Create .env file with all required tokens:
# Telegram Bot Tokens - each bot needs unique tokenTELEGRAM_CFO_TOKEN=123456:ABC-DEF1234ghIkl-CFOTELEGRAM_OPS_TOKEN=789012:XYZ-GHI5678jklMn-OPSTELEGRAM_CONTENT_TOKEN=345678:PQR-STU9012opqRs-CONTENT# API KeysOPENAI_API_KEY=sk-your-openai-api-keyGATEWAY_AUTH_TOKEN=your-optional-auth-token# Windows UTF-8 (if on Windows)PYTHONUTF8=1# Optional: User access controlTELEGRAM_ALLOWED_USERS=123456789,987654321
4
Launch Workforce Gateway
Start the single gateway process:
praisonai gateway start --config gateway.yaml
All three bots will start simultaneously through one gateway process.
Critical: Run only one gateway process per machine.Why: Multiple gateways cause conflicts:
Both bind to port 8765 (port collision)
Both poll same Telegram tokens (409 Conflict errors)
Session state becomes inconsistent
Bot stops responding mid-conversation
Verification:
# Check for running gatewaysps aux | grep "praisonai gateway"# Verify port usagenetstat -tuln | grep 8765# Health checkcurl http://127.0.0.1:8765/health
TELEGRAM_CFO_USERS=123456789,987654321 # Finance team user IDsTELEGRAM_OPS_USERS=111222333,444555666 # Operations team user IDsTELEGRAM_CONTENT_USERS=777888999,000111222 # Content team user IDs
Security caveat: Current gateway implementation may not enforce allowlists in polling path. Verify after PraisonAI security enhancement.
This helps users understand which bot to contact for specific needs.
Set clear bot descriptions
Configure helpful bot descriptions in BotFather:
CFO Bot: Financial analysis, budgeting, and reporting assistance for [Company Name]Operations Bot:Process optimization, workflow design, and operational efficiency for [Company Name]Content Bot: Marketing content, copywriting, and brand messaging for [Company Name]
Implement user onboarding
Configure welcome messages for new users:
agents: cfo: instructions: | You are a CFO assistant for [Company Name]. I can help with: • Financial analysis and reporting • Budget planning and forecasting • Cost optimization strategies • Investment analysis Try asking: "Show me our Q3 budget summary" or "Analyze cash flow trends"