Cumulocity AIoT Hackathon 2026 solution: Automated IoT root cause engine

You asked for it, here you have it: The first solution artricle of the AIoT Hackathon 2026!

Team two-day-orange took second place at the Cumulocity AIoT Hackathon in Leipzig on September 21–22, 2026. In about 1.5 days, the team built a Model Context Protocol (MCP) server that a Cumulocity AI agent calls to find the real root cause behind a misbehaving device. In our recap, we promised a short article for each team, and this is the one for team two-day-orange.

The team: Sebastian (Phoenix Contact), Thomas & Henry (Deutsche Telekom) and Moritz (Schwarz Produktion)

The team worked in the AI Tools challenge, which asked hackers to build components that extend the AI capabilities of the platform, such as skills, MCP servers, or agents. Their task: give an AI agent a diagnostic engine that does the analysis a field technician usually does by hand.

The problem: intermittent faults hide their cause

When a device fails now and then, the evidence is spread across many places: alarm logs, short measurement spikes, firmware change history, and threshold rules. A technician has to combine these sources, compare the device with its neighbors, and separate the cause from the symptoms. This is slow manual work, and it is easy to get wrong.

To make this concrete, the team built a simulator that seeds a Cumulocity tenant with a realistic scenario. Six Power Node controllers sit in low-voltage distribution cabinets of a utility. Each node reports voltage, current, and cabinet temperature every minute. It raises its own alarms below 207 V and above 52 °C, and it restarts itself when the supply collapses, which leaves a 75-second gap in its telemetry.

  • Feeder-A at Substation Alpha carries nodes 01 to 04. Node 01 sits at the weak end of the line.
  • Feeder-B at Substation Beta carries nodes 05 and 06. This healthy feeder acts as a control group.

The ticket the agent receives reads like a real one: “Device sim-node-01 has been dropping off intermittently for about a week. […] Please analyse what happened around the last incident and tell us whether we need to swap the hardware, roll back the firmware update from last week, or escalate elsewhere.”

The data contains a deliberate trap. A firmware update reached the fleet 6 days before the fault, so it looks like the obvious suspect. The real cause is an overloaded Feeder-A, which sagged 5 times in one week, ending in an 18-minute brownout.

The solution: a diagnostic engine behind an MCP tool

The team built a Go microservice that exposes one MCP tool, analyze_device_failure_2, to the Cumulocity AI Agent Manager over Server-Sent Events (SSE). The agent passes a device, and optionally a fault time and a symptom. The tool returns a structured verdict for the agent and a link to an HTML diagnostic briefing for the field team.

The key design decision: the engine does the math, and the language model does the explaining. Large language models are weak at statistics over thousands of data points but good at turning a result into a clear answer. The MCP server computes baselines, anomalies, and correlations deterministically, so the agent reports facts instead of guesses.

In the simulated scenario, the two approaches reach different conclusions:

Symptom view (field technician) Engine view
Evidence Node 01 is offline, the cabinet is hot, a current alarm is active, and the firmware was recently updated Nodes 01 to 04 show a voltage drop in the same second, the firmware update predates the first dip, and the Feeder-B nodes run the same firmware without issues
Conclusion Replace node 01 or roll back the firmware Shared infrastructure fault on Feeder-A; the device works as designed
Recommended action Truck roll with a spare node Inspect the supply, not the node

How it works

The agent only calls the tool and relays the result; all data access and analysis run inside the MCP server, which reads from the Cumulocity APIs and writes nothing except the briefing.

The engine reaches its verdict in four steps.

  1. Resolve and fan out. The engine looks up the device by managed object ID, external ID, or name. The parent groups of the device give its neighbors. For the device and up to 6 neighbors, it collects measurements, alarms, events, firmware history, and threshold rules in parallel. If a neighbor is offline, the analysis continues with less data instead of failing.
  2. Detect. For each series, the engine takes a baseline from the pre-fault window, using the median and the median absolute deviation (MAD). These statistics ignore outliers, so the sag itself does not pull the baseline down. The engine then flags two kinds of anomaly: a threshold breach against a configured rule, and a deviation of at least 6 sigma with a meaningful relative change. It also finds gaps in the telemetry.
  3. Correlate. The engine searches for the strongest anomaly of the target device on every neighbor. A match counts only when the onset is simultaneous.
  4. Conclude. Neighbors on the same feeder that sag in the same second point to shared infrastructure. An anomaly that no neighbor shows points to the device. The engine rules out the firmware update when it predates the first symptom or also runs on unaffected assets.

Cause before consequence

The most interesting detail is in step 3. A node with a constant-power load draws more current when the voltage drops. The current spike therefore has a higher z-score than the voltage sag, even though it is only a consequence. If the engine ranked anomalies by statistical strength alone, it would correlate on current and point at the wrong quantity.

The team solved this with two rules. A rule-backed threshold breach outranks a statistical deviation. Among equal breaches, the earlier one wins, because an effect cannot happen before its cause. The severity of a threshold rule does not decide the ranking. A CRITICAL temperature rule would otherwise send a technician to check the ventilation while the supply keeps collapsing.

The engine also counts only the neighbors that report the series in question. A door sensor in the same asset group has no voltage data, so it is not evidence that the voltage is fine. If no neighbor reports the series, the verdict says so and drops to low confidence.

The result: a briefing the technician can act on

The tool produces a standalone HTML diagnostic briefing. It contains an SVG chart per series with threshold lines and the fault marker, the evidence tables, the verdict, and recommended steps for the field technician. The document has no scripts and no external resources, so it opens from a file, an email attachment, or a link. A Markdown version serves chat clients.

The server publishes each briefing twice:

  • As an inventory binary in the tenant, tagged c8y_DiagnosticBriefing, so it stays with the device history
  • Under /reports/<id>.html on the microservice, which is the link the agent hands back in the chat

For Power Node 01, the briefing states that the Feeder-A neighbors show a simultaneous voltage sag, that the current spike is a consequence, and that firmware 1.4.2 is ruled out because it predates the fault. The recommendation: do not replace the node; inspect the shared supply.

Limitations and next steps

The team listed the current limits of the engine openly:

  • Sampling: Devices must be grouped like the real topology. The engine downsamples to cover longer windows and checks at most 6 neighbors.
  • Causality: The engine does not separate external events from device or system interaction, and it does not test correlation against causality.
  • Anomaly detection: The engine needs a clean pre-fault window and focuses on a single anomaly.
  • Context: The engine uses simple heuristics and does not consider ambient factors or configuration differences.

Interested? Try it yourself

The code, the simulator, and setup instructions are on GitHub:

Congratulations to team two-day-orange on second place for that awesome achievement! :clap: