AERIS-AQ
AI agent for air quality analysis across African cities

What it is
A conversational AI agent that synthesizes air quality data from seven sources across Africa and translates it into plain-language health guidance. Ask questions in natural language, get source-aware answers about pollution levels, trends, and health recommendations.
The Problem
Air quality data across African cities is fragmented across seven providers — WAQI, AirQo, OpenMeteo, Carbon Intensity, DEFRA, UBA, NSW — each with different formats, update frequencies, and coverage areas. Communities and policymakers need a single interface that combines these sources into actionable answers.
My Role
Built the complete system: Python backend with LangGraph agent orchestration, seven-source data integration layer, conversational session management, and a TypeScript/React frontend with chat interface, session history, and animated UI.
Approach
FastAPI backend with LangGraph for agent orchestration. Clean architecture — domain services handle agent logic, infrastructure layer manages external API calls, REST interfaces expose the chat and data endpoints. Gemini as the AI provider with lean prompt instructions for lower token cost and more stable outputs. SQLite for session storage. Frontend uses Next.js, Tailwind CSS, Framer Motion, and SWR for data fetching. Conservative health guidance for sensitive populations. Free-tier cold-start handling for Render deployments.
Hardest Decision
Implementing free-tier cold-start behavior — Render sleeps during inactivity, and the API returns 503 with retry-after headers during warmup. This affects chat, health checks, and session management differently. Handling it gracefully across all endpoints without confusing clients required a dedicated readiness gate and warmup protocol.
Status
Live at aeris.ochiengpaul.com. Integrates seven air quality data sources with a conversational AI interface. Handles real-time queries with source-aware responses across African cities.
What I'd Change
Would implement response caching for common queries, add streaming for long agent reasoning chains, and build a fact-checking layer that cross-references responses against verified data endpoints.