Core Features

Compliance Receipts

Generate cryptographically signed receipts for every AI action to prove compliance during audits.

Overview

Compliance receipts provide immutable, tamper-evident proof that governance policies were enforced for each AI action. Each receipt is cryptographically signed and can be verified independently.

Tamper-Evident

SHA-256 signatures prevent modification

Complete Audit Trail

Full context of every decision

Export Ready

JSON, PDF, or CSV formats

Generating Receipts

Receipts are automatically generated for policy checks. You can also request them explicitly:

python
from tork_governance import TorkClient

client = TorkClient()

# Receipts are auto-generated with policy checks
result = client.policy.check(
    agent_id="agent-123",
    action_type="send_email",
    content="Meeting tomorrow at 3pm",
    generate_receipt=True  # Default is True
)

# Access the receipt
receipt = result.receipt
print(f"Receipt ID: {receipt.id}")
print(f"Signature: {receipt.signature}")
print(f"Timestamp: {receipt.timestamp}")

Receipt Structure

Each receipt contains complete audit information:

json
{
  "receipt_id": "rcpt_abc123xyz",
  "timestamp": "2024-01-15T10:30:00.000Z",
  "agent_id": "agent-123",
  "action": {
    "type": "send_email",
    "input_hash": "sha256:abc123...",
    "output_hash": "sha256:def456..."
  },
  "policy_evaluation": {
    "policies_checked": ["content-safety", "pii-protection"],
    "decision": "ALLOW",
    "matched_rules": [],
    "processing_time_ms": 12
  },
  "governance_score": {
    "torking_x": 94,
    "components": {
      "privacy": 98,
      "safety": 92,
      "compliance": 96
    }
  },
  "signature": "sha256:sig789...",
  "verification_url": "https://verify.tork.network/rcpt_abc123xyz"
}

Verifying Receipts

Verify receipt authenticity programmatically or via the verification portal:

python
# Verify a receipt
verification = client.receipts.verify(receipt_id="rcpt_abc123xyz")

if verification.valid:
    print("Receipt is authentic and unmodified")
    print(f"Issued: {verification.issued_at}")
    print(f"Agent: {verification.agent_id}")
else:
    print(f"Verification failed: {verification.error}")

Bulk Export

Export receipts for audit periods:

python
# Export receipts for a date range
export = client.receipts.export(
    start_date="2024-01-01",
    end_date="2024-01-31",
    agent_ids=["agent-123", "agent-456"],  # Optional filter
    format="json"  # or "csv", "pdf"
)

# Download the export
with open("january_receipts.json", "w") as f:
    f.write(export.content)

Compliance Tip: Receipts are retained for 7 years by default. Configure retention in Admin Settings.

Documentation

Learn to integrate TORK

Upgrade Plan

Current: free

Support

Get help from our team