Skip to main content
Connect AeonSage to Telegram for instant access to your AI assistant from anywhere.

Overview

Features

FeatureStatus
Send messages
Receive messages
Inline queries
File attachments
Voice messages
Group chats
Thread support

Quick Setup

1
Create a Telegram Bot
  1. Open Telegram and search for @BotFather
  2. Send /newbot
  3. Follow the prompts:
    • Bot name: AeonSage (or your preferred name)
    • Bot username: Must end with _bot (e.g., my_aeon_bot)
  4. Copy the bot token (format: 123456789:ABCdefGhIjKlMnoPqRsTuVwXyZ)
2
Add Channel to AeonSage
aeonsage channel add telegram --token 123456789:ABCdefGhIjKlMnoPqRsTuVwXyZ
Or add to config.json:
{
  "channels": {
    "telegram": {
      "enabled": true,
      "token": "123456789:ABCdefGhIjKlMnoPqRsTuVwXyZ"
    }
  }
}
3
Start the Gateway
aeonsage gateway start
You should see:
[INFO] Telegram channel connected
[INFO] Bot username: @your_aeon_bot
4
Get Your Access CodeSend /start to your bot on Telegram. It will respond with an access code prompt.
  1. Check Gateway logs for the access code:
    aeonsage logs --channel telegram
    
  2. Send the access code to the bot
  3. You’re authenticated! Start chatting with your AI.

Configuration

Full Configuration Reference

{
  "channels": {
    "telegram": {
      "enabled": true,
      "token": "${TELEGRAM_BOT_TOKEN}",
      "allowedUsers": [],
      "allowedGroups": [],
      "commands": {
        "enabled": true,
        "prefix": "/"
      },
      "features": {
        "voice": true,
        "files": true,
        "inline": true
      },
      "rateLimit": {
        "windowMs": 60000,
        "max": 30
      }
    }
  }
}

Configuration Options

OptionTypeDefaultDescription
tokenstringrequiredBot token from BotFather
allowedUsersarray[]Whitelisted user IDs (empty = all allowed)
allowedGroupsarray[]Whitelisted group IDs
commands.enabledbooleantrueEnable slash commands
commands.prefixstring”/“Command prefix
features.voicebooleantrueProcess voice messages
features.filesbooleantrueProcess file attachments
rateLimit.maxnumber30Max messages per minute

Usage

Direct Messages

Send any message to your bot:
You: What's the weather today?
Bot: I don't have real-time weather data, but I can help you check weather websites...

Slash Commands

CommandDescription
/startStart the bot and authenticate
/helpShow available commands
/resetReset conversation context
/model [name]Switch AI model
/statusShow session status

Voice Messages

Voice messages are automatically transcribed using Whisper (if enabled) and processed as text.
To enable voice processing:
{
  "channels": {
    "telegram": {
      "features": {
        "voice": true,
        "voiceModel": "whisper-1"
      }
    }
  }
}

Group Chats

To use in groups:
  1. Add bot to group
  2. Configure group permissions:
    {
      "allowedGroups": [-1001234567890]
    }
    
  3. Mention the bot to trigger responses:
    @your_aeon_bot What do you think about this?
    
In groups, the bot only responds when mentioned. Set group privacy to “Disabled” in BotFather to allow the bot to see all messages.

Security

Access Control

Webhook vs Polling

Troubleshooting

Advanced

Custom Commands

Define custom commands:
{
  "commands": {
    "custom": {
      "weather": {
        "description": "Get weather info",
        "handler": "skills/weather"
      },
      "translate": {
        "description": "Translate text",
        "handler": "skills/translator"
      }
    }
  }
}

Inline Mode

Enable inline queries:
  1. Enable inline mode in @BotFather:
    /setinline
    
  2. Configure in AeonSage:
    {
      "features": {
        "inline": true
      }
    }
    
Users can now query your bot from any chat:
@your_aeon_bot tell me a joke

Next Steps

Now that you have Telegram configured, you can explore additional messaging channels to expand your AeonSage deployment. Other popular channels include Discord for community servers and WhatsApp for personal messaging. Check the channels documentation to see all available integration options.