Blog
HVAC Edge Agent, On-Device AI for Building Control
An HVAC Edge Agent runs AI on the machine inside the building, fusing CO2, temperature, presence, weather and room-booking data into one situational picture. It does not regulate. It writes only setpoints and schedule offsets to the existing controller in buffered form, and that controller keeps running its deterministic loop even if the agent is slow or unavailable. Because a small local language model handles inference on-device, occupancy data never leaves the building, making the approach offline-capable and GDPR-friendly.
Published 2026-06-24
Buildings spend a substantial share of their energy on heating, ventilation and air conditioning. Most systems follow fixed schedules or static heating curves, values set once that rarely match actual use. A room is heated while no one is there. Ventilation runs at full stage while the CO2 reading has long been in the green. Cloud-based optimization services promise relief but move building data onto someone else’s servers and make control dependent on a stable internet connection. An Edge Agent takes the opposite route. The intelligence sits on the machine, right inside the building.
Why static control misses actual demand
Classic building automation regulates reliably but context-blind. A schedule knows the time of day, not the occupancy. A heating curve knows the outdoor temperature, not the forecast for the next few hours and not the solar gains through a glass façade. The result is two kinds of cost at once, wasted energy in empty or over-supplied zones, and comfort complaints wherever pre-conditioning arrives too late.
The controller itself is not the problem. It does exactly what it was built for and stays stable, fast and deterministic. What it lacks is context. That is precisely the gap an AI agent on the machine fills, without touching the proven control logic.
Sensor fusion instead of single readings
A single sensor sees one dimension. Context only emerges from the combination. An HVAC Edge Agent brings several signal sources together into one situational picture.
- CO2 as an indicator of air quality and, indirectly, of occupancy
- Temperature per zone, measured through analog probes
- Presence via simple motion or occupancy detectors, with no camera and no image
- Weather, held locally or, when a network is available, fetched from the web
- Calendar or room booking as a hint about planned use
Analog probes deliver their values over ADC nodes, digital detectors over GPIO, field and bus devices over MQTT. From these streams the agent builds a situational picture, and that is exactly where the value lies over any single threshold rule.
What can be done classically stays classical
Here is the line an honest Edge Agent does not cross. The agent does not regulate. It does not sit in the real-time control loop and does not switch valves on a millisecond cycle. That would be neither necessary nor responsible, and what can be done classically stays classical.
Instead, the agent works on the agent-as-a-tool pattern. It writes parameters and setpoints only, such as a supply temperature, a ventilation stage, or a schedule offset. These values are handed to the existing controller in buffered form, and the controller keeps running its deterministic loop unchanged. If the agent is slow, busy or temporarily unavailable, the controller keeps regulating with the last valid setpoint. The system stays operational at all times, because the intelligence is an advisory layer, not a single point of failure.
This separation is not a compromise, it is architecture. The control loop stays fast and traceable, and the agent brings context and foresight. Mixing the two would destroy both properties.
Local means GDPR-friendly
Occupancy data is sensitive. Who was in which room and when is personal-adjacent, and it has no business on a foreign server. On-device AI solves this at the root. The data stays in the building, and the analysis runs on the device.
Through a local inference server, a small language model (1 to 3B) can run right next to the engine. With that, the agent works offline by default, and only a weather fetch or an optional cloud connection reach outward. Local execution, container isolation and signed image distribution form a security architecture designed for the EU Cyber Resilience Act, as a property of the build, not a label. For operators that means edge AI in industry without the detour through the cloud.
Scenario from an office building with shifting occupancy
A commercial building with several meeting rooms and an open office floor. Rooms are booked in the morning and often empty in the afternoon. Today the local forecast announces a sunny afternoon with noticeable solar gains on the south façade.
The Edge Agent reads CO2, temperature and presence per zone, plus room booking from the calendar. Shortly before a booked room is used, it writes an adjusted setpoint so pre-conditioning takes effect in time. In empty zones it relaxes the setpoints instead of heating blindly on schedule. For the south façade it accounts for the expected solar gains and holds back cooling until it is actually needed. It infers occupancy from CO2 and presence detectors, with no camera, no microphone, and no image.
No value leaves the building. The existing controller executes every adjustment and keeps full control of the loop.
How it works at the edge
Technically the agent is a graph in which the workflow is the program and the AI is exactly one node among many.
- Inputs. Analog probes (temperature, CO2) on ADC nodes, presence over GPIO with a pin-edge trigger, and field devices over MQTT subscribe.
- Triggers. Interval for periodic re-evaluation, threshold-with-deadband against oscillation, and MQTT message for event-driven response.
- Processing. Deterministic nodes read and sanity-check the sensors, and a single AI node (local SLM) fuses the context and proposes setpoints.
- Outputs. The setpoints go, buffered, via MQTT publish to the existing controller, never into its real-time loop.
The whole graph is deterministic and inspectable, and every step is traceable. The same single binary runs from a small gateway to an industrial controller, so moving up means redeploy, not rewrite. Durable local storage keeps history and state across restarts. From Hardware to Intelligence, with all of it staying inside the building.
Key Takeaways
- Context beats schedule. Sensor fusion of CO2, temperature, presence, weather and booking turns static control into demand-driven control.
- The agent does not regulate, it parameterizes. Agent-as-a-tool means setpoints only, buffered, never in the real-time loop. What can be done classically stays classical.
- Offline and GDPR-friendly. An on-device AI agent with a local SLM keeps occupancy data inside the building.
- One binary, many devices. From gateway to industrial controller, redeploy instead of rewrite.
- Security as architecture. Local execution, container isolation and signed distribution, designed for the EU Cyber Resilience Act.
Frequently Asked Questions
- Does an HVAC Edge Agent control the heating or ventilation directly?
- No. It does not sit in the real-time control loop. It writes only parameters and setpoints, such as a supply temperature, a ventilation stage, or a schedule offset, which are handed to the existing controller in buffered form. The controller keeps running its deterministic loop, and if the agent is unavailable it regulates with the last valid setpoint.
- How does sensor fusion improve on static schedules and heating curves?
- A schedule knows the time of day, not the occupancy. A heating curve knows the outdoor temperature, not the forecast or the solar gains through a glass façade. The agent combines CO2, temperature, presence, weather and room booking into one situational picture, turning context-blind control into demand-driven control.
- Why is the approach GDPR-friendly?
- Occupancy data is personal-adjacent. A local inference server runs a small language model (1 to 3B) next to the engine, so the analysis happens on the device and the data stays in the building. The agent works offline by default, and only an optional weather fetch or cloud connection reaches outward.
- How does the agent infer occupancy without cameras?
- It infers occupancy from CO2 readings together with simple motion or occupancy detectors connected over GPIO, with no camera, no microphone, and no image.
- Can the same agent run on different hardware, and what happens if it fails?
- The same single binary runs from a small gateway to an industrial controller, so moving up means redeploy, not rewrite, with durable local storage keeping history and state across restarts. If the agent is slow or unavailable, the system stays operational because the intelligence is an advisory layer, not a single point of failure.
Continue reading
What Is an Edge Agent? Definition and Architecture
An Edge Agent is an AI agent that runs on the device itself. It perceives, reasons and acts locally within a bounded, deterministic graph.
Graph-first vs Loop-first for Edge AI Agents
Why deterministic, auditable AI wins on the machine. Graph-first makes the workflow the program and the AI agent just one bounded node among many.
Why AI Agents Run on the Machine, Not the Cloud
Four reasons for on-device AI over the cloud. Latency, cost, connectivity and data sovereignty. How an Edge Agent works right on the device.
Related Hardware Guides
ESP32 People Counting with TFLite Micro
Run people counting on ESP32 with TFLite Micro. 520 KB SRAM, 240 MHz Espressif chip. Rated Good.
ESP32 Anomaly Detection with TFLite Micro
Run anomaly detection on ESP32 with TFLite Micro. Autoencoder setup, sensor integration, and real-time monitoring for industrial applications.
ESP32-C3 Sound Classification with TFLite Micro
Build sound classification on Espressif's ESP32-C3: TFLite Micro guide with specs, compatibility analysis, and step-by-step setup.
Sources
Explore More
Build it on the open-source edge runtime
The Edge Agent core is open source and runs without an account. Explore the runtime and model an HVAC sensor-fusion graph yourself.
Get Started Free