Quick Start
Install Dependencies
Install Python dependencies with both extras required for gateway:Why both extras are needed:
Without
| Extra | Provides | Required For |
|---|---|---|
[bot] | python-telegram-bot, discord.py, slack SDKs | Platform integrations |
[api] | uvicorn, fastapi, starlette | Gateway HTTP/WebSocket server |
[all] | Both + search tools + storage backends | Complete installation |
[api] you’ll get:Configure Windows UTF-8
Mandatory for Windows gateway deployments:Why this is required:Without UTF-8 configuration, you’ll see encoding errors:This often appears after API failures (OpenAI 429 quota exceeded). Fix billing first, then encoding.
Windows-Specific Configuration
Environment Variables
Windows PowerShell environment setup:UTF-8 Encoding Setup
Three ways to configure UTF-8 on Windows:- Environment Variable
- System Environment
- Per-Process
Windows Service Installation
For production deployment as Windows service:Multi-Channel Windows Setup
Hermes-Style Workforce Example
Completegateway.yaml for 3-bot Hermes workforce:
.env file:
Creating Multiple Telegram Bots
Important: Each channel needs its own Telegram bot token.-
Create CFO Bot:
- Message @BotFather
/newbot- Name: “CFO Assistant Bot”
- Username: “your_company_cfo_bot”
- Save token as
TELEGRAM_CFO_TOKEN
-
Create Ops Bot:
/newbot(same BotFather)- Name: “Operations Assistant Bot”
- Username: “your_company_ops_bot”
- Save token as
TELEGRAM_OPS_TOKEN
-
Create Content Bot:
/newbot(same BotFather)- Name: “Content Assistant Bot”
- Username: “your_company_content_bot”
- Save token as
TELEGRAM_CONTENT_TOKEN
Health Monitoring
Health Check Commands
Monitor gateway status:Process Management
Check running gateway processes:Security Configuration
User Access Control
Configure allowed users to prevent unauthorized access:.env configuration:
Token Security
Secure token storage on Windows:Troubleshooting Windows Issues
Common Windows Errors
charmap codec error
charmap codec error
Symptoms:Causes:
- Missing UTF-8 environment configuration
- OpenAI API failure (429 quota) + encoding issue
ImportError: Gateway requires starlette
ImportError: Gateway requires starlette
Error:Solution:
Bot stops responding (409 Conflict)
Bot stops responding (409 Conflict)
Symptoms:
- Bot works initially, then stops mid-session
- Log shows:
Conflict: terminated by other getUpdates request - Health check still shows
"running": true
25-30 second response delay
25-30 second response delay
Symptoms:
- Telegram typing indicator disappears after 5 seconds
- Reply comes 20-30 seconds later
- No error messages
- Do not send duplicate messages during wait
- Do not restart gateway during response window
- Typing indicator renewal fix is pending in PraisonAI
Windows-Specific Debugging
Enable detailed logging:Performance Optimization
Windows Resource Configuration
Optimize for Windows deployment:Production Deployment
Windows Server Configuration
For production Windows Server deployment:Best Practices
Use Windows Task Scheduler for monitoring
Use Windows Task Scheduler for monitoring
Create monitoring task:
Configure Windows Event Logging
Configure Windows Event Logging
Enable application logging:
Use Windows Subsystem for Linux (WSL) alternative
Use Windows Subsystem for Linux (WSL) alternative
For development, consider WSL:This avoids Windows-specific encoding issues during development.
Related
Gateway Overview
Architecture and concepts
Multi-Channel Telegram
Hermes workforce pattern

