Telegram Bot Setup
Connect your NeuroGen AI agent to Telegram in minutes. Your bot will be able to chat with users, answer questions, and leverage all the capabilities of your AI agent.
Prerequisites
Before you begin, make sure you have: - A NeuroGen account with an AI agent created - A Telegram account - A device with Telegram installed
Step 1: Create Your Bot with BotFather
-
Open Telegram and search for
@BotFatheror click t.me/BotFather -
Start a chat with BotFather and send the command:
/newbot -
Choose a display name for your bot (e.g., "My AI Assistant")
-
This is what users will see in their chat list
-
Choose a username for your bot
- Must end in
bot(e.g.,myai_assistant_bot) -
This is how users will find your bot
-
Copy your bot token
- BotFather will send you a message with your token
- It looks like:
7123456789:AAHxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - Keep this token secret! Anyone with the token can control your bot
Step 2: Connect to NeuroGen
-
Go to Dashboard > Integrations
-
Click the Telegram button
-
Paste your bot token in the token field
-
Select an AI agent to power your bot
-
Choose from your existing agents or create a new one
-
(Optional) Customize the Welcome Message
- This is sent when users start chatting with
/start -
Default: "Hello! I'm your AI assistant. How can I help you today?"
-
(Optional) Customize the Help Message
-
This is sent when users use
/help -
Click Connect Telegram Bot
Step 3: Start Chatting
-
In Telegram, search for your bot by its username (e.g.,
@myai_assistant_bot) -
Click Start or send
/start -
Start chatting! Your AI agent will respond to messages.
Bot Commands
| Command | Description |
|---|---|
/start |
Start conversation and see welcome message |
/help |
Show help information |
/reset |
Clear conversation history and start fresh |
Features
Conversation Memory
Your bot remembers the conversation context within a session. Use /reset to clear history and start fresh.
Rate Limiting
To prevent abuse, there's a limit of 10 messages per minute and 60 messages per hour per user.
Credit Usage
Messages are billed based on the AI model your agent uses. Monitor usage in the Integrations dashboard.
Troubleshooting
Bot Not Responding
- Check the token - Make sure you copied the entire token correctly
- Verify the agent - Ensure your agent is active and properly configured
- Check your credits - Make sure you have sufficient credits in your account
"Rate Limit Exceeded"
Wait a moment before sending more messages. The limit is 10 messages per minute.
"Insufficient Credits"
Add more credits to your NeuroGen account to continue using the bot.
Bot Appears Offline
Telegram bots don't show online status like regular users. The bot will respond when you send a message.
Security Notes
- Never share your bot token - Anyone with the token can control your bot
- Bot tokens are encrypted when stored in NeuroGen
- You can revoke and regenerate tokens in BotFather using
/revoke - Delete the integration from NeuroGen if you suspect the token is compromised
Managing Your Bot
Update Settings
Go to Dashboard > Integrations and click on your Telegram bot to update: - Connected agent - Welcome/help messages - View usage statistics
Disconnect Bot
Click the Disconnect button to remove the integration. This stops the bot from responding but doesn't delete the bot from Telegram.
Delete Bot Entirely
To delete the bot from Telegram:
1. Open BotFather
2. Send /deletebot
3. Select your bot
4. Confirm deletion
Next Steps
- Create an AI Agent - Build a custom agent for your bot
- Discord Bot Setup - Deploy on Discord too
- Slack App Setup - Add to your Slack workspace
Need help? Contact support@neurogen.cc