Open-source Telegram bot for OpenGradient ecosystem developers.
Built by the community. Every AI response is TEE-verified via og.LLM
and includes a payment_hash as on-chain proof.
User (Telegram)
│
▼
aiogram 3.x (polling)
│
┌────┴──────────────────────────────┐
│ bot.py │
│ │
│ /start /about /faucet │ ← static, no LLM
│ /snippets /models │ ← inline buttons, no LLM
│ │
│ free-form question │
│ → detect_intent() │ ← keyword match
│ → fetch_snippet() (httpx) │ ← raw GitHub file
│ → og.LLM.chat() │ ← TEE-verified answer
│ → reply + 🔐 payment_hash │
└───────────────────────────────────┘
│
▼
og.LLM → x402 Gateway → TEE (Intel TDX) → Base Sepolia
# 1. Clone
git clone https://github.com/Floyd11/opengradient-helper-bot
cd opengradient-helper-bot
# 2. Virtual environment
python3.10 -m venv venv
source venv/bin/activate
# 3. Install dependencies
pip install -r requirements.txt
# 4. Configure
cp .env.example .env
nano .env # add bot token, OG private key, GitHub repo
# 5. Run
python bot.pysudo cp og-helper.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable og-helper
sudo systemctl start og-helper
# View logs
sudo journalctl -u og-helper -f| Variable | Description |
|---|---|
TELEGRAM_BOT_TOKEN |
From @BotFather |
OG_PRIVATE_KEY |
Testnet wallet key — get $OPG at faucet.opengradient.ai |
GITHUB_REPO |
Your cookbook fork, e.g. username/OpenGradient-Cookbook |
| Command | Description | Uses LLM? |
|---|---|---|
/start |
Welcome message | No |
/about |
OpenGradient overview | No |
/snippets |
Cookbook snippet catalog | On button tap |
/models |
Model Hub links | No |
/faucet |
Get testnet $OPG | No |
| (any text) | Free-form Q&A | Yes |
Every response generated by og.LLM contains a payment_hash — a transaction
hash on Base Sepolia proving the inference ran inside a TEE (Trusted Execution
Environment). The bot appends a Basescan link to every AI answer:
🔐 Generated in TEE | Proof: 0xabc123... → basescan link
MIT