FabricFabricHarness
EcosystemChannels

Telegram

Connect Telegram bot updates to durable agent conversations.

Use the adapter from @fabric-harness/channels/telegram:

fh add channel telegram
import { createTelegramChannel } from '@fabric-harness/channels/telegram';

export default createTelegramChannel({
  botId: process.env.TELEGRAM_BOT_ID!,
  botToken: process.env.TELEGRAM_BOT_TOKEN!,
  secretToken: process.env.TELEGRAM_WEBHOOK_SECRET!,
  agent: 'assistant',
  tenantId: 'acme',
});

Telegram must send updates to POST /channels/telegram/webhook with the configured X-Telegram-Bot-Api-Secret-Token. The adapter deduplicates by update ID, keys sessions by bot/chat/topic, and records the sender as onBehalfOf.

Use replyInTelegram(ref, { botToken }) for outbound messages. Keep edit, delete, and administration actions as separately governed tools.