Skip to content
Miguel Escribano
Go back

Building an AI agent for indoor air quality: architecture, MCP tools, and a human gate

Edit page

Building an AI agent for indoor air quality

I am building Anne, an agentic IAQ consultant that runs as a plugin inside an AI coding assistant (Claude, Cursor). She reads live sensor data, scores it outside the language model, and waits for a human before she recommends an action. The MVP is a usable session on real rooms: live readings, a score computed in tools, a pause for the operator, then recommendations and a page that can be shared.

Table of contents

Open Table of contents

Indoor air monitoring is scaling faster than the capacity to interpret it

Deployment is accelerating: the revised EU Energy Performance of Buildings Directive (2024) requires indoor air quality monitoring devices in non-residential buildings, and certifications like WELL keep adding demand. Reading that data is still expert work. Each framework — WELL, EPBD, ASHRAE, WHO — has its own units and averaging periods, and the result is expert hours spent on routine interpretation, and compliance decisions that arrive late.

And I found myself using AI apps like everyone else. If you paste the same CSV into a general chatbot, the reply can include invented thresholds, no audit trail, and numbers that change if you ask twice.

Anne is for that work. She runs on Indoor Air Quality (IAQ) and outdoor Ambient Air Quality (AAQ) data. The operator asks, she fetches data, and the human decides what is used next.

Evidence before recommendations

A session starts when the user greets Anne in the assistant. She lists the devices on the account and the jobs she can run: a snapshot, a 24-hour compliance view, a WELL-shaped audit, a trend, and a ventilation check with outdoor context.

Greeting Anne in the coding assistant

Figure 1. Start of a session.

Devices and tasks Anne offers

Figure 2. Rooms on the account, and the tasks she can run. Empathetic tone is opt-in.

This walkthrough uses one indoor space and data from 4 and 5 April 2026. Anne pulls the latest readings, a 24-hour window, outdoor weather, and a score, then presents findings: per-pollutant values, an overall grade, what limited the score overnight, and what is missing. On this run radon is blank because the room has no dedicated monitor. Recommendations wait until the operator has answered.

Findings for one room, 5 April 2026

Figure 3. Observe and orient. Tool calls produce the numbers. The model writes the sentences.

On this run the score was 10 for most of the afternoon. The night before, ozone brought the rolling score down to 4 around midnight, 1.6 ppb under the 8-hour limit. Morning temperature dipped to 16.9 °C. She asks the operator whether that ozone spike is a pattern and whether heating follows occupancy, then she waits.

Human gate before recommendations

Figure 4. “Any context before I recommend actions?”

Agudo et al. found that if people see an AI suggestion first, their own judgement collapses even when the model is wrong. In IAQ a wrong call is a compliance problem, and sometimes a health one. Anne shows evidence first. If the user asks for an empathetic reading, she labels it as inference and asks whether it matches what occupants report.

24-hour score with a short narrative

Figure 5. Same session, last 24 hours. Ozone lowered the score. The time series shows the later rise.

Once the human adds context (“focus on cost”, “people arrived at 8”, occupancy, or anything else the sensors miss), she proposes actions and writes a small HTML dashboard. For each pollutant that missed its target she states the current value, the target, a concrete action, and the expected effect on the score if that action is taken. A facility manager can open the HTML file without reading the assistant thread.

Operator request for an empathetic reading and the dashboard

Figure 6. The operator steers the session in plain language: tone and dashboard are requested explicitly.

Thermal and comfort section of the generated HTML dashboard

Figure 7. A section of the generated dashboard. The highlighted question asks whether the inference matches what occupants report.

This run is a GO IAQS assessment. For a fuller walkthrough of that use case (score, compliance window, dashboard, and how the white paper is implemented), see Sotirios Papathanasiou’s piece on the GO AQS blog [2].

GO IAQS narrative and compliance table for the same run

Figure 8. The GO IAQS narrative and compliance verdict for the session: numbers from the tools, sentences from the model.

An architecture for reliability and safety

The stack has three layers.

April architecture: plugin, one MCP server, external APIs

Figure 9. The tool layer computes. The model orchestrates and writes.

The separation of work: language vs. calculations

Language models mishandle arithmetic; they are simply not good with numbers. That’s why the split follows one rule: numbers never depend on the language model and are an output of deterministic scripts. Only then does the LLM interpret them. That’s how we make sure that the same concentrations always produce the same score, and a 38-test suite covers band edges and rounding traps. Knowledge is loaded by skill from named Markdown files. When the answer has to cite a limit, those files are the source.

Adding a tool later leaves the model as it is, and any assistant that supports MCP and skills can host the plugin, so the model vendor can change without a rewrite. In this version the numbers come from the tool output. The chat log is the surrounding text.

Limits of this MVP

This is a first MVP. Sessions run in a coding assistant. Evaluations of how the language model behaves, and of the calculations, are still being set up. There is no comparison against a human consultant, no record of runs outside the thread, and the standards files are edited by hand.

I build Anne at inBiot, where I lead Revenue Operations. If you work on IAQ, sensors, or agents applied to measured building data, I can walk you through a live session.

LinkedIn

References

  1. Agudo U, Liberal KG, Arrese M, Matute H. The impact of AI errors in a human-in-the-loop process. Cognitive Research: Principles and Implications. 2024;9(1):3. https://doi.org/10.1186/s41235-023-00529-3
  2. Papathanasiou S. Bridging the gap: GO IAQS inside an inBiot AI agent and what we’re learning building an agentic IAQ consultant. GO AQS; 20 April 2026. https://goaqs.org/2026/04/20/bridging-the-gap-go-iaqs-inside-an-inbiot-ai-agent-and-what-were-learning-building-an-agentic-iaq-consultant/

Edit page
Share this post: