Smart Home Utility Optimizer
Inspiration
Prepaid electricity users often learn they are running out of credit only when the meter balance is already low. For households managing shared budgets, changing appliance usage, variable occupancy, or inconsistent top-up habits, it can be difficult to answer practical questions such as:
- How quickly are we consuming electricity?
- How many days of credit are likely left?
- Is our recent usage unusually high?
- What behavior changes could stretch the current balance?
- When should we plan the next top-up?
Smart Home Utility Optimizer helps households using prepaid electricity meters understand usage trends, forecast when credit may run out, and receive AI-assisted advisory guidance before outages happen.
The early MVP focuses on this planning gap. It does not attempt to vend electricity, execute payments, automate utility-provider channels, or control physical devices.
Product Features & Functionality
Smart Home Utility Optimizer is a web-based advisory dashboard backed by a deterministic forecasting engine and a bounded AI advisor. A household connects a meter profile, enters confirmed meter readings, and views:
- current balance and reserve status
- recent consumption trends
- estimated depletion window
- low-balance alerts
- AI explanations grounded in the household's own readings
The system is designed around a conservative principle: deterministic code computes household state and forecasts; the AI advisor explains those results and suggests safe behavioral actions.
The MVP includes:
- React dashboard optimized for mobile and desktop use
- FastAPI backend served from the same Cloud Run container as the frontend
- anonymous-session identity for low-friction public testing
- idempotent meter setup flow
- confirmed meter-reading capture
- trend and forecast APIs
- low-balance alert generation
- ADK-based advisory agent using household-scoped context
- Cloud SQL PostgreSQL persistence
- GitHub Actions CI/CD with GCP Workload Identity Federation
The deployed service uses a single public origin for frontend and backend requests. This keeps the MVP simple, avoids browser CORS complexity, and prevents the ADK development UI from being exposed in production.
Agent safety model
The AI advisor is constrained to advisory behavior:
- It can explain readings, trends, forecasts, and alerts.
- It receives only the caller's authorized meter context.
- It cannot enumerate households or access another user's data.
- It cannot write meter readings, change balances, execute payments, browse arbitrary URLs, run system commands, or control devices.
- It must surface uncertainty when available data is sparse.
Demo value
The prototype demonstrates an end-to-end product loop:
- connect a household meter
- submit synthetic or manual meter readings
- observe trend and forecast updates
- ask the advisor for context-aware guidance
- verify persistence and deployment through the live Cloud Run service
How Codex was used
- The entire project was built using the Codex CLI. 90% of the system was built using GPT-5.6 and GPT-5.5 for the remaining 10%.
- Codex had access to a set of local custom skills that formed the development harness to automate aspects like project scaffolding, agent evaluation, documentation discovery, CI/CD, Google cloud deployment, and STRIDE threat modeling.
- The workflow involved coordinating GPT-5.6 and GPT-5.5 at a high-level, leaving code generation to the models.
- The project started with a written rough product draft, where GPT-5.6 was asked to perform detailed research — identifying missed constraints, edge cases, false assumptions, architecture trade-offs. The final document was a detailed product description file that formed the basis of the implementation.
- The development process involved an iterative loop. Instructions were fed into the system, it provided an output, those outputs where reviewed and where necessary corrections were demanded until we had a working product.
Built With
- cloud-run
- fastapi
- google-cloud
- google-cloud-sql
- gpt-5.6
- python
- vertexai


Log in or sign up for Devpost to join the conversation.