Skip to content

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.

PlatformAdapterVoice messages
TelegramBot APIYes
Discorddiscord.js-compatibleYes
Slack@slack/bolt Socket ModeYes
  • 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

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.

  1. Create a bot / app on the platform (instructions per-platform: Telegram · Discord · Slack)
  2. Paste tokens into Settings → Messaging → [platform]
  3. Whitelist the user / guild / team IDs you want to allow
  4. Enable the platform, then enable the gateway
  5. Send a message → approve the pairing code → start working