Energy & Utilities · C# SDK

Require operator sign-off before an agent sheds load

A grid agent sees a forecast peak and proposes load shedding. Your utility controls decide first: GovernAsync sends the feeder facts, and actions that touch critical facilities stop until an operator authorizes them.

Feeder facts for the grid rule

The grid action simulator sends these. The critical facility flag usually comes from your asset registry.

FactWhat it holds
feederThe feeder the action affects, such as feeder_07_medical_district.
proposed_actionreconfigure_feeder, shed_load_block, defer_maintenance, or dispatch_crew.
affected_customersCustomers the action would affect.
critical_facility_on_feederTrue when a hospital or similar facility is on the feeder.
forecast_peak_load_pctForecast peak load as a percentage of capacity.
operator_authorization_presentTrue when a control room operator has authorized the action.

When the check can’t complete

If the rule check times out or fails, the status is TimedOut or Failed and no value is released. The proposal stays with the control room, and nothing goes ahead on a guess.

C#: switch on the status

reviews is the runtime from ReviewsAsync. The default branch covers blocked, cancelled, timed out, and failed results.

C# · Veriproof.Sdk.Core

using Veriproof.Sdk.Core;

var result = await veriproof.GovernAsync(
    "grid.action",
    proposal,
    (context, cancellationToken) =>
        operations.SubmitAsync(context.Input, context.IdempotencyKey, cancellationToken),
    new GovernOptions
    {
        Facts = new Dictionary<string, object?>
        {
            ["feeder"] = proposal.FeederId,
            ["proposed_action"] = proposal.Action,
            ["affected_customers"] = outageModel.CustomersAffected(proposal),
            ["critical_facility_on_feeder"] = registry.HasCriticalFacility(proposal.FeederId),
            ["forecast_peak_load_pct"] = forecast.PeakLoadPct,
            ["operator_authorization_present"] = proposal.OperatorAuthorizationId is not null,
        },
    });

switch (result.Status)
{
    case GovernedStatus.Completed or GovernedStatus.CompletedWithWarning or GovernedStatus.Transformed:
        controlRoom.Log(result.Value);
        break;
    case GovernedStatus.ReviewRequired:
        await reviews.SaveIfRequiredAsync(result);
        break;
    default:
        controlRoom.Hold(proposal, result.ReasonCode, result.Message);
        break;
}

Only the first branch submits anything. Every other path leaves the proposal with the control room.

Why C# here: Utility operations tooling around the control room is often .NET, and the SDK’s cancellation tokens fit services that must shut down cleanly.

Three grid actions

Each row is a scenario in the grid action simulator. Run grid action simulator

ResultWhenWhat your code seesWho picks it up
AllowedA routine feeder reconfiguration at Riverside.The action is submitted, and the record keeps the feeder facts and the rule version.The Business Owner sees how much the agent handles. Auditors read the record inside an engagement.
Sent to a personA reconfiguration that affects 3,400 customers.The action waits for the control room to confirm it.The control room operator with that authority, in the VeriProof Inbox, by email, or in Slack or Microsoft Teams, with reminders and escalation.
StoppedLoad shedding on the medical district feeder with no operator authorization.The status is Blocked, and nothing is submitted.The Governance Engineer sees the critical facility rule that stopped it.

Changes to the utility’s controls

Developer fix request

If a new rule reads the weather alert level and your agent doesn’t send it, the Developer gets a fix request naming the field.

Changing the rule

Changing the customer count that triggers control room review can run in Shadow first. In production, the engineer’s version waits for an administrator or compliance officer to approve it.

See how the six role portals hand off work

Keep building

See the control room’s view

Open the demo portal as the reviewer who confirms a held grid action, then switch roles and follow the same record.