How ahmed-metawea/utilityguard works
Care Grid is a simulated, multi-utility digital twin with a web dashboard. Its main workflow advances the water, electricity and cooling simulation, detects incidents, generates evidence-backed agent findings, and convenes a crew-priority board; a person approves or rejects the plan before dispatch changes the simulated network. The product also exposes forecasting, early warnings, cost and decision analysis, siting, savings, reporting and an AI lab. The graph follows documented capabilities and visible source references; several feature implementations were not sampled, so their internal links are omitted or documented at the product level.
Main entry points: App.tsx Dashboard Application · service.py Agent Service · runtime.py Live Runtime · specialists.py Network Specialists
Components 24
Twin and Detection
- Utility Topology
backend/app/sim/topology.py - Twin Engine
backend/app/sim/engine.py - Live Runtime
backend/app/runtime.py - Incident Detection
backend/app/detection/__init__.py
Agents and Board
- Agent Service
backend/app/agents/service.py - Agent Orchestrator
backend/app/agents/orchestrator.py - Network Specialists
backend/app/agents/specialists.py - LLM Gateway
backend/app/agents/llm.py - Board Analysis
backend/app/board/analysis.py - Board Meeting
backend/app/board/session.py - Approval and Dispatch
backend/app/board/dispatch.py
Analysis and Planning
- Forecasts and Warnings
backend/app/ml/service.py - Cost and Evidence
backend/app/cost/__init__.py - Decision Studio
backend/app/decision.py - Siting Evaluation
backend/app/siting.py
Backend Services
- Briefing and Savings
backend/app/briefing.py - HTTP and WebSocket API
backend/app/main.py
Web Application
- Dashboard Application
frontend/src/App.tsx - Live Stream Client
frontend/src/api/ws.ts - Live Twin Map
frontend/src/map/CityMap.tsx - Forecast View
frontend/src/pages/Forecast.tsx - Board Interface
frontend/src/ui/Board.tsx - AI Lab
frontend/src/pages/Lab.tsx
Other components
- Operator
Connections 27
- Operator → Dashboard Application: uses dashboard
README.md - Utility Topology → Twin Engine: configures network
backend/app/sim/engine.py - Twin Engine → Live Runtime: advances ticks
backend/app/runtime.py - Live Runtime → Incident Detection: runs tick hooks
backend/app/agents/service.py - Live Runtime → Forecasts and Warnings: feeds live data
backend/app/ml/service.py - Incident Detection → Agent Service: notifies incidents
backend/app/agents/service.py - Agent Service → Network Specialists: runs analysis
backend/app/agents/service.py - Agent Service → Agent Orchestrator: routes chat
backend/app/agents/service.py - Agent Orchestrator → Network Specialists: consults agents
backend/app/agents/orchestrator.py - Network Specialists → LLM Gateway: requests wording
backend/app/agents/specialists.py - Network Specialists → Cost and Evidence: computes figures
backend/app/agents/specialists.py - Agent Service → Board Meeting: convenes board
backend/app/agents/service.py - Board Meeting → Board Analysis: uses calculated facts
backend/app/board/session.py - Board Analysis → Cost and Evidence: prices alternatives
backend/app/board/analysis.py - Operator → Approval and Dispatch: approves or rejects
README.md - Approval and Dispatch → Twin Engine: applies crew repair
backend/app/board/dispatch.py - Operator → Decision Studio: compares action options
README.md - Operator → Siting Evaluation: evaluates proposed load
README.md - Operator → Briefing and Savings: reviews daily insights
README.md - Dashboard Application → HTTP and WebSocket API: loads product data
frontend/src/App.tsx - Dashboard Application → Live Stream Client: starts live stream
frontend/src/App.tsx - Live Stream Client → HTTP and WebSocket API: receives twin updates
- Dashboard Application → Live Twin Map: shows live twin
README.md - Dashboard Application → Forecast View: opens forecasts
frontend/src/App.tsx - Dashboard Application → Board Interface: shows board decisions
README.md - Dashboard Application → AI Lab: opens AI lab
frontend/src/App.tsx - HTTP and WebSocket API → Live Runtime: streams twin state
README.md