Skip to main content

Semantic Meaning & Agreement Protocol. The missing layer for global AI coordination. Because 'fraud' in Amsterdam ≠ 'fraud' in Johannesburg.

Project description

SEMA Protocol

Semantic Meaning & Agreement Protocol

The missing layer for global AI coordination.

PyPI version License: AGPL v3


The Problem

'Fraud' in Amsterdam ≠ 'Fraud' in Johannesburg

When AI systems communicate across borders, they face a fundamental problem: the same word means different things in different contexts.

  • Legal definitions vary by jurisdiction
  • Cultural context affects interpretation
  • Regulatory requirements differ between regions
  • Intent can be lost in translation

Current AI coordination assumes shared understanding. SEMA provides that understanding.

The Solution

SEMA (Semantic Meaning & Agreement) provides:

  • Shared vocabulary across jurisdictions
  • Context preservation (cultural, regulatory, temporal)
  • Intent clarity beyond literal meaning
  • Regulatory mapping (GDPR ↔ APPI ↔ POPIA)
  • Cultural awareness in AI communication

Installation

pip install sema-protocol

With JIS (Jasper Identity Standard) integration:

pip install sema-protocol[jis]

Quick Start

Basic Term Translation

from sema_protocol import translate_term, RegulatoryRegion

# Translate "personal data" from EU to US context
result = translate_term(
    "personal data",
    RegulatoryRegion.EU,
    RegulatoryRegion.US,
    domain="compliance"
)

print(result)
# {
#     "status": "found",
#     "source_term": "personal data",
#     "target_term": "personal information",
#     "confidence": 0.95,
#     "regulatory_refs": ["CCPA 1798.140(o)"]
# }

Context-Aware Communication

from sema_protocol import SemanticContext, RegulatoryRegion, CulturalContext, align_contexts

# Dutch bank communicating with Japanese partner
nl_context = SemanticContext(
    region=RegulatoryRegion.EU,
    culture=CulturalContext.DIRECT,
    domain="finance",
    language="en"
)

jp_context = SemanticContext(
    region=RegulatoryRegion.JP,
    culture=CulturalContext.INDIRECT,
    domain="finance",
    language="en"
)

alignment = align_contexts(nl_context, jp_context)
print(alignment)
# {
#     "compatible": False,
#     "differences": [
#         {"aspect": "regulatory_region", "source": "eu", "target": "jp"},
#         {"aspect": "cultural_style", "source": "direct", "target": "indirect"}
#     ],
#     "adjustments": [
#         {"type": "communication_style", "guidance": "Soften direct statements..."}
#     ],
#     "risk_level": "medium"
# }

Domain-Specific Vocabulary

from sema_protocol import get_finance_domain, RegulatoryRegion

finance = get_finance_domain()

# Get fraud definition for South Africa
za_fraud = finance.get_fraud_definition(RegulatoryRegion.ZA)
print(za_fraud.definition)
# "Unlawful and intentional making of a misrepresentation resulting in prejudice"

print(za_fraud.regulatory_refs)
# ["Prevention of Organised Crime Act", "FIC Act"]

JIS Integration (Semantic Identity)

from sema_protocol import semantic_identity, SemanticContext, RegulatoryRegion

# Enrich a JIS identity with semantic context
jis_identity = {
    "actor_id": "bank_nl_001",
    "trust_score": 0.95,
    "intent": "Requesting fraud check on transaction",
    "capabilities": ["query", "alert"]
}

enriched = semantic_identity(
    jis_identity,
    context=SemanticContext(
        region=RegulatoryRegion.EU,
        domain="finance"
    )
)

print(enriched["semantic_layer"])
# {
#     "intent_clarity": {...},
#     "cross_border_ready": False,
#     "sema_version": "0.1.0"
# }

The Stack

SEMA is part of the HumoticaOS protocol stack:

┌─────────────────────────────────────┐
│  SEMA - Semantic Meaning Layer      │  <- You are here
├─────────────────────────────────────┤
│  JIS  - Identity + Trust + Intent   │
├─────────────────────────────────────┤
│  TIBET - Provenance + Audit         │
├─────────────────────────────────────┤
│  AInternet - Network + Discovery    │
└─────────────────────────────────────┘
  • SEMA: What things mean in context
  • JIS: Who is acting and their intent
  • TIBET: Complete provenance chain
  • AInternet: How agents find each other

Supported Regions

Region Code Key Regulations
EU RegulatoryRegion.EU GDPR, AI Act, AMLD6, PSD2
US RegulatoryRegion.US CCPA/CPRA, State laws
Japan RegulatoryRegion.JP APPI
Singapore RegulatoryRegion.SG PDPA
South Africa RegulatoryRegion.ZA POPIA, FIC Act
Australia RegulatoryRegion.AU Privacy Act
Brazil RegulatoryRegion.BR LGPD
Global RegulatoryRegion.GLOBAL Cross-border default

Cultural Contexts

Style Code Examples
Direct CulturalContext.DIRECT Dutch, German, Israeli
Indirect CulturalContext.INDIRECT Japanese, Korean, Thai
Contextual CulturalContext.CONTEXTUAL Chinese, Arabic
Neutral CulturalContext.NEUTRAL International business

Use Cases

Cross-Border Banking

AI systems from different banks need to coordinate on fraud detection. SEMA ensures "suspicious activity" means the same thing to both.

Global Compliance

Multinational companies need AI systems that understand GDPR in Europe, CCPA in California, and APPI in Japan simultaneously.

International Law Enforcement

When investigating cross-border crime, SEMA helps AI systems understand jurisdiction-specific legal definitions.

AI-to-AI Communication

As AI agents communicate globally, they need shared semantic understanding. SEMA provides the vocabulary.

Contributing

Contributions welcome! Please see our contribution guidelines.

License

AGPL-3.0-or-later - Because semantic infrastructure should be open.

Links


Part of HumoticaOS - One love, one fAmIly!

Credits

Designed by Jasper van de Meent. Built by Jasper and Root AI as part of HumoticaOS.


Stack-positie: Groep specialized · Eigen tijdlijn — niet onderdeel van de ainternet/evidence-spine · ← jis-core · ainternet → · See STACK.md · See demo/golden-path/ for the spine end-to-end.

Enterprise

For private hub hosting, SLA support, custom integrations, or compliance guidance:

Enterprise enterprise@humotica.com
Support support@humotica.com
Security security@humotica.com

See ENTERPRISE.md for details.

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

sema_protocol-0.2.0.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

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

sema_protocol-0.2.0-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

Details for the file sema_protocol-0.2.0.tar.gz.

File metadata

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

File hashes

Hashes for sema_protocol-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ab107a41c86ca0a8270b34d6717da453ca151926f395ab437f3b4d82dd0a8169
MD5 471dc00bf1b7e71daf6a99dd1750a9e2
BLAKE2b-256 654639b73ad29c30003dde10efc3bde051cef070b748957db551370ffa427895

See more details on using hashes here.

File details

Details for the file sema_protocol-0.2.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for sema_protocol-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ccee54b0375144754519e7fcc5523a4434b3ad2c55b215ff2038d5b805514f20
MD5 7d9978029ce7cac36b4f111b8bc98d20
BLAKE2b-256 e991584a803e11c4d5837873fca1fd26331bcd6841d09230a8dc433c1bdfb41d

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