Overview of agents in grid operations

As the electric grid becomes increasingly complex, with the integration of renewable energy sources, demand-side participation, and distributed energy resources45,46, there is a growing need for intelligent systems that can assist human operators in managing this complexity. The term LMA reflects a novel paradigm that transcends traditional AI assistants, offering not merely task augmentation but role emulation, agent specialization, and hierarchical cooperation, tightly aligned with human operators’ workflows (for the role of agents in grid dispatching see Supplementary Note 7).

As shown in Fig. 3, we advocate for a progressive and modular approach to deploying intelligent agents in grid operations, with human-AI collaboration (for the design principle see Supplementary Note 7).

Identify the highest-cognitive-load functions in the dispatch workflow, those that are prone to error, require extensive human interpretation, or demand constant attention.

Deploy targeted LMAs to support the operators in those specific functions, effectively acting as smart patches that increase resilience and reduce operator burden47.

Iteratively expand LMA coverage across other desks and functions, building a network of intelligent agents that can collaborate with each other and with human operators.

Towards full automation, gradually shift from human-in-the-loop to human-on-the-loop paradigms48, where operators supervise increasingly autonomous agent workflows.

This strategy envisions a future where machines can eventually do all the dispatching work, not through a monolithic AI replacing humans, but through a composite system of intelligent agents49, each mastering a part of the workflow and working together in a reliable and human-aligned way. In line with the growing concern of AI-induced deskilling, LMAs are designed not to automate reasoning away from humans, but to scaffold learning and support operator development through explainable action paths, memory-based dialogs, and continuous collaborative planning.

Fig. 3: A progressive strategy for deploying large model agents (LMAs) in grid operations.Fig. 3: A progressive strategy for deploying large model agents (LMAs) in grid operations.

In Stage 1, specialized LMAs are introduced as intelligent assistants to support specific high-burden tasks (e.g., forecasting, contingency analysis), acting as smart patches that reduce operator workload and improve resilience. In Stage 2, LMAs are gradually extended across different operational desks (e.g., Load, Generation, Security), forming a collaborative network of agents that communicate, coordinate, and align decisions across domains. In Stage 3, functional agents are organized into a modular system resembling traditional control room roles, enabling end-to-end autonomous dispatching and real-time adaptation under the supervision of human operators.

Data preparation and task definition

Figure. 4 shows the procedures for customizing operation-oriented agents, forming the following framework of data preparation, prompt design, context design, RAG for grid knowledge50, task instruction tuning, evaluation, safety alignment, and deployment into control rooms. The customization of LMAs for power grid dispatching begins with a rigorous understanding of the operational tasks and the preparation of high-quality, context-rich data. Unlike general-purpose natural language tasks, power system operations involve domain-specific language, structured and unstructured data, real-time dynamics, and safety-critical decision-making. Therefore, the success of LMAs in this domain hinges on the careful definition of dispatching tasks and the systematic preparation of corresponding datasets.

Fig. 4: A comprehensive framework for customizing operation-oriented large model agents (LMAs) in power grid operations.Fig. 4: A comprehensive framework for customizing operation-oriented large model agents (LMAs) in power grid operations.

In task-oriented data preparation, grid operations are translated into model-accessible tasks using structured datasets derived from manuals, logs, supervisory control and data acquisition (SCADA) systems, and historical dispatch records. In prompt design, well-crafted, expert-informed prompts, including few-shot examples, multi-turn dialogs, and chain-of-thought reasoning, bridge the gap between general-purpose models and specific dispatch scenarios. In context engineering, operational context such as grid topology, real-time states, and dispatch policies is injected via long-context memory, external tool calls, and agent memory mechanisms to ensure situational awareness. In retrieval-augmented generation (RAG) for grid knowledge, external domain-specific documents like emergency playbooks, grid codes, and past incidents are retrieved and fused into the model input for grounded decision-making. In task instruction tuning, models are fine-tuned using supervised learning, preference optimization, or reinforcement learning with feedback to learn dispatch logic, constraints, and expert preferences. In evaluation and safety alignment, model outputs are evaluated on accuracy, interpretability, and stability, with guardrails, verification tools, and human-on-the-loop oversight ensuring accountability. For deployment into control rooms, agents are embedded into real-world operations via application programming interfaces (APIs), user interface (UI) assistants, and function-calling systems, enabling safe and collaborative interaction with operators.

Grid dispatching encompasses a wide range of operational tasks (e.g., load forecasting, resource coordination, contingency analysis and emergency handling, multi-area Interconnection, and maintenance and outage scheduling; for definition see Supplementary Note 8), each requiring distinct reasoning capabilities and contextual awareness. To enable LMAs to effectively assist in these tasks, each must be translated into language-based, model-accessible formats, such as prompt-response pairs or multi-turn dialogs. The quality and diversity of data are critical for grounding LMAs in the operational realities of power systems. These heterogeneous sources must be cleaned, annotated, and transformed into usable datasets. Based on these data datasets, task-oriented datasets, together with semantic representations (for statement see Supplementary Note 9), can be constructed to enhance LMAs from instruction tuning, retrieval, and in-context learning. Data sources include operational manuals and grid codes; maintenance logs and operator notes; historical dispatch records; SCADA/EMS logs; weather data; sensor and equipment status data; event logs and emergency drills; and simulation engines51.

To assess what constitutes a minimal viable dataset for agent customization, we define three key dimensions of adequacy: (1) modal diversity (covering telemetry, context, and procedural logs), (2) task relevance (data linked to high-burden dispatch tasks), and (3) semantic density (information-dense records like annotated contingency plans). Rather than requiring full hindsight telemetry, early-stage LMAs can be bootstrapped from curated operational manuals, past incident reports, and synthetic data generated via simulation engines. Given that high-quality operations data remains limited in many utility contexts (for minimal data quantity, see Supplementary Note 9), all agent customization workflows include explicit data volume tracking to support controlled scaling. For each task class (e.g., contingency handling, re-dispatch), it is suggested to log quantities of prompt pairs, distribution of source types (e.g., EMS logs, maintenance notes), and estimated coverage across grid regions.

In addition to task-oriented datasets derived from manuals, logs, and simulations, we highlight the importance of adversarially generated and curriculum-structured data52. As detailed in Supplementary Note 9, these samples are not limited to manually enumerated disturbances, but may arise from iterative simulator interaction, parameter randomization, or agent-driven search for failure-inducing conditions. Such data are especially valuable for uncovering blind spots in LMA reasoning and for reducing the dependence of training coverage on human assumptions alone. In early-stage deployments53, these curriculum-generated samples can serve as a bridge between static rule-based test cases and more adaptive, open-ended stress testing.

Prompt design for scenarios

LMAs are effective when guided by well-designed prompts that simulate the complexity of real-world grid dispatching tasks. In the context of power system operations, prompt engineering is not a mere input formatting exercise; it is a core strategy for aligning general-purpose language models with the specific reasoning, coordination, and safety requirements of electric grid scenarios. This section explores advanced prompt design techniques tailored for grid operations, including few-shot learning setups, multi-agent collaboration prompts15, and the incorporation of chain-of-thought reasoning to enhance interpretability and dispatching quality.

Few-shot prompting introduces the model to task structure and expected outputs by providing a small number of carefully selected examples directly in the prompt for a typical few-shot template see Supplementary Prompt Examples 1 and 2. This is particularly effective for complex tasks such as load re-dispatching in response to generator outages, reactive power compensation dispatching, and contingency response generation. These examples teach the model the task format, domain vocabulary, and types of decisions expected, without requiring fine-tuning.

Grid operations are inherently multi-agent: different desks (e.g., Load, Generation, Security) work together to achieve a coordinated outcome. Prompting can simulate this environment by framing dialogs between virtual agents54, each representing a control room role (see Supplementary Prompt Example 3). This format encourages the model to simulate reasoning across perspectives, negotiate constraints, and form consensus, just like human operators.

Chain-of-thought prompting enhances transparency and accuracy by encouraging the model to think step-by-step before producing a final plan (see Supplementary Prompt Example 4). This is particularly useful in situations requiring multi-stage reasoning, such as evaluating multiple contingencies, coordinating time-dependent dispatch schedules, and balancing competing priorities (e.g., cost vs. reliability). This structured reasoning allows operators to understand how the model reached its suggestion, increasing trust and ease of validation.

Crafting high-quality prompts often requires close collaboration with domain experts who understand the exact language, constraints, and thought processes used in real dispatch scenarios. (Supplementary Prompt Example 5) serves as a template co-designed with grid operation experts to guide the model in generating a load re-dispatch plan following prediction deviation. By using such templates across different grid conditions (e.g., weather events, equipment outages, load anomalies)55, LMAs can be trained and evaluated under realistic and diverse operational contexts.

To minimize additional workload on human operators, LMAs are designed to function primarily as assistive copilots that extract prompts automatically from real-time SCADA data and contextual logs (see Supplementary Note 10), and agents emulate existing dispatch desk responsibilities in a virtualized manner, embedding themselves as supportive extensions to current workflows. Furthermore, all LMA prompts are auto-extracted from telemetry data, and operator feedback is minimal and unobtrusive, requiring no free-text input and no additional workload.

Context engineering: memory, tools, and environment

While prompt design determines how a model is asked, context engineering defines what the model knows at the time of decision-making. In power system dispatching, context is king: decisions must account for grid topology, real-time operating conditions, historical trends, safety constraints, and regulatory rules, all of which form a rich, dynamic background for every dispatch action. To enable an LMA to function reliably in this environment, we must engineer a context pipeline that can (1) represent the right information at the right time, (2) maintain state awareness across multiple interactions, and (3) interface with specialized tools for dispatching and verification (for tool use see Supplementary Note 11), considering human factors (for design strategies see Supplementary Note 2).

Drawing from supervision failure in highly automated systems56, we recognize that passive oversight by human operators is unsustainable for safety-critical infrastructure. Accordingly, our LMA architecture embeds active cognitive involvement through human-AI dialog structures more than control gates. By facilitating explainable workflows, guided feedback mechanisms, and role-appropriate interaction modalities, human operators remain cognitively engaged, situationally aware, and empowered to shape (not just monitor) the system’s operation.

To simulate or assist actual dispatch workflows, the model must be provided with structured and unstructured context, involving grid topology (e.g., substations, transmission lines, generation units, constraints, and regional interconnections), real-time status: (load levels, generation availability, outage notifications, weather impacts), and dispatch rules and policies (operating manuals, reserve requirements, ramp rate constraints, environmental limits). These inputs can be embedded in a prompt (see Supplementary Prompt Example 6) or passed as external documents in retrieval-augmented systems.

Dispatch decisions often require reasoning over multi-area data (e.g., balancing across North, Central, and East grids) and multi-hour timelines (e.g., hourly dispatch plans for the next 24 hours). To address this, we can employ (1) extended context windows via long-context LLMs (e.g., models with 128k+ tokens); (2) dynamic context selection, where only relevant regional/state data is loaded per interaction; and (3) hierarchical summarization or vector memory to compress past decisions and trends. This ensures that LMAs can reason over large-scale, multi-source input without losing coherence or exceeding token limits.

Electric grid operation is inherently iterative and collaborative. An operator (or agent) rarely acts in isolation, especially during contingency situations or forecasting deviations57. By invoking tools mid-prompt (e.g., via function-calling or API calls), LMAs can iteratively refine their reasoning (see Supplementary Prompt Example 7). Memory allows the agent to simulate continuity, learning, and situational awareness, making it a more trustworthy assistant. Thus, agent memory is crucial:

Conversation History: Recall decisions made in earlier rounds.

Outcome Tracking: Whether previous plans succeeded or failed.

Adjustment Rationale: Why certain changes were made.

Consider a scenario where an LMA assists a human operator over multiple rounds of dispatching (see Supplementary Prompt Example 8). The agent is provided with the full dispatch context (from data preparation) and is asked to propose, revise, and explain dispatch plans across time. It demonstrates how context, memory, tools, and human feedback can be orchestrated into a multi-turn, high-stakes decision workflow, where the LMA evolves from a passive responder into a proactive dispatching assistant.

RAG for grid knowledge

LLMs, despite their impressive generalization capabilities, are not designed to memorize and reliably retrieve fine-grained, dynamic, or domain-specific knowledge, especially in safety-critical domains like power system operations. To address this limitation, RAG provides a powerful framework that combines the linguistic fluency of LLMs with the factual accuracy of external knowledge bases. In the context of power grid dispatching, RAG enables an LMA to consult structured and unstructured documents14, such as operational manuals, contingency plans, regulatory codes, and incident logs, before forming a response23. This enhances both precision and trustworthiness in high-stakes decision-making, such as grid dispatching. It improves factual accuracy by grounding model outputs in authoritative documents, reducing hallucinations. RAG also supports expert alignment by enabling the integration of human-generated knowledge without the need for model retraining58. Its scalable architecture allows new documents to be added to the retrieval index seamlessly. Furthermore, RAG promotes transparency and explainability by presenting the retrieved sources alongside its recommendations.

Given a domain-specific vector knowledge base (see Supplementary Note 9), a typical RAG pipeline for grid dispatch operates in four main stages:

Query formulation: the user or agent issues a natural-language query (e.g., “What are the dispatch alternatives if G3 goes offline during peak hours?”)59.

Embedding and retrieval: the query is embedded into the same vector space as the knowledge base; a similarity search retrieves the top-K relevant documents or passages.

Contextual fusion: retrieved documents are formatted into a context window; The original query is concatenated with this context, forming a single prompt.

Answer generation: a language model (e.g., GPT-4, Claude, or a custom LLM) generates an informed, context-aware response using both the query and retrieved knowledge.

This workflow allows the agent to stay grounded in verified knowledge while still leveraging its reasoning and synthesis abilities. Then, RAG empowers the LMA to (1) reference standard procedures and historical precedent; (2) adapt recommendations to real-time constraints, and (3) generate grounded, explainable, and auditable plans, thus answering a realistic dispatch question (see Supplementary Prompt Example 9).

Fine-tuning and instruction tuning for operations tasks

While prompt engineering and RAG can improve a large model agent’s performance in grid operations, these methods alone may not be sufficient for deep alignment with the language, logic, and safety constraints of power system operations. To fully adapt a base model to the dispatch domain, fine-tuning, especially instruction tuning, is an essential step. Fine-tuning allows us to specialize a language model by exposing it to curated examples from real-world dispatch tasks60, enabling it to internalize domain-specific terminology, operational logic, and decision-making patterns. Fine-tuning is not a one-time process. As grid conditions evolve and new operational policies emerge, continual fine-tuning or online adaptation may become necessary61. This also opens up the potential for fine-tuning with synthetic data generated by expert agents or simulators, enabling safe scaling of model capabilities without relying solely on historical dispatch records.

Fine-tuning in this context serves several key objectives:

Sensitivity to Professional Language: recognize and generate domain-specific terminology, abbreviations, and structured formats (e.g., “AGC”, “N-1 contingency”, “ramp rate 20 MW/min”).

Operational Logic Alignment: learn the causal and temporal reasoning involved in dispatching, such as how load forecasts, generator availability, and reserve constraints interact.

Compliance with Safety and Reliability Constraints: internalize rules from manuals and grid codes to avoid unsafe or non-permissible recommendations.

Improved Multi-Turn Consistency: enhance the model’s ability to participate in sustained, goal-driven dialogs across multiple rounds of dispatching.

Based on the constructed dataset (e.g., instruction-style prompts, historical dispatch dialogs, action-outcome pairs, annotated edge cases; see Supplementary Note 9), there are several fine-tuning methods available, each with unique strengths and trade-offs. As listed in Supplementary Table 1, we compare three of the most commonly used approaches and assess their suitability for power system dispatching. The supervised fine-tuning (SFT) is used for initial alignment with domain language and operational structure62. The direct preference optimization (DPO) is suitable when multiple dispatch options exist, and human preference (e.g., economic vs. secure dispatch) must be reflected. The reinforcement learning from human feedback (RLHF) dominates in high-risk, long-horizon dispatching tasks (e.g., black-start recovery, region-wide load restoration)63, where reward signals can be designed around safety, stability, and compliance.

Evaluation and safety alignment

LMAs in power grid operations, where safety, reliability, and accountability are paramount, require a robust framework for evaluation and alignment. Unlike general-purpose chatbots, grid dispatch agents must be held to rigorous standards to ensure they do not generate unsafe, inaccurate, or misleading outputs. To this end, this section outlines the key dimensions of model evaluation, the design of safety mechanisms, and the critical role of human-on-the-loop alignment in operational deployment.

To ensure that LMAs are developed and evaluated in a scalable and transparent manner, we explicitly monitor the quantity, diversity, and granularity of human-related operational data used in task instruction tuning, context construction, and safety alignment. Each evaluation cycle logs the source modalities (e.g., SCADA logs, forecast records, post-event reports), example counts per task, and data coverage across operational zones. Table 1 lists our multi-dimensional evaluation criteria (for statement see Supplementary Note 12), within which dataset adequacy is explicitly tracked and reported.

Table 1 Evaluation dimensions

Based on the above metrics, LMA-powered dispatch systems can be assessed via a three-stage framework (see Supplementary Note 12) encompassing human-system interactions and operational environments. LMAs can first be tested in vitro under curated datasets and simulator-based validation, then evaluated in situ through controlled but realistic human-AI operational workflows, and finally assessed in vivo through longitudinal analysis after real-world deployment. Importantly, high-fidelity control room replicas are not an additional stage beyond this framework; rather, they constitute an advanced experimental implementation for rigorous in situ evaluation. We emphasize that such a three-stage evaluation scheme remains only a starting point for the socio-technical assessment of LMAs in real dispatch settings. In safety-critical infrastructures, evaluation must also examine team coordination, workload redistribution, trust calibration, interruption management, handover quality, shift-to-shift continuity, and the ways in which agent behavior reshapes operator cognition and organizational routines over time.

To prevent LMAs from generating unsafe or unauthorized dispatch recommendations, safety alignment strategies must be implemented (for constraint-aware decoding, tool-based verification, permission control, error pattern detection, and fallback to human oversight, see Supplementary Note 12). However, a structured handover protocol alone is not sufficient to guarantee safe takeover in time-critical grid operations. If operators remain passive for extended periods, an abrupt transfer of responsibility may occur before they have reconstructed an adequate understanding of system context, priorities, and pending risks (for details see Supplementary Note 2). LMAs should be designed to keep operators cognitively on the loop even during prolonged periods of automated assistance, by continuously exposing them to concise state summaries, rationale traces, uncertainty indicators, and projected system trajectories rather than only issuing alerts at the moment of escalation. From a systems-theoretic safety perspective, this requirement can also be interpreted as maintaining an adequate control loop between the human supervisor and the AI-supported dispatch process. In the spirit of systems-theoretic process analysis (STPA)64, unsafe handover may arise not merely from the absence of a protocol, but from flawed control structures, delayed or incomplete feedback, and mismatches between the operator’s mental model and the actual system state (for STPA see Supplementary Note 12).

More specifically, safety nets include hallucination detection classifiers, retrieval-aware confidence scoring, output validation via dispatch simulators, and mandatory operator pre-approval for low-certainty outputs. We adopt conservative default fallbacks: if the agent is unsure, outputs are explicitly flagged and halted unless escalated by the human-on-ohe-loop and robustness testing (see Supplementary Note 12). Beyond one-shot robustness testing, we further emphasize that adversarial evaluation should be organized as a progressive curriculum rather than a fixed benchmark suite. We recommend an auto-curriculum-inspired evaluation pipeline where the difficulty, diversity, and coupling of scenarios increase as the LMA system improves. Such curricula may include cascading contingencies, delayed or conflicting telemetry, multi-zone coordination failures, operator-agent disagreement, and simulator-generated edge cases targeted at the model’s current weaknesses.

Deployment and integration into control rooms

The true value of LMAs in power system dispatching emerges only when they are seamlessly embedded into real-world operational environments. This requires thoughtful system integration, multi-agent collaboration design15, human-aligned workflows, and strict safety gating mechanisms. In this section, we explore how LMAs can be deployed in control rooms through APIs, user interface (UI) assistants, and workflow orchestration (see Supplementary Note 13), while emphasizing human-on-the-loop control, function calling, and emerging standards, particularly the MCP as follows. We thus can build an AI assistant that is flexible, safe, and human-aligned, supporting operators in making faster, more informed, and auditable decisions.

LMAs can be deployed not just as a single assistant, but as a system of coordinated agents (e.g., Forecaster Agent, Load Desk Agent, Generation Desk Agent, Security Desk Agent, TSO Agent; for definition see Supplementary Note 13). These agents can interact through structured dialog or via a central orchestration model, simulating real-world control room collaboration. This supports scalability and modularity, allowing each agent to specialize and evolve independently. Operational deployment demands continuous learning and adaptation. This flexible workflow creates a closed-loop system that combines automated reasoning with human judgment47,65, ensuring reliability and accountability. Each interaction between operator and model completes via feedback (confidence scoring, plan validation loop, and replay and audit; see Supplementary Note 13). To address operator workload constraints, the LMA system decouples feedback from real-time operation by adopting flexible timing and granularity mechanisms. While basic validation (e.g., one-click approval, revision flags) is embedded inline during dispatch workflows and designed to take no more than a few seconds, deeper feedback, such as rationale elaboration or scenario annotation, can be deferred to off-shift or post-event review sessions.

Emergency or safety-sensitive scenarios activate structured handover mechanisms that prioritize operational transparency and rapid human control. Upon triggering, the LMA compiles a compact handover log (e.g., contextual summary, rationale trail, ranked list, visual replay) for a posteriori feedback and reporting (for trigger conditions see Supplementary Note 13). The purpose of this handover package is not merely informational completeness, but rapid restoration of operator situational awareness under emergency conditions. To this end, we should privilege state abstraction, temporal ordering, risk salience, and action relevance over raw data volume. Safe intervention depends on preserving comprehension and projection, not only perception of isolated signals64,66.

To bridge the gap between natural language recommendations and system-level execution, LMAs can generate structured scripts (e.g., JSON; see Supplementary Note 13) that conform to the EMS’s control interface. To support multi-tool, multi-data-source integration, we adopt the MCP, an open standard introduced by Anthropic in early 2024. MCP provides (1) a structured, declarative interface for passing context (e.g., telemetry, forecasts, topology) to LMAs; (2) a standardized API layer for invoking external tools (e.g., simulators, diagnostics, prediction engines); and (3) a universal schema for tool registration, metadata, and permission levels Anthropic envisions MCP as the connector for AI, a universal interface for connecting any model to any tool or dataset, in a secure, interpretable, and extensible way. In our deployment architecture, the LMA connects to grid state data via MCP telemetry schema, dispatch simulation tools via MCP function schema, and operator feedback and scoring via MCP interaction schema. MCP can further enhance interoperability across vendors, extensibility across use cases, and long-term maintainability of the AI agent infrastructure through multi-channel integration and security considerations (see Supplementary Note 13).

A key consideration in LMA deployment is affordability and staged implementation. To reduce the initial barrier, we suggest a plug-and-play integration strategy that enables gradual rollout alongside existing SCADA/EMS systems. More specifically, we frame the economic case in terms of cost categories and value pathways (see Supplementary Note 13 for details). We therefore view a positive return on investment (ROI) within the first several years of deployment as a plausible outcome, particularly when LMAs are first targeted at high-cognitive-load and coordination-intensive tasks (see Supplementary Note 13). The qualitative ROI dimensions and value pathways are summarized in Supplementary Table 2.