X-GridAgent: An LLM-Powered Agentic AI System for Assisting Power Grid Analysis
Yihan, Wen, Xin Chen
TL;DR
X-GridAgent tackles the challenge of automated, interpretable power grid analysis by marrying large-language-model reasoning with domain-specific tooling in a three-layer architecture ($\mathcal{P}$, $\mathcal{C}$, $\mathcal{A}$). It introduces two technical innovations: LLM-driven prompt refinement with human feedback and a schema-adaptive hybrid RAG strategy to ground responses in structured grid data. The system is implemented with MCP-enabled domain servers on Pandapower and validated across PF, OPF, and contingency analyses on IEEE 39/118-bus and the Texas 2k grid, achieving reliable, end-to-end automation with robust memory and retrieval capabilities. This work advances practical AI-assisted grid analysis by enabling scalable, extensible tool integration and setting the stage for dynamic and advanced decision-support capabilities in future work.
Abstract
The growing complexity of power system operations has created an urgent need for intelligent, automated tools to support reliable and efficient grid management. Conventional analysis tools often require significant domain expertise and manual effort, which limits their accessibility and adaptability. To address these challenges, this paper presents X-GridAgent, a novel large language model (LLM)-powered agentic AI system designed to automate complex power system analysis through natural language queries. The system integrates domain-specific tools and specialized databases under a three-layer hierarchical architecture comprising planning, coordination, and action layers. This architecture offers high flexibility and adaptability to previously unseen tasks, while providing a modular and extensible framework that can be readily expanded to incorporate new tools, data sources, or analytical capabilities. To further enhance performance, we introduce two novel algorithms: (1) LLM-driven prompt refinement with human feedback, and (2) schema-adaptive hybrid retrieval-augmented generation (RAG) for accurate information retrieval from large-scale structured grid datasets. Experimental evaluations across a variety of user queries and power grid cases demonstrate the effectiveness and reliability of X-GridAgent in automating interpretable and rigorous power system analysis.
