Skip to content

feat: Telegram bot connection UI in Settings (TGRAM-UI) #296

Description

@vybe

Summary

Add frontend UI on the Agent Detail Sharing page to connect and manage Telegram bots per agent, mirroring how Slack channel binding works. Currently the Telegram backend integration exists (routers, adapter, DB) but there is no way to configure it from the Trinity web UI.

Current State

  • Backend fully implemented: routers/telegram.py, telegram_adapter.py, db/telegram_channels.py
  • No frontend UI exists to connect a bot token, bind agents to chats, or manage Telegram settings
  • Users would need to use the API directly to set up Telegram

Requirements

Agent Detail → Sharing Page → Telegram Section

  • Connect bot: paste BotFather token for this agent, validate via Telegram API, store
  • Show connected bot info (username, bot name)
  • Disconnect/replace bot token
  • Enable/disable Telegram for this agent
  • Each agent gets its own bot token (own bot identity)

Chat Bindings (on same page)

  • Bind agent to specific Telegram chats
  • Show which chats the agent is active in
  • Remove bindings
  • Trigger mode per binding: @mention-only vs all messages

Status Indicators

  • Connection status (connected/disconnected/error)
  • Webhook status (active/inactive)
  • Message count / last activity per binding

Acceptance Criteria

  • Agent Detail Sharing page has Telegram section with bot token connection flow
  • Connected bot displays username and status per agent
  • Can add/remove chat-agent bindings from the Sharing page
  • Each agent has independent Telegram bot configuration
  • Disconnect/reconnect works without losing bindings

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions