General agents
AuraScore 81/100

Substation Alarm Triage and Autonomous Dispatch Agent Script

Develop an automated SCADA alarm triage script for grid operations with autonomous field dispatch logic.

Use this template when deploying an agent to parse high-frequency substation telemetry and trigger emergency response workflows. It guides the creation of a resilient automation script balancing safety thresholds and operational continuity.

Template

Role: Principal Grid Automation Systems Architect with 15+ years configuring SCADA event pipelines and autonomous utility operations.

Context

  • Target Utility Grid: {{utility_network_name}}
  • Telemetry Ingestion Source: {{scada_data_source}}
  • Grid Asset Criticality: {{criticality_tier}}
  • Outage Dispatch API: {{dispatch_api_endpoint}}
  • Autonomous Switching Voltage Cap: {{max_autonomous_switch_kv}}
  • Audit Database Table: {{audit_log_table}}

Task

Generate a production-grade Python automation script for an autonomous grid triage agent that ingests high-frequency SCADA alarms, correlates fault conditions against grid topology, executes safety boundary checks, and initiates automated dispatch tickets or switching sequences.

Method

  1. Establish asynchronous streaming ingestion handlers connecting to {{scada_data_source}}.
  2. Parse raw telemetry packets into structured fault events with precise millisecond timestamps.
  3. Implement topology correlation algorithms to suppress nuisance alarms and identify the root breaker trip.
  4. Verify voltage levels against {{max_autonomous_switch_kv}} to determine if automated switching is permissible.
  5. Compute fault distance estimations based on line impedance parameters.
  6. Evaluate {{criticality_tier}} policies to select between autonomous feeder isolation or mandatory human-in-the-loop escalation.
  7. Format and transmit emergency work orders to {{dispatch_api_endpoint}} for uncontained faults.
  8. Write deterministic, immutable operational records to {{audit_log_table}} with cryptographic trace identifiers.

Constraints

  • MUST implement strict idempotency keys on every dispatch action to avoid duplicate field crew creation.
  • MUST NOT attempt autonomous circuit breaker reclosure if feeder voltage exceeds {{max_autonomous_switch_kv}}.
  • Include explicit fail-closed exception blocks that revert control to manual dispatchers upon API timeouts.
  • Limit external dependency imports to standard Python async libraries and robust HTTP clients.

Output format

Provide a unified, single-file Python script formatted with docstrings and type annotations containing:

  1. Configuration and telemetry schema data classes.
  2. Ingestion and topology correlation logic class.
  3. Autonomous decision engine and dispatch client.
  4. Comprehensive main execution loop with simulated telemetry handling.

Self-review

  • Confirm all 6 context variables are actively utilized within the script logic.
  • Verify that the switching voltage ceiling check cannot be bypassed under error conditions.
  • Check that network timeout fallbacks cleanly route tasks to human operator queues.
AuraScore breakdown
81/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering10/12 · Adequate

Hard boundaries — what the model must and must not do.

Output specification6/14 · Thin

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency5/10 · Thin

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness5/5 · Strong

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

ai-agents
agents-general
energy-utilities
scada
grid-automation
smart-grid