AGY on Telegram
Fault-tolerant Telegram gateway for Google Antigravity CLI with voice & vision.
A lightweight, production-ready daemon bridging Google's Antigravity CLI (AGY) agent with mobile devices. It transforms Telegram into a responsive, secure control surface for headless AI coding and systems management across personal workstations, servers, and NAS hardware.
Context Continuity & Multimodal Inspection
Natural conversation persistence is maintained across plain text messages via AGY's session continuation flags. When a clean slate is required, commands like /new <prompt> bypass previous context, while /c <prompt> reinforces conversational chaining.
Multimodal vision is achieved without external cloud image APIs. Screenshots and photos received via Telegram are staged in a dedicated workspace directory and referenced in the agent's execution prompt, enabling AGY to inspect UI bugs, error logs, and system dashboards directly via standard file-reading tools.
Local Whisper Pipeline & Zero-Latency Intent Parsing
Voice memos are transcribed on-premise through a local Whisper HTTP endpoint, ensuring sensitive audio never touches third-party speech servers.
The pipeline features dual-mode execution routing: spoken natural language triggers (such as "Nuevo chat: ..." or "Continúa con lo anterior: ...") are automatically extracted using regex classifiers to trigger immediate execution. If intent is unstated, the bot dynamically serves interactive Telegram inline keyboards allowing the user to select the execution mode with a single tap.
Fault-Tolerant Auto-Retries & Cross-Platform Supervision
Long-running LLM processes frequently suffer from transient API rate limits, backend restarts, or network hiccups. The execution supervisor implements an automatic retry mechanism with progressive backoff (2s, 4s, 6s), updating the Telegram status message in-place to give real-time feedback without message spam.
Engineered with cross-platform native support for both Linux (systemd --user) and macOS (launchd LaunchAgent), including dynamic PATH resolution for Apple Silicon Homebrew and unified host metrics monitoring via /status.
Technical Specifications
Pure standard library core with minimal external dependencies
Headless non-interactive print mode with workspace context injection
Long polling getUpdates loop with typing heartbeat concurrency
Local private speech-to-text with zero external network leakage
Zero-latency prefix matching for hands-free session routing
Up to 3 automated retries (2s, 4s, 6s) on subprocess exit errors
Strict Telegram User ID validation at ingress before subprocess dispatch
Native user-space daemons across Linux distributions and macOS