Inspiration

It all started with a personal health struggle. Growing up in Ust-Kamenogorsk — a city constantly choked by industrial emissions and severe Unfavourable Meteorological Conditions —meant dealing with heavy smog on a regular basis. Nobody ever told my younger self that breathing polluted air without protection would have long-term consequences, and it eventually led to chronic sinusitis. Getting tired of guessing whether the air outside was safe or if I needed a mask, I decided to build AeroGuard AI to protect my health and give people clear, early warnings before they step outside.

What it does

AeroGuard AI is a smart Telegram bot designed to provide precise air quality forecasts and practical health advice. Instead of just showing static current data, it analyzes meteorological trends to predict whether smog will accumulate or disperse over the next 6 to 12 hours. It saves the user's city in a local database, provides clean weather and pollutant metrics, gives a straightforward recommendation on whether to bring a protective mask today, and handles background alerts.

How we built it

  • Core Language: Python (python-telegram-bot framework)
  • Data Sources: OpenWeatherMap API (Current weather, air pollution, and forecast endpoints for wind and temperature dynamics)
  • AI Intelligence: Google Gemini API (gemini-3.8-flash) with strict prompt engineering for concise, human-like summaries
  • Storage & Concurrency: SQLite for persistent user location storage and asynchronous background loops for daily check-ins

Challenges we ran into

  • API Limits & Timeouts: Handling free-tier rate limits and connection latency from the AI provider by optimizing payloads and building robust fallback mechanisms.
  • Architecture Tweaks: Implementing clean background notification loops within modern Telegram bot library architectures without relying on unstable third-party planners.
  • Messenger Formatting: Stripping out raw LaTeX syntax, backslashes, and markdown clutter so AI responses render cleanly and professionally inside Telegram.

Accomplishments that we're proud of

  • Successfully engineering a truly predictive workflow that looks 6–12 hours ahead into forecast data rather than just reporting current numbers.
  • Turning a deeply personal, real-world health problem into a functional software solution.

What we learned

  • The importance of robust error handling and fault tolerance when building bots dependent on multiple external third-party APIs.
  • How precise prompt engineering can transform generative outputs into concise, readable micro-reports tailored specifically for chat interfaces.

What's next for AeroGuard AI

  • Adding visual trend graphs tracking historical pollutant changes over time.
  • Expanding customizable notification schedules so users can choose exact hours for their morning weather briefings.
  • Scaling cloud deployment for 24/7 high-availability performance across multiple smog-prone regions.

Built With

  • asyncio
  • google-gemini-api
  • openweathermap-api
  • python
  • python-telegram-bot
  • sqlite
Share this project:

Updates

Submission history