Who this is for: ML engineers deploying NeMo Guardrails, security architects evaluating runtime AI safety, CISOs building evidence programs for guardrail enforcement, platform engineers integrating inline security with audit requirements.
EU AI Act Art. 9 (risk management) and Art. 14 (human oversight) require evidence that safety measures were active at inference time, not merely deployed. NeMo Guardrails provide the safety measures. SWT3 provides the evidence they ran. See also: NVIDIA Dynamo Integration | Kimi K3 Witnessing | CoSAI Risk Map Crosswalk.

1. The Guardrail Evidence Problem

NVIDIA NeMo Guardrails is one of the most widely deployed runtime safety frameworks for LLM applications. It intercepts prompts, evaluates them against configurable rails (content safety, topic control, jailbreak detection), and blocks or modifies unsafe inputs before they reach the model.

The problem is not whether guardrails work. The problem is proving they were active.

When a guardrail blocks a prompt injection, the guardrail's own logs say "blocked 1 attack." That is self-attestation. Under EU AI Act Article 12, regulators require independent, non-repudiable records that safety measures operated as designed. Under NIST AI RMF Map 1.5, risk management systems must produce verifiable evidence of continuous operation. "Trust us, we blocked it" is not sufficient evidence for either framework.

The solution separates two concerns: the guardrail enforces the policy, and an independent witness records that enforcement happened. The guardrail is the bodyguard. The witness is the notary recording that the bodyguard was on duty.

2. Two Runtime Layers

AI runtime governance operates at two distinct layers. Confusing them creates both security gaps and compliance gaps.

Layer 1: Inline Enforcement (NeMo Guardrails)

Intercepts prompts and responses in the request path. Evaluates content against safety rails. Blocks, modifies, or allows. Adds latency proportional to evaluation depth (typically 100-200ms for standard rails, ~190ms+ for deep adversarial classifiers at 16-32k context).

What it proves: Unsafe content was blocked.

What it cannot prove: That the guardrail was active for every request, or that its configuration was not modified between evaluations.

Layer 2: Out-of-Band Witness (SWT3)

Records the guardrail's evaluation result as a cryptographic anchor after the guardrail runs. Captures guardrail version, configuration hash, and verdict. Adds sub-millisecond overhead (no content inspection, no payload parsing).

What it proves: The guardrail was active, which version ran, what it decided, and when.

What it cannot do: Block unsafe content. That is the guardrail's job.

The two layers are complementary. NeMo Guardrails adds safety. SWT3 adds evidence. Deploying guardrails without independent evidence is like deploying a firewall without audit logs. Deploying evidence without guardrails is like logging that no bodyguard was present.

3. Integration Pattern

NeMo Guardrails is Python-native. The integration wraps the guardrail's generate() call and witnesses both the guardrail evaluation and the model response.

Basic Pattern

from nemoguardrails import LLMRails, RailsConfig
from swt3_ai import Witness
import hashlib, json

# Initialize NeMo Guardrails
config = RailsConfig.from_path("./config")
rails = LLMRails(config)

# Initialize SWT3 witness
witness = Witness(agent_id="nemo-guardrailed-agent")

# Generate with guardrails, then witness the result
response = rails.generate(
    messages=[{"role": "user", "content": user_input}]
)

# Witness the guardrail evaluation
# Attribute name may vary by NeMo version (e.g. raw_config, config, etc.)
config_hash = hashlib.sha256(
    json.dumps(config.raw_config, sort_keys=True).encode()
).hexdigest()[:12]

witness.witness_guardrail(
    guardrail_id="nemo-guardrails",
    verdict="pass",              # or "block" if rails blocked the input
    config_hash=config_hash
)

# Witness the inference
witnessed_response = witness.wrap(response)

With Guardrail Verdict Detection

Response structure varies by NeMo Guardrails version. Consult your version's documentation for the exact log format.

# NeMo Guardrails returns a special response when rails block input
response = rails.generate(
    messages=[{"role": "user", "content": user_input}],
    options={"rails": ["input", "output"], "log": {"activated_rails": True}}
)

# Determine verdict from response
blocked = response.get("log", {}).get("activated_rails", {}).get("type") == "block"
verdict = "block" if blocked else "pass"

witness.witness_guardrail(
    guardrail_id="nemo-guardrails",
    verdict=verdict,
    config_hash=config_hash
)

if not blocked:
    witnessed_response = witness.wrap(response)

TypeScript (via NeMo REST API)

import { Witness } from '@tenova/swt3-ai';

const witness = new Witness({ agentId: 'nemo-guardrailed-agent' });

// Call NeMo Guardrails REST endpoint
const railsResponse = await fetch('http://localhost:8000/v1/chat/completions', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ messages: [{ role: 'user', content: prompt }] })
});
const result = await railsResponse.json();

// Witness the guardrail evaluation
witness.witnessGuardrail({
  guardrailId: 'nemo-guardrails',
  verdict: result.guardrail_action === 'block' ? 'block' : 'pass',
  configHash: configHash
});

// Witness the inference
const witnessed = await witness.wrap(result);

4. Procedure Coverage

AI-GRD.1

Guardrail Attestation

NeMo Guardrails provides: Input validation, topic control, content safety filtering, jailbreak detection, output sanitization.

SWT3 witnesses: That the guardrail evaluated the request, which version of the guardrail configuration was active, and whether the verdict was pass, block, or modify. The configuration hash in the anchor proves the guardrail's rules were not silently changed between evaluations.

What to show the examiner

Present AI-GRD.1 anchors for the audit period. Continuous timestamps with no gaps demonstrate guardrails were active for every inference. The config_hash in factor_c should remain constant between configuration change windows.

AI-GRD.2

Guardrail Effectiveness

NeMo Guardrails provides: Activated rails logging showing which rails fired and why.

SWT3 witnesses: The ratio of pass to block verdicts over time, creating a trend line of guardrail effectiveness. A sudden drop in block rate may indicate guardrail misconfiguration. A sudden spike may indicate an attack campaign.

What to show the examiner

Filter AI-GRD.2 anchors by verdict type. Plot pass/block ratio over time. Stable ratios indicate consistent guardrail behavior. Anomalies warrant investigation.

AI-INF.1

Inference Provenance

NeMo Guardrails provides: Model routing through the rails pipeline.

SWT3 witnesses: Which model actually served the request behind the guardrails, token counts, and latency. This is especially important when NeMo routes to different models for different safety evaluations.

What to show the examiner

Pair AI-INF.1 anchors with AI-GRD.1 anchors by timestamp. Every inference should have a matching guardrail evaluation. Missing pairs indicate requests that bypassed the guardrail layer.

AI-HW.1

Hardware Attestation

NeMo Guardrails runs on: NVIDIA GPUs (Nemotron models, custom classifiers). NVIDIA Confidential Computing provides hardware-level isolation.

SWT3 witnesses: Hardware attestation binding the software execution to specific silicon. When guardrails run on NVIDIA hardware with TEE support, AI-HW.1 proves the evaluation happened on trusted hardware, not a compromised host.

What to show the examiner

Present AI-HW.1 anchors showing the hardware attestation chain. Cross-reference with the NVIDIA Confidential Computing attestation report to verify the guardrail ran inside a trusted execution environment.

5. Inline Security Partners

NVIDIA's NeMo ecosystem includes multiple inline security partners. The SWT3 witness pattern works identically regardless of which partner's classifiers sit in the guardrail pipeline.

PartnerFocusSWT3 Integration
NeMo Guardrails (native)Content safety, topic control, jailbreak detectionwitness_guardrail() after rails.generate()
Votal AIAdversarial classification (vai35-4B-v2), 151+ detection techniqueswitness_guardrail() wrapping Votal's inline verdict
Palo Alto NetworksAI Runtime Security with NeMo Guardrails integrationwitness_guardrail() capturing PAN's security verdict
CrowdStrike FalconAIDR integration for homegrown agent securitywitness_guardrail() recording Falcon's threat assessment
Custom classifiersOrganization-specific safety models on NVIDIA hardwarewitness_guardrail() with custom guardrail_id

The witness does not inspect the guardrail's internal logic. It records the verdict, the version, and the configuration. This means switching from native NeMo rails to a partner solution like Votal AI requires changing the guardrail_id parameter, nothing else. The evidence format is the same. The assessor reads the same anchors.

6. Quick Reference for Examiners

Examiner QuestionWhere to Look
Were guardrails active during the audit period?AI-GRD.1 anchors with continuous timestamps. Gaps indicate unprotected inference windows.
How do you prove the guardrail configuration was not changed?AI-GRD.1 config_hash in factor_c. Same hash = same configuration. Changed hash = configuration was updated (check change management records).
What is the guardrail block rate?AI-GRD.2 verdict distribution over time. Filter by verdict="block" vs verdict="pass".
Is this evidence independent from the guardrail vendor?Yes. SWT3 anchors are minted by the deployer's application, not by NeMo or any partner. The witness is an independent third-party protocol.
Did every inference pass through guardrails?Pair AI-INF.1 and AI-GRD.1 anchors by timestamp. Every inference anchor should have a matching guardrail anchor.
What hardware ran the guardrails?AI-HW.1 anchors with NVIDIA hardware attestation, if TEE/Confidential Computing is enabled.
Can I verify an anchor independently?sovereign.tenova.io/verify for any SWT3 anchor fingerprint.

7. References

pip install swt3-ai nemoguardrails  |  npm install @tenova/swt3-ai
Full SDK docs: sovereign.tenova.io/docs  |  Free tier: sovereign.tenova.io/signup