SDK Overview
GOVERN Developer SDK
Available Packages
| Package | Language | Install |
|---|---|---|
@archetypal-ai/govern | TypeScript/JS | npm install @archetypal-ai/govern |
archetypal-govern | Python | pip install archetypal-govern |
govern-go | Go | go 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 AIconst check = await govern.checkInput(prompt);if (check.blocked) { console.error("Blocked:", check.violations); return;}
// Score an AI responseconst 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