| Framework Home | Research Index | Cross-Pillar Governance | AISM | NEXUS | Dashboard |
Current framework context: AI SAFE² v3.1. This research note preserves its original publication date, evidence, and historical framework references. Use current v3.1 normative control and profile documents for implementation or conformance decisions.
Version: 2.1
Date: February 7, 2026
Status: Technical Specification
The AI SAFE² Framework operates on the core axiom: “Policy is Intent. Engineering is Reality.”
To be compliant with AI SAFE² v2.1, an organization cannot simply document a risk in a risk register. They must deploy Compensating Engineering Controls that mechanically enforce the policy at runtime.
This specification outlines the minimum viable engineering standards for the critical control layers: Sanitization, Circuit Breakers, State Verification, NHI Binding, and Swarm Consensus.
Objective: Prevent “Runaway” agentic behavior (Infinite Loops, Financial Drain, Denial of Service).
The system must possess a mechanical governor independent of the Agent’s LLM logic. This governor must track velocity and accumulation of resources and sever execution before a human administrator can intervene.
FUNCTION Check_Circuit_Breaker(Agent_ID):
Current_Spend = Get_Redis_Counter(Agent_ID)
Velocity_Rate = Get_Velocity(Agent_ID)
IF Current_Spend > Hard_Cap OR Velocity_Rate > Spike_Threshold:
Log_Event("Circuit Trip", Severity=CRITICAL)
Return 402_Payment_Required // Or 429_Too_Many_Requests
Sever_Connection()
ELSE:
Pass_Request()
Objective: Prevent Prompt Injection and Jailbreaking from reaching the inference layer.
All inputs from “Untrusted Sources” (Users, Web Scrapers, Email Ingestion) must be sanitized before entering the Context Window. Relying on the model to “refuse” a jailbreak is non-compliant.
FUNCTION Sanitize_Input(User_Text):
// Layer 1: Static
IF Regex_Match(User_Text, Threat_Patterns):
Return Block_Request("Static Signature Detected")
// Layer 2: Semantic
Similarity_Score = Vector_DB.Compare(User_Text, Threat_Embeddings)
IF Similarity_Score > 0.85:
Return Block_Request("Semantic Injection Attempt")
Return Forward_To_LLM()
Objective: Detect “Memory Poisoning” and “Semantic Drift” in RAG systems and Long-Term Memory.
Agents that utilize long-term memory or vector stores must be auditable for integrity. The system must be able to prove that the agent’s “Knowledge Base” has not been altered by an unauthorized entity.
FUNCTION Verify_State(Memory_Volume):
Current_Hash = SHA256(Memory_Volume)
Trusted_Hash = Ledger.Get_Last_Commit(Memory_Volume_ID)
IF Current_Hash != Trusted_Hash:
Trigger_Alert("Integrity Violation: Memory Drift Detected")
Lock_Agent(Agent_ID) // Fail-Secure
Require_Human_Override()
ELSE:
Proceed()
Objective: Prevent “Stale Credential” abuse and lateral movement by Non-Human Identities (NHI).
Agent identities must not use static, long-lived API keys (e.g., a hardcoded .env variable that lasts for years). Authentication must be bound to the specific session or task.
FUNCTION Mint_Agent_Credential(Agent_Manifest):
// 1. Verify Agent Integrity
Verify_Signature(Agent_Manifest)
// 2. Issue Short-Lived Token
Token = Vault.Issue(
Role="Agent_Finance",
TTL="300s", // 5 Minutes
Scopes=["read_invoice"] // Least Privilege
)
Return Token
Objective: Prevent “Consensus Hijacking” in Multi-Agent Systems.
In a swarm architecture, no single agent should have unilateral authority to execute a high-risk action. Decisions must be validated by a “Quorum” or a “Supervisor Node” before execution.
FUNCTION Execute_Swarm_Action(Proposed_Action):
Signatures = Collect_Votes(Swarm_Nodes)
IF Count(Signatures) < Quorum_Threshold:
Return Block_Request("Consensus Failed: Insufficient Votes")
IF Verify_Topology(Signatures) == False:
Return Block_Request("Topology Violation: Unauthorized Node")
Return Execute(Proposed_Action)
| Control Level | Circuit Breaker | Sanitization | State Verification | NHI Management |
|---|---|---|---|---|
| Basic (DIY) | Python time.sleep() |
Basic Regex Blacklist | File timestamp checks | Static .env files |
| Standard (Toolkit) | Redis-backed Token Counter | Vector-based Threat Match | SHA-256 File Hashing | Automated Key Rotation |
| Enterprise (Engineered) | API Gateway Interception | Zero-Dwell Inspection | Blockchain/Ledger Proof | Ephemeral Service Mesh |
Note: The AI SAFE² Implementation Toolkit provides the code patterns for the “Standard” level controls. “Enterprise” controls require custom architecture integration via the Digital Shield Program.
| Previous research note | Research Index | Next research note |
| Framework Home | Cross-Pillar Governance | NEXUS | Challenge Lab |
AI SAFE² v3.1 | Cyber Strategy Institute