Messaging Gateway
Messaging Gateway
Section titled “Messaging Gateway”Send a message, get an AI reply with full workspace tools. The Messaging Gateway lets you run Ptah from your phone, your team chat, or anywhere else you can text.
Supported platforms
Section titled “Supported platforms”| Platform | Adapter | Voice messages |
|---|---|---|
| Telegram | Bot API | Yes |
| Discord | discord.js-compatible | Yes |
| Slack | @slack/bolt Socket Mode | Yes |
What works the same everywhere
Section titled “What works the same everywhere”- Pairing — first inbound message from a new sender produces a 6-digit code; you approve the binding in the Bindings UI before any agent work happens
- Voice — audio attachments are decoded with ffmpeg and transcribed by
nodejs-whisper - Streaming — partial AI output is coalesced into ≤3 message edits per ~250ms window so chat doesn’t flap
- Approval gates — anything destructive still goes through Ptah’s normal approval prompts; the chat platform just relays them
Disabled by default
Section titled “Disabled by default”The gateway ships with gateway.enabled = false. Each platform also has its own gateway.<platform>.enabled flag. Both must be true for that platform to connect.
This is intentional. Bots-with-tools are a real attack surface — opt-in only.
Setup at a glance
Section titled “Setup at a glance”- Create a bot / app on the platform (instructions per-platform: Telegram · Discord · Slack)
- Paste tokens into Settings → Messaging → [platform]
- Whitelist the user / guild / team IDs you want to allow
- Enable the platform, then enable the gateway
- Send a message → approve the pairing code → start working
Read more
Section titled “Read more”- Pairing & approvals — how new senders get authorised
- Voice messages — ffmpeg + whisper setup
- Stream coalescing — why your chat won’t flap
- Settings — every gateway tunable