foundation.protocols.*

Open Protocol Extensions for Matrix — 94 event types for data commons, AI governance, supply chain compliance, and legal workflows. Apache 2.0. Implement freely.

94
Event Types
6
Event Families
81
Timeline Events
13
State Events

Event Families

All events use the foundation.protocols.* namespace. No MSC required — custom namespaced events are a blessed Matrix extension mechanism.

Design Principles

The protocol extensions follow these architectural principles.

Consent-Gated Data Flow

Data never leaves a room without an explicit data.consent event. Consent is revocable at any time via data.withdrawal.

Intention → Decision → Effect

High-risk AI operations follow a three-phase audit trail. The agent proposes, a human or policy approves, the outcome is recorded. Inspired by ESAA.

Vendor-Neutral Governance

ai.* events apply to any AI agent. ai.claude.* is the first vendor-specific layer. Add ai.mistral.*, ai.openai.* following the same pattern.

🔒

E2EE by Default

All events are end-to-end encrypted via Matrix's Olm & Megolm (double-ratchet). Only authorised room members can decrypt. Not even the server admin.

Ostrom-Governed Commons

Matrix power levels map to governance roles. Clear boundaries, proportional contribution, collective rule-making, transparent monitoring, right to withdraw.

🌍

Open Standards, No Lock-In

Event spec is Apache 2.0. No MSC required. Any Matrix homeserver accepts these events natively. Implement on your own infrastructure.

Example: AI Intention Event

Before a high-risk operation, the agent proposes its action for approval.

{
  "type": "foundation.protocols.ai.intention",
  "content": {
    "intention_id": "int_01ABC",
    "session_id": "sess_01ABC",
    "agent_type": "claude-code",
    "agent_model": "claude-sonnet-4-20250514",
    "proposed_action": "execute_shell_command",
    "description": "Delete the dist/ directory for a clean build",
    "parameters": { "command": "rm -rf dist/" },
    "risk_level": "high",
    "requires_human_decision": true,
    "policy_ref": "$ai_policy_state_event_id"
  }
}

If ai.policy requires approval for this tool, the bridge holds execution until an ai.decision event (approved/denied) arrives. The outcome is recorded as ai.effect.

Implement

No special server support needed. Any Matrix homeserver accepts custom namespaced events.

Reference Implementations

Two open-source implementations exist:

  • OpenEarth Bridge (Kotlin, Trixnity 4.22.7)
    HTTP proxy that records AI sessions as ai.claude.* events. 25/42 events implemented and tested.
  • OpenEarth Messenger (Kotlin, Trixnity 5.4.0)
    Compose Multiplatform client with 27 custom views. Approval buttons, cost dashboards, session monitoring.

View on Codeberg

Licensing

Split licensing matching the Trixnity dual-licensing model:

  • foundation-protocols-events/Apache 2.0
  • foundation-protocols-views/AGPL 3.0
  • openearth-app/AGPL 3.0

Events are the protocol spec — freely reusable. Views link against AGPL trixnity-messenger.

Discussion

Join the protocol design discussion:

#foundation-protocols:matrix.openearth.network

We welcome feedback on event design, governance patterns, and potential MSC candidates from the Matrix community.

The Protocols Foundation

A vendor-neutral standards body maintaining the foundation.protocols.* namespace. Currently initiated by VakeWorks. Seeking co-maintainers and organisations interested in domain-specific Matrix protocol extensions.

The protocol spec is separate from any implementation. openearth.network provides reference implementations. Any organisation can implement foundation.protocols.* events on their own Matrix infrastructure.