praisonai gateway start now applies the same smart defaults as praisonai bot start, resolving the previous “zero tools in daemon mode” issue. Both entry points produce identical behavior with safe tools auto-injected and auto-approval enabled by default.
Each channel bot gets an isolated agent via Agent.clone_for_channel() — fresh locks, fresh interrupt controller, and no shared handoffs state — so configuring tools or memory on one channel never leaks into another.
Quick Start
Create gateway.yaml
Create a
gateway.yaml file in your project (Gateway YAML files are read as UTF-8 — non-ASCII characters work on all platforms including Windows):Supported Channels
Telegram
Full support for DMs, groups, commands, voice, and media.
Discord
Guild channels, DMs, slash commands, and embeds.
Slack
Socket Mode, channels, DMs, slash commands, and threads.
Cloud API and Web mode. DMs, groups, media support.
Windows users: Gateway Telegram error replies are automatically sanitized to ASCII-safe text — non-ASCII exception content (warning symbols, emoji, accented characters) no longer crashes the error handler with a
charmap codec error. Real underlying errors (quota, rate limit, auth) surface cleanly.Configuration Reference
Gateway Section
| Field | Type | Default | Description |
|---|---|---|---|
| host | string | 127.0.0.1 | Address to bind the gateway server |
| port | integer | 8765 | Port for the WebSocket server |
Agents Section
Each agent is defined by a unique ID and its configuration:| Field | Type | Default | Description |
|---|---|---|---|
| instructions | string | "" | System prompt for the agent |
| model | string | None | LLM model (e.g., gpt-4o-mini, gpt-4o) |
| memory | boolean | false | Enable conversation memory |
| tools | list | [] | Tool names resolved via ToolResolver |
| reflection | boolean | true | Enable self-reflection / interactive mode |
| role | string | None | Agent role (CrewAI-style) |
| goal | string | None | Agent goal (CrewAI-style) |
| backstory | string | None | Agent backstory (CrewAI-style) |
| tool_choice | string | None | auto, required, or none |
| allow_delegation | boolean | false | Allow task delegation to other agents |
Channels Section
Each channel maps to a bot platform:Channel Security
Each channel enforces the same access-control pipeline as standalone bots.| YAML Key | Type | Default | Purpose |
|---|---|---|---|
token | str | required* | Bot auth token. *Optional for whatsapp web mode and email/agentmail. |
platform | str | channel name | Override channel platform (e.g. telegram). |
routing / routes | dict | {"default": "default"} | Route map: dm, group, default → agent id. |
allowed_users | list[str] | str | [] | User-ID allowlist. Comma-separated string also accepted (env-expansion friendly). |
allowed_channels | list[str] | str | [] | Channel/group-ID allowlist. Same string handling. |
group_policy | str | "mention_only" | One of "mention_only", "command_only", "respond_all". Sets mention_required automatically. |
auto_approve_tools | bool | str | True | Auto-approve safe tools. Strings "1"/"true"/"yes"/"on" are truthy. |
default_tools | list[str] | (BotConfig default) | Per-channel override for default safe tools. |
As of PR #1791, gateway-mode bots enforce the same security pipeline as standalone bots (
praisonai bot start). Previous versions silently bypassed allowed_users, pairing, and group_policy in gateway mode.Pair with
unknown_user_policy: "deny" for the most secure default. To intentionally allow everyone (e.g. internal staging), leave allowed_users empty and set unknown_user_policy: "allow" — both are required.CLI Commands
Python Usage
- From YAML
- Programmatic
- Inspect Bots
Advanced: Health Endpoint
Advanced: Health Endpoint
The gateway exposes a health endpoint at Returns:The
http://host:port/health:push section is only included when push notifications are enabled.Advanced: Channel isolation
Advanced: Channel isolation
The gateway calls
_create_bot() to build independent clones for each channel:Each clone has fresh locks and interrupt controllers, preventing cross-channel interference. Learn more about Agent Cloning.Advanced: Standalone Bot Mode
Advanced: Standalone Bot Mode
You can still run a single bot without the gateway:This starts just one bot connected to a single agent — no gateway needed.

