SDK Quick Start — Energy & Utilities
Getting started: Energy & Utilities
Control what your AI can do. The core SDK checks policy before your workflow runs an action and again before its result is released. Denied actions stop. Actions that need human review stay paused until a signed outcome arrives.
Catalog context. Start with a bounded workflow such as outage review or maintenance planning. Record the requested action, responsible operator, and confirmed result. Preserve operational safety and access controls outside the tracing system. Assess critical-infrastructure requirements against the affected assets and intended use of the AI system.
Use industry fields with the core SDK
Industry vocabularies supply typed values that the SDK sends as policy fields and evidence attributes with one governed call. Choose values that describe the actual workflow. Adding a vocabulary does not activate rules or assign regulatory requirements.
| Layer | What you configure | What changes downstream |
|---|---|---|
| Core SDK | Application SDK key, endpoint, one client, and the governed action around each protected step | The same policy checks, typed results, and evidence used across every implementation |
| Energy & Utilities | Typed industry values and application facts drawn from this vertical catalog | Rules read them under input.snapshot.industry and input.snapshot.facts; reviewers see them in evidence |
| Review workflows | Rules, evidence packages, and internal reviewer workflows | Reviewers can inspect captured values and identify missing context |
If you need the cross-industry baseline first, open the core SDK reference, Python core, or .NET core before continuing here.
Step 1 — Install the approved packages
In the customer portal, open Tools and SDKs. Select your language and adapters, then follow the installation instructions shown there.
VeriProof SDKs are distributed through customer-gated GitLab packages, not public registries. See SDK access for workstation and CI guidance.
VeriProof packages used here: @veriproof/sdk-core (TypeScript), veriproof-sdk (Python), Veriproof.Sdk.Core (.NET).
Step 2 — Configure
Store the application SDK key as VERIPROOF_API_KEY and create one client when the application starts. Publish the policy you want to enforce, then confirm its field contract against the facts and industry values your application supplies.
Copy the application ID and key from Set up SDK. The application ID is not its display name. Try a live demo to see a governed workflow, or request an evaluation if you need a workspace.
Step 3 — Govern the action
Put the protected business action inside govern. The SDK checks policy before it calls the action and before it releases the result. Deny and human-review decisions stop execution here.
import { Veriproof } from '@veriproof/sdk-core';
import type { GovernedResult, IndustryFact, JsonValue } from '@veriproof/sdk-core';
const veriproof = Veriproof.fromEnv();
export async function runProtectedAction<TInput extends JsonValue, TValue>(
request: TInput,
action: (input: TInput, signal: AbortSignal) => Promise<TValue>,
): Promise<GovernedResult<TValue, TInput>> {
// Catalog values for this vertical. Replace them with facts from the current workflow.
const industry: IndustryFact[] = [
{ attribute: "energy.asset.operational_status", policyInput: "energy_asset_operational_status", value: "in_service" },
{ attribute: "energy.switching.state", policyInput: "energy_switching_state", value: "closed" },
{ attribute: "energy.outage.lifecycle_state", policyInput: "energy_outage_lifecycle_state", value: "reported" },
];
// Policy runs before action() and again before the result is released.
// A deny or review decision means action() never runs.
return veriproof.govern(
"energy.utilities.evaluate",
request,
({ input, signal }) => action(input, signal),
{ industry },
);
}Only completed, completed_with_warning, and transformed results carry a released value. Handle every other status with its safe message, reason code, and evidence reference. For review decisions, save the checkpoint and continue through the human review workflow.
Add typed industry values
Each core SDK ships this vertical's vocabulary as generated types. A typed value becomes one policy field and one evidence attribute when you pass it to the governed call. Use application facts for values that are specific to your workflow.
Find this workflow's vocabulary in the Energy & Utilities reference. Use the attribute names below and verify their policy-field mapping before using them in a rule. Sample values show the format; they are not recommended outcomes for your application.
| OTel attribute | Sample value | Category |
|---|---|---|
energy.asset.operational_status | in_service | GridAssetOperationalStatus |
energy.switching.state | closed | SwitchingEquipmentState |
energy.outage.lifecycle_state | reported | OutageLifecycleState |
energy.protection.relay_operation_status | normal_no_operation | ProtectionRelayOperationStatus |
energy.demand_response.event_status | pending | DemandResponseEventStatus |
energy.demand_response.curtailment_type | load_shed_direct_control | DRResourceCurtailmentType |
TypeScript
import { Industry } from '@veriproof/sdk-core';
import { GridAssetOperationalStatus, GridAssetOperationalStatusMeta, SwitchingEquipmentState, SwitchingEquipmentStateMeta, OutageLifecycleState, OutageLifecycleStateMeta } from '@veriproof/sdk-core/industries/energy-utilities';
// Replace sample values with facts from the current workflow.
// Each value becomes one policy field and one evidence attribute.
const industry = [
Industry.fact(GridAssetOperationalStatusMeta, GridAssetOperationalStatus.InService),
Industry.fact(SwitchingEquipmentStateMeta, SwitchingEquipmentState.Closed),
Industry.fact(OutageLifecycleStateMeta, OutageLifecycleState.Reported),
];
const result = await veriproof.govern(actionName, request, runWorkflow, { industry });Python
from veriproof_sdk.verticals.energy_utilities import GridAssetOperationalStatus, SwitchingEquipmentState, OutageLifecycleState
# Replace sample values with facts from the current workflow.
# Each value becomes one policy field and one evidence attribute.
industry = (
GridAssetOperationalStatus.in_service.fact(),
SwitchingEquipmentState.closed.fact(),
OutageLifecycleState.reported.fact(),
)
result = await vp.govern(action_name, request, run_workflow, industry=industry).NET
using Veriproof.Sdk.Core.Industries.EnergyUtilities;
// Replace sample values with facts from the current workflow.
// Each value becomes one policy field and one evidence attribute.
var options = new GovernOptions
{
Industry =
[
GridAssetOperationalStatus.InService.Fact(),
SwitchingEquipmentState.Closed.Fact(),
OutageLifecycleState.Reported.Fact(),
],
};
var result = await veriproof.GovernAsync(actionName, request, RunWorkflowAsync, options);Workflow examples from the catalog
- Grid Asset & Outage Management (IEC CIM): Grid Asset Operational Status. AI energy management agent monitors all BES asset statuses via CIM. 'Forced_outage' on a high-impact asset triggers automatic NERC EOP-004 assessment, initiates restoration workflow, and escalates to grid operations HITL. AI agent may not autonomously re-energise a 'de_energized' asset, crew clearance confirmation required. (Nerc Eop 004: NERC EOP-004, Disturbance reporting: 'forced_outage' on BES elements meeting reporting thresholds must be reported to NERC and regional entity)
- Grid Asset & Outage Management (IEC CIM): Switching Equipment State. AI distribution management agent executes fault isolation switching sequences. Each switching step is logged with the pre- and post-state. OPA policy blocks AI from closing a 'grounded' switch, crew clearance confirmation from safety system is required first. (Nerc Cip 010: NERC CIP-010, Configuration change management: autonomous AI switching on BES Cyber Systems requires approved change documentation)
- Grid Asset & Outage Management (IEC CIM): Outage Lifecycle State. AI outage management agent receives outage reports from AMI (Advanced Metering Infrastructure), customer calls, and SCADA alarms. Agent correlates reports, confirms outage boundary, and dispatches crew. OPA policy enforces that 'fully_restored' state requires meter-verified restoration confirmation, not just switch state change.
- Grid Asset & Outage Management (IEC CIM): Protection Relay Operation Status. AI grid monitoring agent detects relay operation from SCADA and classifies status. 'Reclose_failed_lockout' triggers immediate crew dispatch. 'Protection_inhibited_ai_action' is a critical flag indicating an AI agent has interfered with protection, requires immediate HITL escalation and is a NERC compliance event. (Nerc Prc 023: NERC PRC-023, Transmission relay loadability: relay settings affected by AI optimisation must comply with NERC PRC-023 loadability criteria)
Next steps
- Open the full Energy & Utilities governance reference for all 23 enum categories, policy patterns, and source standards.
- Review TypeScript SDK core for stop handling, human review continuation, and the OpenAI Agents adapter.
- Review Python SDK core for stop handling, human review continuation, and the Microsoft Agent Framework adapter.
- Review .NET SDK core for stop handling, human review continuation, and the Microsoft Agent Framework adapter.
- Browse all vertical references to understand how the core governance vocabulary layers underneath vertical-specific attribute sets.
- Compare this guide with the public industry pages for a business overview of the same workflows.
Verify your work email to create a Developer account, free for 60 days. Open your account, create a Development application and its API key, then follow Tools and SDKs to connect it.