TG-Echo
Telegram Personal Auto-Messenger & SOTA MTProto Agent
Standard Telegram automation relies on the Telegram Bot API or webhooks, which require separate bot handles, public server IPs, port forwarding, and cannot act directly on personal 1:1 user direct messages.
Must operate 100% locally via MTProto user session with zero webhooks, maintain multi-turn conversational context without fact pollution, and enforce rigid financial keyword security.
Engineered an intelligent state-of-the-art auto-reply agent for 1:1 private messages using personal Telegram account MTProto (GramJS). Dynamically unifies Telegram Cloud history with session streams (8-15 turns), simulates natural human typing delays, converts Markdown to native Telegram HTML, and enforces a strict gatekeeper firewall blocking sensitive financial and credential keywords (e.g. CBE, Telebirr, passwords).
Addis Entrance Hub: Dual-Channel Delivery Topology
High-concurrency web and Telegram MTProto microservices over MySQL transactional persistence
Student requests from low-bandwidth mobile devices ingress through either the web interface or lightweight Fastify Telegram bot. Requests route through custom PHP controllers, querying an in-house AI Gateway for instant tutoring explanations and persisting test session attempts into normalized MySQL tables.
Connected directly through user String Session via GramJS, eliminating Telegram Bot API limitations, webhook setups, and external port forwarding.
Dynamically merges Telegram Cloud message history with in-memory session streams to assemble context-dense payloads for OpenAI-compatible LLMs.
Intercepts incoming messages against a security firewall, immediately halting automated dispatch and alerting the user on sensitive terms (cbe, telebirr, private keys).
Calculates realistic typing delays based on response length and converts LLM markdown output into native Telegram HTML tags (<b>, <code>, <pre>) with multi-bubble splitting.