Table of Contents
Fetching ...

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.

X-GridAgent: An LLM-Powered Agentic AI System for Assisting Power Grid Analysis

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 (, , ). 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.
Paper Structure (17 sections, 11 equations, 5 figures, 1 table)

This paper contains 17 sections, 11 equations, 5 figures, 1 table.

Figures (5)

  • Figure 1: The four key features of the proposed X-GridAgent system.
  • Figure 2: Overview of the three-layer hierarchical architecture of X-GridAgent.
  • Figure 3: Illustration of the iterative process of the LLM-driven prompt refinement with human feedback for correctly invoking the "run_contingency()" function. (In the third iteration, although the outcome is correct, it does not specify which contingency causes the voltage violation. This oversight is not detected by the judge agent, requiring the human expert to point it out in the feedback.)
  • Figure 4: Comparison between conventional RAG methods and the proposed schema-adaptive hybrid RAG algorithm.
  • Figure 5: The user interface of the X-GridAgent system. (A user enters a query in the chat window and clicks “SEND” to submit it. X-GridAgent performs reasoning and analysis, then displays the generated plan and execution results. Clicking “CLEAR” clears the historical memory and starts a new chat. The figure shows the system’s response to a user query requesting a visualization of the Texas 2k-bus grid network, and a follow-up query to run a DC optimal power flow (OPF) analysis is currently being typed.)