Institutional memory for power grid operators — built on Hermes Agent by NousResearch.
Built for the Hermes Agent Hackathon 2026.
Every time a grid failure happens and engineers bring it back online, that knowledge gets written into a report. Most of those reports are never read again. The next time the same fault occurs, the same diagnosis happens from scratch — sometimes years later, sometimes at 3am during a heat wave.
Worse: after major incidents, investigators recommend corrective actions. Many of those recommendations are never implemented. The failure recurs. The recommendation sits in a PDF.
GridTrace changes that.
GridTrace is a self-improving agent that ingests grid incident reports and makes their knowledge queryable in real time.
Feed it a new fault description. It searches 787 historical US power grid incidents spanning 2019–2026 and returns:
- How many times this pattern has occurred before
- Which balancing authority, when, and at what scale
- The unimplemented fix — the corrective action recommended after prior incidents that was never acted upon
- Whether the event matches a NERC-verified documented failure
- Whether the pattern is systemic across multiple balancing authorities
The key field is unimplemented_fix. GridTrace doesn't just say "this happened before." It says: "here is the specific fix that was recommended and ignored — which may be why it is happening again."
GridTrace uses Hermes Agent's native skill system. Every query updates the skill library:
- After each incident query — the skill file for that
(root_cause, balancing_authority)pair is patched with reasoning shortcuts discovered during the session - After cross-BA pattern detection — a meta-skill is created documenting the systemic pattern
- After each nightly digest — seasonal patterns are written to persistent memory
Session 50 is faster and more accurate than session 1. The skill library grows with use.
Vigil Infrastructure Memory Dataset — 787 curated US power grid incident records spanning 2019–2026.
Built from EIA EBA (Energy Information Administration Bulk Electricity API) hourly demand time series across 20 balancing authorities. Hours where demand dropped more than 12% below a rolling 7-day median baseline were flagged as anomaly events, deduplicated, and cross-referenced against 13 known NERC documented events.
| Field | Description |
|---|---|
incident_id |
Unique incident identifier |
event_date |
Date of the event |
balancing_authority |
ERCO, CISO, PJM, MISO, NYIS, etc. |
severity |
CRITICAL / HIGH / MEDIUM |
mw_deviation |
MW drop from baseline |
duration_hours |
Duration of the anomaly |
root_cause |
Inferred or verified failure cause |
nerc_label |
NERC-verified event name if applicable |
unimplemented_fix |
The fix recommended after the incident that was never implemented |
Composition: 197 CRITICAL · 404 HIGH · 186 MEDIUM
NERC-verified anchor events: 47 records tied to real documented failures including the 2021 Texas Winter Storm Uri, 2020 California Rolling Blackouts, 2023 Texas Heat Wave Near-Miss, and others.
The dataset is not included in this repository. Place your CSV at
data/gridtrace_incidents.csv.
Browser (React dashboard)
↓
FastAPI server (gridtrace_server.py)
↓ pandas queries (fast, in-memory)
↓ structured match report
↑ streaming response
Hermes Agent (CLI, background)
↓ reads AGENTS.md + SOUL.md
↓ writes/patches skill files after each query
↑ skill library grows over time
The data layer (CSV querying, match report formatting) runs entirely in the FastAPI server using pandas — fast and reliable. Hermes Agent handles reasoning, skill writing, and the self-improvement loop.
- Python 3.10+ with pandas, fastapi, uvicorn, python-dotenv
- Node.js 18+
- Hermes Agent installed
- A Nous Portal subscription or OpenRouter API key
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
source ~/.bashrc
hermes login # Nous Portal OAuthgit clone https://github.com/yourusername/gridtrace.git
cd gridtrace
cp .env.example .env
nano .env # fill in your paths.env fields:
GRIDTRACE_DIR=/home/youruser/gridtrace
HERMES_BIN=/home/youruser/.hermes/hermes-agent/venv/bin/hermes
SKILLS_DIR=/home/youruser/.hermes/skills/grid
mkdir -p data/
cp /path/to/gridtrace_incidents.csv data/pip install fastapi uvicorn pandas python-dotenvpython gridtrace_ingest.py --dry-run # preview
python gridtrace_ingest.py # write skills
cp -r skills/grid/ ~/.hermes/skills/grid/cp SOUL.md ~/.hermes/SOUL.md
# AGENTS.md is read automatically when hermes is launched from this directorypython gridtrace_server.py
# Running at http://localhost:8000cd gridtrace-ui
npm install
npm run dev
# Running at http://localhost:5173# In a separate terminal, from the gridtrace directory:
hermes gateway # enables cron + background skill writingOpen http://localhost:5173 and describe an incident in plain language:
ERCO, resource adequacy failure, extreme heat, 13000 MW deviation, 8 hours
PJM, load shedding near-miss, demand spike, 9000 MW deviation, 4 hours
Is resource adequacy extreme heat systemic across multiple balancing authorities?
GridTrace parses the query, searches the dataset, and streams back a structured match report with the unimplemented fix prominently highlighted.
| Query | What GridTrace does |
|---|---|
ERCO, extreme heat, 13000 MW, 8 hours |
Direct BA + cause match, surfaces prior incidents and unimplemented fix |
PJM, load shedding near-miss, 9000 MW |
Pattern match, broadens to all BAs if local count < 3 |
Is extreme heat systemic across multiple BAs? |
Cross-BA analysis, flags systemic patterns |
Show me all ignored warnings |
Accountability report — all patterns with recurring unimplemented fixes |
gridtrace/
├── data/
│ └── gridtrace_incidents.csv ← dataset (not in repo)
├── skills/
│ └── grid/ ← base skill files (generated by ingest)
├── gridtrace-ui/ ← React dashboard (Vite)
│ └── src/
│ └── App.jsx
├── AGENTS.md ← Hermes workflow instructions
├── SOUL.md ← GridTrace agent persona
├── gridtrace_ingest.py ← bulk skill generator
├── gridtrace_server.py ← FastAPI bridge
├── .env.example ← config template
└── .gitignore
Hermes skill library (auto-generated, lives outside the repo):
~/.hermes/skills/grid/
├── resource_adequacy_extreme_heat_erco/
│ └── SKILL.md ← base + reasoning shortcuts
├── load_shedding_near_miss_pjm/
│ └── SKILL.md
├── meta_resource_adequacy_extreme_heat/
│ └── SKILL.md ← cross-BA meta-skill (agent-created)
└── ...
GridTrace can run a scheduled daily digest delivered to Telegram, Discord, or Slack via Hermes gateway:
# Inside hermes CLI
/cron add "0 6 * * *" "Run the GridTrace nightly digest"
hermes gateway installThe digest covers events from the past 7 days, flags watch BAs (2+ CRITICAL events), surfaces all outstanding unimplemented fixes, and detects cross-BA systemic patterns.
- Hermes Agent — NousResearch's open-source self-improving agent framework
- Hermes 3 Llama 70B — NousResearch's tool-calling model via Nous Portal
- EIA Bulk Electricity API — source data for the incident dataset
- FastAPI — API server
- React + Vite — dashboard frontend
- pandas — dataset querying
Power grid operators retire. Their knowledge — accumulated over decades of fault diagnosis, near-misses, and recovery procedures — retires with them. Recommended fixes go unimplemented because there is no system to surface them when the same fault recurs.
GridTrace is a step toward institutional memory that persists, grows, and actively surfaces what was known but forgotten.
Built for the Hermes Agent Hackathon — March 2026.
Judged on creativity, usefulness, and presentation.
MIT