Skip to content

Talk to agents from Slack, Telegram and Microsoft Teams (GODM-21) - #22

Merged
danielehrhardt merged 2 commits into
mainfrom
agent/c-pro/aba9773be921
Sep 29, 2026
Merged

danielehrhardt merged 2 commits into
mainfrom
agent/c-pro/aba9773be921

Conversation

@danielehrhardt

Copy link
Copy Markdown
Contributor

Closes GODM-21.

You can now talk to your agents from Slack, Telegram and Microsoft Teams. Connect a bot, choose which agents it reaches and who may use it, and the agents answer right in the chat. Every platform chat is also a normal Godmode conversation, so you can read along in Chat.

Messaging page with a Telegram, Slack and Teams bot

What it does

  • Messaging page (sidebar → Access → Messaging, and ⌘K). It shows your bots with their status, agents, access mode, chats and last message, and a list of platforms to connect. A sidebar badge counts people waiting for approval.
  • Connect in three steps: create the bot, paste its tokens (they're checked right away and the bot's identity is shown), then choose agents and access.
    • Telegram: long polling, so no public address is needed. You only need a token from @Botfather.
    • Slack: Socket Mode, so no public address is needed. "Create the Slack app" opens Slack with Godmode's manifest already filled in: scopes, events and the /godmode command. The bot answers DMs, and in channels it answers mentions in their thread.
    • Teams: an Azure Bot (single tenant) delivers to a secret https endpoint behind a tunnel or server. After connecting, the UI shows the endpoint to paste into Azure and lets you download a ready-to-upload Teams app package (manifest plus icons generated from the logo).
  • Agents: a bot can reach several agents, and new chats start with the first one. People switch with /agent <name>, list agents with /agents, and start over with /new; /stop cancels the answer in progress. In Slack these are /godmode agents, /godmode agent <name> and so on. Claude Code's own slash commands are not available from chats.
  • Access: private by default. When someone new writes, they're told the bot is private and you get a notification. You approve or block them in the bot's sheet, and the bot welcomes them once approved. "Anyone" access is available, and it needs your vault passphrase.
  • Chats: there's one conversation per DM, group, Telegram topic or Slack thread (origin badges: Slack / Telegram / Teams). While the agent works, the platform shows typing (Slack shows 👀). Answers are converted to Telegram HTML, Slack mrkdwn or Teams Markdown and split into several messages when long. Photos and files people send (up to 25 MB, 20 MB on Telegram) are handed to the agent.
  • Bot sheet: waiting requests, agents, access, people (approve, take back, block, forget), recent chats that link to the conversation, Teams setup, token replacement, and disconnect.

Bot settings: requests, agents and access

Safety

  • Tokens are sealed in the vault, redacted like other secrets, and never returned by the API. Bots start once the vault is unlocked.
  • Teams: every delivery must be a Bot Framework JWT for this app, checked for RS256 signature, issuer, audience, expiry, the msteams endorsement and the serviceurl claim. It must also come from the msteams channel and the configured tenant, and hit the secret endpoint path. The bot's token is only sent to the Teams connector hosts.
  • Approval: unapproved and blocked people never reach an agent or a chat command. Conversation instructions say that platform names are unverified.
  • Remote users get a generic message when a run fails, so local paths and stderr stay in Godmode. There are rate limits of 20 messages per chat and 120 per bot per minute.
  • Backups restore bots turned off, so two machines never answer for the same bot.

Testing

  • pnpm typecheck passes, the desktop build passes, and all core tests pass on the merged main (641 pass, 0 fail).
  • The new tests are in messaging.test.ts (28 tests), run against the real runner with the fake Claude CLI:
    • Telegram end to end: token check, access requests and notifications, approval welcome, formatted answers, follow-ups, /agents, /agent, /new, /stop, groups, blocking, the open-access grant, and the plain-text fallback.
    • Slack over a local Socket Mode server: DMs, mentions in threads, acks, the 👀 reaction, and the slash command via response_url.
    • Teams: JWT checks with a generated key pair (bad signature, issuer, audience, expiry, endorsement), service URL, tenant and channel checks, and replies to the connector.
    • The Teams app package.
    • Markdown conversion and message splitting.
  • Manually tested in an isolated dev instance with the platform APIs stubbed: the whole connect flow in the UI, approvals, agent answers delivered as Telegram HTML and Slack mrkdwn, the bot sheet, bots starting on vault unlock, and the conversation's Telegram badge. These were light and dark mode screenshots.
  • Not tested against live Slack, Telegram or Teams accounts. The request shapes follow the official docs.

Connect a bot on Slack (Socket Mode), Telegram (long polling) or Microsoft
Teams (Azure Bot, JWT-verified endpoint), choose which agents it reaches and
who may use it. Every platform chat continues a Godmode conversation; /agents,
/agent, /new and /stop work in the chat. New people ask for access first;
tokens are sealed in the vault. Includes the Messaging page, connect flow,
bot settings sheet, Teams app package and tests.
# Conflicts:
#	README.md
#	packages/core/src/db/migrations.ts
#	packages/shared/src/index.ts
@danielehrhardt
danielehrhardt merged commit e699feb into main Sep 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant