Telegram AI Bot with RAG

Enterprise AI assistant — RAG over your docs, admin panel, Excel reports, multi-chain analytics

✅ Production · 24/7

Architecture

┌──────────┐ ┌──────────────┐ ┌────────────┐ │ User │────▶│ Telegram │────▶│ FastAPI │ │ (TG) │ │ Bot (aiogram)│ │ Server │ └──────────┘ └──────────────┘ └──┬──────┬───┘ │ │ ┌──────────────────────────────┤ ├───────────────┐ │ │ │ │ ┌───────▼───────┐ ┌────────▼───┐ ┌▼────────────┐ │ ChromaDB │ │ Mistral │ │ Admin Panel │ │ (vectors) │◀───────────▶│ AI (RAG) │ │ (Streamlit) │ └───────────────┘ └────────────┘ └─────────────┘ │ ┌───────▼───────┐ ┌───────────────────────────────────────┐ │ Docs & OCR │ │ 8 API modules: AI · users · analytics │ │ PDF/DOCX/TXT │ │ blockchains · agents · payments · img │ └───────────────┘ │ voice · admin (Excel/CSV export) │ └───────────────────────────────────────┘

Key Features

📄 RAG over your docs

PDF/DOCX/TXT uploaded and indexed. Hybrid search (BM25 + vectors) answers only from your documents — no hallucinations.

🔘 Interactive buttons

Reply menu (Features / Pricing / About / Help / Sample question) + inline link buttons. Works from any device, no app install.

📊 Admin panel

Streamlit dashboard: user analytics, FAQ management, documents, logs. One-click Excel/CSV report export.

⛓ Multi-chain analytics

Live balances across ETH, SOL, TON, Cosmos, SUI, Aptos. Risk agents, yield optimization from real DeFiLlama pools.

🔒 Privacy & security

Runs on your server via Tor SOCKS5. Documents never leave your infrastructure. Basic Auth on admin API.

💰 Zero-Cost AI

Mistral AI free tier (500k req/min) with automatic fallback chain. No monthly fees, no API bills.

Tech Stack

Python FastAPI aiogram 3.x ChromaDB Mistral AI RAG (BM25 + vectors) OCR Streamlit SQLite + SQLAlchemy openpyxl Tor SOCKS5

Use Cases