DEV Community

sattuharshitha
sattuharshitha

Posted on

I Taught an Infrastructure Agent to Remember Failures With Hindsight

I built ASII-Hindsight, an infrastructure risk intelligence system based on a simple idea: detecting a risk is not enough — the system should also remember what happened in similar situations before.

Infrastructure failures rarely come from one signal. A bridge can have poor condition, heavy rainfall, increased traffic, drainage problems, and delayed maintenance at the same time. Looking at these signals separately can miss the bigger picture.

So I built a system that combines them and uses a Hindsight-style memory layer to compare current situations with previous failures and near-misses.

The system works with:

• Bridges, roads, and buildings
• Rainfall and weather conditions
• Traffic levels
• Infrastructure condition
• Maintenance history
• Historical incidents and near-misses

It uses five logical agents:

• Weather Agent
• Traffic Agent
• PWD Condition Agent
• GIS Agent
• Municipality Agent

The main idea is simple:

Current warning signs → Search historical memory → Find similar incidents → Detect failure pattern → Assess risk → Recommend preventive action

For example, instead of simply showing:

Risk: High

the system can identify a similar historical case involving heavy rainfall and foundation problems, recognize a recurring pattern, and recommend actions such as inspecting vulnerable areas and checking drainage.

A simplified version of the memory matching logic is:

if (incident.type === asset.type) {
score += 25;
}

if (incident.traffic_level === asset.traffic_level) {
score += 15;
}

if (incident.is_near_miss) {
score += 10;
}

The system also detects patterns such as:

Heavy Rain + Poor Drainage
Foundation Scour
Delayed Maintenance
Structural Cracking
Traffic Overload
Flood + Weak Foundation
Ignored Warning Signs

One important part of the project is near-miss memory. A near-miss does not mean nothing happened. It can contain valuable information about what almost went wrong and what could have prevented it.

The current prototype uses LIVE SIMULATION for telemetry rather than claiming access to real government infrastructure sensors.

The project uses React, Vite, Node.js, Express, SQLite, Leaflet, and a local similarity/pattern-matching engine.

The project is inspired by the ideas behind Hindsight and agent memory, while the current prototype implements its own local Hindsight-style memory approach.

GitHub:

I would love to hear feedback from people working on AI agents, agent memory, or infrastructure intelligence.

Top comments (0)