Quick Start Guide: Telegram Bot
Quick Start Guide On-chain AI Agent on Telegram
Last updated
Was this helpful?
Quick Start Guide On-chain AI Agent on Telegram
Last updated
Was this helpful?
This guide demonstrates how to build a Telegram bot that interacts with the Cronos network. The bot enable users to query blockchain information and execute transactions smoothly. Follow these steps to quickly set up and test the example bot provided in our SDK. For a demonstration of the AI Agent in action, refer to this video.
Before starting, ensure you have the following components ready.
AI-Agent-Service
See Self-Hosting AI-Agent-Server to run your local AI agent;
AI-Agent-Signer-App
See "Magic Link" Signer (Optional for on-chain transaction execution)
Required Accounts & Tools
Set up the environment variables, which includes Explorer API keys, OpenAI API keys, and Telegram bot token by:
Clone the repository and navigate to the bot directory:
Create a Python virtual environment:
Install dependencies:
Now start the Telegram bot by executing the script:
Once the bot is running, test it to ensure it’s working as expected:
Open Telegram and search for your bot using the bot name you set up with @BotFather.
Send a sample command or message, such as /start
, to see if the bot responds.
If you encounter issues during setup or execution, follow these tips:
Check your API keys to ensure they are correctly set in the environment variables.
Verify dependencies by confirming that all packages in requirements.txt
are installed.
Review Telegram Bot API limitations to ensure compliance with rate limits and usage guidelines.
Explore advanced use cases and customizations in the Examples section.
Visit the API Reference for detailed information on available functionalities.
Join our community to share feedback or ask questions.