Eco-Loop Building Agents

Inspiration

The inspiration for this project came from my everyday experience of paying electricity bills twice a month. With increasing electricity costs, I realized that even in a small household, energy can be wasted when appliances and cooling systems operate unnecessarily.

This made me wonder how much energy large IT companies, offices, and industries might waste. I wanted to solve this real-world problem by building a system that automatically optimizes energy consumption without compromising human comfort.

What It Does

Eco-Loop Building Agents uses AI to optimize building energy consumption through adaptive HVAC control. It monitors building conditions, analyzes energy usage, and adjusts heating and cooling setpoints to reduce unnecessary energy consumption while maintaining thermal comfort.

Technologies Used

  • Python – Core implementation and control logic
  • EnergyPlus – Building energy simulation
  • PyEnergyPlus Runtime API – Simulation data collection and control integration
  • Ollama (Llama 3.2) – Local LLM for analyzing building conditions and generating control decisions
  • Model Context Protocol (MCP) – Intended for standardized communication between AI models and tools
  • Matplotlib – Visualization of energy consumption, temperatures, and performance comparisons

How I Built It

  1. Building Simulation: Used EnergyPlus to simulate building operations and energy consumption.
  2. Data Collection: Integrated Python with the PyEnergyPlus Runtime API to retrieve indoor temperature, outdoor temperature, and HVAC performance metrics.
  3. AI Decision-Making: Connected a locally running LLM through Ollama to analyze building conditions and recommend heating and cooling setpoints.
  4. Closed-Loop Control: Fed control decisions back into the simulation to update building operations continuously.
  5. Visualization: Used Matplotlib to compare baseline and AI-controlled energy consumption and monitor temperature conditions.

Challenges Faced

  • Lack of real-world data: Access to actual building sensors and HVAC infrastructure was limited, so I used EnergyPlus to simulate building conditions.
  • EnergyPlus-Python integration: Connecting the simulation engine to Python and retrieving the correct runtime variables required debugging and validation.
  • Balancing energy savings and comfort: Aggressive energy-saving decisions could make indoor temperatures uncomfortable, so I incorporated temperature constraints into the AI agent's instructions.

What I Learned

This project taught me how to identify a real-world problem from everyday experiences and turn it into a technical solution. I learned to integrate building energy simulation with AI, collect runtime data, and connect AI-generated decisions to a simulated physical system.

Most importantly, I learned that energy optimization is not just about reducing electricity consumption; it requires balancing energy efficiency, operating costs, and human comfort.

What's Next

  • Improve AI-based HVAC control strategies.
  • Validate energy savings under consistent simulation conditions.
  • Incorporate occupancy data, electricity tariffs, and grid carbon intensity.
  • Explore integration with real-world sensors and HVAC systems.

My goal is to make buildings smarter, more energy-efficient, and more sustainable through open-source AI.

Built With

  • ai-agents
  • automation
  • building-energy-simulation
  • closed-loop-control
  • energy-efficiency
  • energyplus
  • hvac-optimization
  • large-language-models-(llms)
  • llama-3.2
  • matplotlib
  • mcp
  • numpy
  • ollama
  • pandas
  • pyenergyplus
  • pyenergyplus-runtime-api
  • python
  • smart-buildings
  • streamlit
  • sustainable-energy
  • thermal-comfort
Share this project:

Updates

Submission history