Documentation
Everything you need to add governance, compliance, and security to your AI agents.
pip install tork-governanceThis is the on-device package (entry class Tork). tork-governance makes the governance decision on your machine. PII detection, redaction and the returned verdict are computed on-device. With no API key it makes zero network calls: prompts, completions and detected PII values never leave the machine, and nothing appears in your dashboard.
Supply an API key and the SDK additionally reports a metadata-only attestation of each decision — the action taken, PII type labels and counts, a risk classification, policy labels and a salted fingerprint. It never sends input text, output text or PII values. The decision itself is still made on-device and is never delayed or changed by reporting. Those attestations appear in your dashboard and are included in the daily on-chain anchor — each one recorded as a client attestation (capture_mode=edge, attested_by=client), a claim Tork recorded but did not execute and cannot independently verify. Requires tork-governance 0.24.0+ (PyPI) or 0.11.0+ (npm).
A decision reported by an on-device SDK is recorded as a client attestation (capture_mode=edge, attested_by=client): a claim Tork recorded but did not execute and cannot independently verify. A decision made by @torknetwork/sdk is recorded as capture_mode=cloud, attested_by=tork — Tork made that call itself. Both are equally immutable once anchored; they differ in what is immutable. A client attestation freezes your claim. A server-governed receipt freezes Tork's own decision.
For server-side decisions and dashboard receipts today, install the cloud package npm install @torknetwork/sdk (entry class TorkClient).
Getting Started
Core Features
PII Detection
56 PII types with context-aware matching
Policy Engine
Define and enforce governance rules
MCP Auditing
Govern Model Context Protocol tool calls
Compliance Receipts
HMAC-signed audit trail for every governed call
Receipt Verification Spec
Reimplement Merkle proof verification independently
Human-in-the-Loop
Approval queues and escalation rules
Jailbreak Detection
Detect prompt injection and jailbreaks