Repository navigation
Closed as not planned
Labels
Description
Summary
Enable each Trinity agent to have its own Telegram bot account for bidirectional chat and notification forwarding. Users can message agents, receive notifications, and approve/reject actions directly from Telegram — a mobile-first interface for agent management.
Requirements doc: docs/requirements/TELEGRAM_INTEGRATION.md
Motivation
- Identified as a gap in the OpenClaw comparison (2026-02-13 decision log)
- Listed in roadmap archive as MEDIUM priority backlog item
- Enables "review agent work while drinking coffee" UX
- Architecture designed to support WhatsApp/Discord/other channels later
Key Design Decisions
- Per-agent bots: Each agent gets its own Telegram bot (token via @Botfather)
- Credential reuse: Bot tokens use existing CRED-002 injection system (zero changes needed)
- Multi-bot single endpoint: All bots share one webhook URL, differentiated by random secret in path
- Notification bridge: Hooks into existing NOTIF-001 system to forward notifications to Telegram
- Library:
aiogram3.x (fully async, aligns with FastAPI) - Dev/prod modes: Polling for development, webhook for production
Implementation Phases
- Core Infrastructure (MVP) — DB tables, webhook receiver, message routing, polling mode, basic UI
- Notification Bridge — Forward NOTIF-001 notifications to Telegram with type-based formatting
- Interactive Features — Inline keyboards for approve/reject on "question" notifications
- Webhook Mode — Production webhook setup with secret validation
- Polish & UX — QR codes, markdown conversion, conversation context, test messages
Scope
New Files
src/backend/routers/telegram.py— Webhook receiver, registration endpointssrc/backend/services/telegram_service.py— Bot lifecycle, messaging, polling/webhooksrc/backend/db/telegram.py— Database operations
Modified Files
src/backend/db/schema.py— 2 new tables (telegram_bindings,telegram_chat_links)src/backend/main.py— Mount router, start polling on startupsrc/backend/routers/notifications.py— Hook notification broadcast to Telegramsrc/frontend/src/views/AgentDetail.vue— Telegram status panel
New Dependency
aiogram3.x
Related
- NOTIF-001: Upstream notification system (Telegram forwards these)
- SLACK-001: Sibling channel integration (same architectural pattern)
- CRED-002: Credential injection (reused for bot tokens)
Activity
vybe commentedon Mar 30, 2026
Actualization (2026-03-30)
Duplicate of #103 — both track Telegram Bot Integration (TGRAM-001). Issue #103 has more detail and is ranked in the project board at P1c.
Additionally, #216 was filed on 2026-03-27 with an expanded scope (media support, public link sharing).
Recommendation: Close as duplicate of #103. #216 extends the scope further.
vybe commentedon Mar 30, 2026
Closing — duplicate of #103 (TGRAM-001). See also #216 for expanded scope.