oConsent
Developers ยท SDK + API

Add consent checks to AI workloads.

Use consent records and point-of-use verification to decide whether a dataset, agent, application, or model pipeline is allowed to use specific data.

Developer flow

Six steps to consent-aware AI.

01

Define purpose

Name the purpose the data will be used for.

02

Create consent record

Issue a machine-readable record for the subject and asset.

03

Verify at point of use

Check permission before any access.

04

Enforce decision

Allow or block the operation on the result.

05

Log audit proof

Record tamper-evident evidence of the decision.

06

Handle revocation

Fail closed when consent has been withdrawn.

Consent record

What a record looks like.

A machine-readable record states who allowed which actor to use which asset, for which purpose, under what scope.

consent_record.jsonschema
{
  "id": "rec_7f3a",
  "subject": "user_123",
  "asset": "conversation_export",
  "purpose": "llm_training",
  "actor": "model_pipeline_7",
  "scope": {
    "allowed_operations": ["train", "evaluate"],
    "excluded_operations": ["resell", "share_external"],
    "retention_days": 365
  },
  "issued_at": "2026-06-28T00:00:00Z",
  "expires_at": "2027-06-28T00:00:00Z",
  "status": "active",
  "proof": {
    "type": "signed_timestamp",
    "hash": "sha256:..."
  }
}
Verification

Check before use.

Illustrative

This describes the intended developer interface. It is illustrative until the SDK is published. Use the reference implementation in the meantime.

verify.tsillustrative
const result = await oconsent.verify({
  subject: "user_123",
  asset: "conversation_export",
  purpose: "llm_training",
  actor: "model_pipeline_7"
});

if (!result.allowed) {
  throw new Error(result.reason);
}
Verification response
verification_response.json
{
  "allowed": true,
  "decision": "allow",
  "reason": "active_consent_record_found",
  "consent_record_id": "rec_7f3a",
  "checked_at": "2026-06-28T10:20:01Z",
  "audit_event_id": "audit_91ac"
}
Integration points

Where to put a verify check.

  • Before model fine-tuning
  • Before adding user facts to agent memory
  • Before retrieval from a vector database
  • Before exporting a dataset
  • Before sharing data with a partner
  • Before using sensitive data in evaluation
Implementation status

Now versus planned.

SDK and hosted API status: in progress

The examples on this page describe the intended developer interface. Reference implementation and earlier protocol code are available on GitHub.

Maintainer note

Repository alignment TODO

TODO

The GitHub organization and older repositories may still contain legacy blockchain-first descriptions. These should be updated to match the current OConsent positioning: consent infrastructure for AI products. Suggested copy lives in GITHUB_PROFILE_UPDATE.md in the website repo.

Build consent-aware AI systems.

Start from the draft spec and the reference implementation, and wire a point-of-use check into your pipeline.