Skip to main content

Token-based Intent, Behavior, Evidence & Trust - Cryptographic provenance for trustworthy systems

Project description

tibet-core

Token-based Intent, Behavior, Evidence & Trust

Cryptographic provenance for trustworthy systems. Zero dependencies. Audit-ready.

Why TIBET?

Traditional security monitors traffic. TIBET audits actions.

Every function call, every decision, every transformation gets a cryptographic token with:

  • ERIN (What's IN): The content/data of the action
  • ERAAN (What's attached): References, dependencies
  • EROMHEEN (What's around): Context, environment, state
  • ERACHTER (What's behind): Intent, reason, purpose

Compliance Ready

TIBET provides the audit foundation for:

Standard TIBET Support
ISO 5338 AI decision traceability
NIS2 Continuous logging, incident snapshots
BIO2 Government security baseline
OWASP Security event provenance

Installation

pip install tibet-core

Quick Start

from tibet_core import Provider, FileStore

# Create provider with persistent storage
tibet = Provider(
    actor="jis:humotica:my_app",
    store=FileStore("./audit.jsonl")
)

# Record any action
token = tibet.create(
    action="user_login",
    erin={"user_id": "alice", "method": "oauth"},
    eraan=["jis:humotica:auth_service"],
    eromheen={"ip": "192.168.1.1", "user_agent": "Mozilla/5.0"},
    erachter="User authentication for dashboard access"
)

# Token has cryptographic integrity
assert token.verify()
print(token.content_hash)  # SHA-256

# Export audit trail
audit = tibet.export(format="jsonl")

Integration Examples

With rapid-rag (RAG/Search)

from rapid_rag import RapidRAG
from tibet_core import Provider

tibet = Provider(actor="jis:company:rag_system")
rag = RapidRAG("documents", tibet=tibet)

# All operations now have provenance
rag.add_file("contract.pdf")
results = rag.search("liability clause")
answer = rag.query("What are our obligations?")

# Full audit trail
for token in tibet.find(action="search"):
    print(f"{token.timestamp}: {token.erin['query']}")

With oomllama (LLM Routing)

from oomllama import Engine
from tibet_core import Provider

tibet = Provider(actor="jis:company:llm_router")

# Every LLM call is audited
response = engine.generate(
    prompt="Summarize this document",
    tibet=tibet
)

# Know which model answered, why, with what context

With comms-core-rs (Telephony)

// Rust: 0.02 second call setup WITH tibet exchange
let token = tibet.create(
    action: "call_initiated",
    erin: CallData { from, to, codec },
    erachter: "Outbound sales call"
);

Chain Tracing

Follow provenance chains:

from tibet_core import Chain

chain = Chain(tibet.store)

# Trace backwards from any token
history = chain.trace(token.token_id)
for t in history:
    print(f"{t.action}: {t.erachter}")

# Verify entire chain integrity
if chain.verify(token.token_id):
    print("Audit trail intact")

# Get chain summary
summary = chain.summary(token.token_id)
print(f"Chain length: {summary['length']}")
print(f"Actors involved: {summary['actors']}")

Storage Backends

MemoryStore (default)

Fast, ephemeral. Good for testing.

FileStore

Append-only JSONL. Audit-friendly. Tamper-evident.

from tibet_core import FileStore

store = FileStore("./audit.jsonl")

# Verify file integrity
result = store.verify_file()
if not result["integrity"]:
    print(f"Corrupted tokens: {result['corrupted_ids']}")

Performance

TIBET adds minimal overhead:

  • Token creation: ~0.1ms
  • Hash computation: ~0.05ms
  • File append: ~0.2ms

In comms-core-rs, full call setup with TIBET exchange: 0.02 seconds

More code ≠ slower. Trust ≠ overhead.

Philosophy

"Audit de basis voor elke actie, niet voor communicatie verkeer"

"Audit as foundation for every action, not just traffic"

TIBET doesn't watch the wire. It lives inside the action.

License

MIT - Humotica

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tibet_core-0.3.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tibet_core-0.3.0-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file tibet_core-0.3.0.tar.gz.

File metadata

  • Download URL: tibet_core-0.3.0.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for tibet_core-0.3.0.tar.gz
Algorithm Hash digest
SHA256 836625de7b4c791ce734bc43972419614846b8780824445fd3fe813cd40ff610
MD5 744b0ea1a4acbd68a151ed8261cfe845
BLAKE2b-256 938f0a79ed7a019c19bd9eb450f020ec0ae5f173b3706ccba0e57952b685eb0d

See more details on using hashes here.

File details

Details for the file tibet_core-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: tibet_core-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for tibet_core-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1b8eff1388d53b8ad1aed7c48788b87cdf474bc4e7fbf541c1be021c7838ccd4
MD5 d55cd1ee269695344d0b1f6dcd890e5a
BLAKE2b-256 440952ca3c159add727d6b9c151953b5611194adee75c356e823c67065ed350c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page