Open Protocol Extensions for Matrix — 94 event types for data commons, AI governance, supply chain compliance, and legal workflows. Apache 2.0. Implement freely.
All events use the foundation.protocols.* namespace. No MSC required — custom namespaced events are a blessed Matrix extension mechanism.
Consent-gated data sharing. Contribution, consent, withdrawal, quality assessment. Ostrom-governed commons with explicit, revocable consent at the protocol level.
Vendor-neutral governance for any AI agent. Intention/Decision/Effect audit trail (ESAA pattern), policy gates, kill switch, cost tracking, model registry, risk assessment, transparency cards.
Complete Claude Code session recording: prompts, responses, thinking, tool calls, MCP interactions, approvals, file changes, git operations, cost tracking, multi-agent coordination.
Vendor-agnostic, multi-currency, per-user cost accumulator. State key = Matrix user ID. Supports SEK, EUR, USD, INR, CNY. Space-level aggregation across rooms.
EU Deforestation Regulation (2023/1115): plot geolocation, satellite deforestation verification, chain-of-custody, harvest records, Due Diligence Statement workflow, country benchmarking.
Legal marketplace: briefs, proposals, escalation, lawyer seal, case assignment. Professional privilege rooms. Per-jurisdiction spaces. Bar council verification.
The protocol extensions follow these architectural principles.
Data never leaves a room without an explicit data.consent event. Consent is revocable at any time via data.withdrawal.
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.
ai.* events apply to any AI agent. ai.claude.* is the first vendor-specific layer. Add ai.mistral.*, ai.openai.* following the same pattern.
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.
Matrix power levels map to governance roles. Clear boundaries, proportional contribution, collective rule-making, transparent monitoring, right to withdraw.
Event spec is Apache 2.0. No MSC required. Any Matrix homeserver accepts these events natively. Implement on your own infrastructure.
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.
No special server support needed. Any Matrix homeserver accepts custom namespaced events.
Two open-source implementations exist:
ai.claude.* events. 25/42 events implemented and tested.
Split licensing matching the Trixnity dual-licensing model:
foundation-protocols-events/ — Apache 2.0foundation-protocols-views/ — AGPL 3.0openearth-app/ — AGPL 3.0Events are the protocol spec — freely reusable. Views link against AGPL trixnity-messenger.
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.
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.