Skip to content

SDK Overview

GOVERN Developer SDK

Available Packages

PackageLanguageInstall
@archetypal-ai/governTypeScript/JSnpm install @archetypal-ai/govern
archetypal-governPythonpip install archetypal-govern
govern-goGogo get github.com/archetypal-ai/govern-go

Quick Start (TypeScript)

import { GovernClient } from "@archetypal-ai/govern";
const govern = new GovernClient({
apiKey: process.env.GOVERN_API_KEY,
orgId: process.env.GOVERN_ORG_ID,
});
// Check a prompt before sending to AI
const check = await govern.checkInput(prompt);
if (check.blocked) {
console.error("Blocked:", check.violations);
return;
}
// Score an AI response
const score = await govern.scoreOutput(response);
if (score.drift > 0.3) {
console.warn("Behavioral drift detected");
}

Webhooks

Configure in Settings > Integrations:

{
"event": "finding.created",
"severity": "critical",
"system_id": "sys_abc123",
"title": "PII detected in inference"
}

Events: finding.created, assessment.complete, policy.violated, drift.detected, probe.disconnected