India's 2012 blackout — 620 million people — happened because every individual component worked correctly, but their interactions caused the collapse.
ARCIS monitors the conversations between AI agents in a smart grid substation, not the physical grid itself. It detects dangerous coordination patterns before they cause any physical disruption, and intervenes autonomously.
Physical Environment Condition injected (random, every 35-70 seconds)
↓ (temperature rises, load surges, voltage sags)
Physics model responds realistically
↓ (transformers heat, feeders overload)
5 AI agents per substation react to changed sensor readings
↓ (alerts fire, commands issued, forecasts updated)
Agent interaction PATTERN changes (message rate, direction, content)
↓ (ARCIS observes passively — zero modification to agents)
ARCIS detects the emerging failure class
↓ (before any physical threshold is crossed)
ARCIS predicts time-to-failure using Monte Carlo simulation
↓
ARCIS selects minimum-disruption intervention strategy
↓
Intervention executed autonomously
↓
Environment returns to normal — story complete
| Physical Event | Failure Class | What Happens |
|---|---|---|
| Transformer Thermal Runaway | Cascade Starvation | FaultDetection floods bus → other agents starved |
| Industrial Load Surge | Oscillation | LB ↔ Forecasting ping-pong loop |
| 11kV Busbar Voltage Sag | Race Condition | Protection + Restoration both command same breaker |
| Inter-substation Tie Line Overload | Collusion | Both CoordAgents route to same path |
| CT Metering Calibration Fault | Semantic Drift | MW vs MVA unit mismatch |
| Protection Relay Maloperation | Contradiction | OPEN + CLOSE on same breaker simultaneously |
cd ARCIS
pip install -r requirements.txtGet a free API key at https://console.groq.com
# Windows
set GROQ_API_KEY=your_key_here
# Then run
python main.pyWithout the key, ARCIS works fully — agents use rule-based explanations instead of LLM.
python main.pyOpen browser: http://localhost:8000
-
"What is happening right now" box — 4-step plain English story:
- Step 1: Physical event (e.g. "Transformer Thermal Runaway")
- Step 2: How agents react (e.g. "FaultDetection firing 8 alerts/sec")
- Step 3: What interaction failure forms (e.g. "Cascade Starvation")
- Step 4: What ARCIS does (e.g. "Rate-limit applied, cooling initiated")
-
Two substations — 5 transformers, 7 feeders, 10 breakers each
- Substation A: Urban load centre
- Substation B: Solar farm + agricultural (solar generation shown live)
-
ARCIS Detection Board — 6 failure class cards each showing:
- Confidence % (rising as physical event develops)
- How the failure arose
- What ARCIS did to resolve it
-
Agent Interaction Graph — D3 force graph, edges turn red when abnormal
-
Intervention panel — every ARCIS action with Monte Carlo disruption score
ARCIS/
├── main.py Entry point
├── config.py All constants + Groq API key
├── requirements.txt
├── core/
│ ├── message.py Message dataclass
│ ├── message_bus.py Async pub/sub bus
│ ├── vector_clock.py Lamport vector clocks
│ ├── physics.py Transformer/feeder/breaker physics
│ ├── interaction_graph.py Live edge weight computation
│ ├── environment.py Physical condition catalogue
│ ├── arcis.py ARCIS meta-layer
│ └── groq_client.py Groq API (Llama 3.3-70B)
├── agents/
│ ├── base_agent.py
│ ├── fault_detection_agent.py Isolation Forest anomaly detection
│ ├── protection_agent.py Relay logic + LLM consequence reasoning
│ ├── load_balancing_agent.py NetworkX graph optimisation
│ ├── load_forecasting_agent.py ARIMA + EWMA (LSTM-style)
│ ├── restoration_agent.py Sequential planning + LLM
│ └── coordination_agent.py Inter-substation coordination
├── detectors/
│ └── all_detectors.py 6 detectors (Tarjan SCC, CUSUM,
│ Cosine sim, KL divergence,
│ K-Means, Vector clocks)
├── prediction/
│ └── failure_predictor.py Multi-signal prediction engine
├── intervention/
│ └── intervention_engine.py Monte Carlo counterfactual simulation
├── injection/
│ └── failure_injector.py Physical environment condition injector
└── dashboard/
├── app.py FastAPI + WebSocket
└── templates/index.html Story-driven real-time dashboard