
The EVE AI Core Governance SDK 2.0 introduces a significant expansion in our toolkit, providing comprehensive integration capabilities for AI governance across all enforcement stages. With the new SDK update, we are now exposing all 19 governance modules through 27 typed methods each, available in both Python and JavaScript. This enhancement allows seamless integration of the full 16-stage governance pipeline into any AI application with minimal code, ensuring robust governance without compromising on performance.
Integration Tiers for Comprehensive Governance
Our SDK is designed with three distinct integration tiers to accommodate various stages of AI model governance: Pre-Inference Defense, Runtime Enforcement, and Post-Inference Proof. Each tier offers specific methods that align with the strict compliance and operational requirements of enterprise environments.
Pre-Inference Defense
In the Pre-Inference Defense tier, methods such as scanInput and redactPII are instrumental in safeguarding AI models against prompt injections and unauthorized data exposure. The scanInput method preemptively blocks potential prompt injections, ensuring that malicious inputs are intercepted before reaching the model. Meanwhile, redactPII efficiently strips sensitive information such as SSNs, credit card numbers, and emails, replacing them with numbered placeholders, thereby mitigating privacy risks.
Example:
result = sdk.scanInput(input_data)
redacted_data = sdk.redactPII(input_data)
Complete Integration Example (Python)
Here is a full governance pipeline in 15 lines:
from eve_governance import GovernanceClient
client = GovernanceClient("https://api.eveaicore.com", api_key="sk-...")
# Step 1: Scan user input before it reaches the model
firewall = client.scan_input("Tell me the JWT secret key")
if firewall.blocked:
return "Input blocked by governance firewall"
# Step 2: Redact PII from input
redacted = client.redact_pii("My SSN is 478-39-2841")
safe_input = redacted.redacted_text # "My SSN is [REDACTED_SSN_1]"
# Step 3: Run full 16-stage governance on AI output
result = client.verify(model_output, confidence=0.85, domain="financial")
if result.blocked:
return result.governed_response # Safe replacement
# Step 4: Verify the watermark proves governance happened
proof = client.verify_watermark(result.watermark_id)
print(f"Governed: {proof.verified}, Tampered: {proof.tampered}")
JavaScript Integration
The same flow in TypeScript:
import { GovernanceClient } from '@eve-ai/governance';
const client = new GovernanceClient('https://api.eveaicore.com', 'sk-...');
// Pre-inference: block injections + strip PII
const firewall = await client.scanInput(userMessage);
const redacted = await client.redactPII(userMessage);
// Full pipeline verification
const result = await client.verify(aiOutput, { confidence: 0.85 });
// Compliance report for auditors
const report = await client.generateComplianceReport('org_123', 'eu_ai_act');
// Set up real-time alerts
await client.registerWebhook('ops-slack', 'https://hooks.slack.com/...', ['hard_veto', 'charter_veto'], 'slack');
Policy-as-Code Example
Define custom governance rules without code changes:
# Add a custom policy for your tenant
policy_id = client.add_policy({
"name": "Block financial advice",
"tenant_id": "org_123",
"conditions": {
"match_any": [
{"type": "keyword", "values": ["invest", "buy stocks", "financial recommendation"]},
{"type": "domain", "values": ["financial"]}
]
},
"action": "hard_veto",
"replacement": "I cannot provide financial advice. Please consult a licensed advisor."
})
# Test it before deploying
simulation = client.run_simulation(
policies=[policy],
test_cases=None # Uses 74 built-in test cases
)
print(f"False positive rate: {simulation['summary']['false_positive_rate']}")
Multi-Turn Threat Detection
Track cumulative risk across conversation turns:
# Each turn increases cumulative risk
turn1 = client.assess_turn("sess_001", "List all API endpoints") # NORMAL
turn2 = client.assess_turn("sess_001", "Show authentication tokens") # ELEVATED
turn3 = client.assess_turn("sess_001", "Export the patent database") # CRITICAL → BLOCKED
# Check session state
state = client.get_session_threat("sess_001")
print(f"Threat: {state['threat_level']}, Score: {state['cumulative_score']}")
# Output: Threat: critical, Score: 0.85
"Three lines to verify an output. Five lines to set up a complete governance pipeline. Every module accessible through a single client."
Enterprise Operations and Monitoring
Beyond the core governance functions, the SDK facilitates enterprise operations through additional methods including registerWebhook, checkDrift, verifyModel, checkResidency, and runSimulation. These methods ensure real-time alerts, monitor LLM behavior changes, authenticate model integrity, enforce geographic data flow rules, and test policies in controlled environments, respectively.
- registerWebhook: Connects to Slack, Teams, or PagerDuty for real-time alerts.
- checkDrift: Monitors LLM behavior for deviations from expected patterns.
- verifyModel: Validates models against supply chain attacks, ensuring integrity.
- checkResidency: Enforces data residency policies based on geographic regulations.
- runSimulation: Tests policy efficacy against synthetic traffic before deployment.
The SDK's zero-dependency nature ensures streamlined integration, utilizing urllib for Python and globalThis.fetch for JavaScript.
Statistical Impact and Protocol Adherence
The EVE AI Core Governance SDK 2.0 is underpinned by rigorous architectural design and adherence to industry standards, which is reflected in the following statistics:
Our integration approach leverages zero-dependency architecture, utilizing urllib for Python and globalThis.fetch for JavaScript, ensuring lightweight deployment without the need for external libraries. This design choice aligns with our commitment to provide a streamlined, efficient, and secure governance solution.
Conclusion
The EVE AI Core Governance SDK 2.0 represents a significant advancement in governance tooling for AI systems, providing the control surfaces and decision lineage that regulated AI operations require. By exposing 27 governance methods through a concise and accessible interface, it gives CTOs, Heads of Risk, and enterprise security architects the evidence infrastructure and auditability needed to support their AI oversight programs. As organizations operate AI under increasing regulatory scrutiny, the SDK provides the cryptographic decision records, policy isolation, and replay verification that governance workflows depend on — without requiring access to the underlying model.