Matrix
Matrix is an open, decentralised messaging protocol. WednesdayAI connects as a Matrix user on any homeserver, so the bot needs its own Matrix account. Once logged in, you can DM the bot or invite it to rooms (Matrix “groups”). Matrix ships as a plugin — it is not bundled with the core install.Install the plugin
Setup
1
Create a Matrix account for the bot
Use any homeserver (browse hosts at matrix.org/ecosystem/hosting) or self-host.
2
Get an access token
Either let WednesdayAI log in from
userId + password (it stores the token in ~/.openclaw/credentials/matrix/credentials.json and reuses it), or fetch a token yourself:3
Configure credentials
MATRIX_HOMESERVER, MATRIX_ACCESS_TOKEN (or MATRIX_USER_ID + MATRIX_PASSWORD). With an access token, the user ID is fetched automatically via /whoami. If both config and env are set, config wins.4
Restart and connect
Restart the gateway, then DM the bot or invite it to a room from any Matrix client (Element, Beeper, and so on).
Access control
Matrix uses a nesteddm object rather than a flat dmPolicy key:
DM and room allowlists require full Matrix user IDs (
@user:server) and room IDs or aliases. Display names and bare localparts ("alice") are ambiguous and ignored. open DM policy requires allowFrom: ["*"].channels.matrix.autoJoin (always | allowlist | off) and channels.matrix.autoJoinAllowlist. Set requireMention: false on a room to enable auto-reply there.
channels.matrix.rooms is a legacy alias for groups — same shape, retained for backwards compatibility. Use groups in new configs; rooms is accepted for users migrating from older setups.Power level requirements: OpenClaw needs minimum power level 0 to send messages. To send reactions, power level 0 is sufficient provided the
m.reaction event type is allowed in the room. To send state events (e.g. changing the room topic), power level 50 is required.End-to-end encryption
E2EE is supported via the Rust crypto SDK. Enable it withchannels.matrix.encryption: true:
~/.openclaw/matrix/accounts/...; if the access token (device) changes, a new store is created and the bot must be re-verified.
Threads
channels.matrix.threadReplies:off | inbound | always(defaultinbound) — whether replies stay in threads.channels.matrix.replyToMode:off | first | all(defaultoff) — reply-to metadata when not replying in a thread.
Multi-account
Run several Matrix users from one gateway viachannels.matrix.accounts. Each account inherits the top-level settings and can override any of them. Env variables apply only to the default account; account startup is serialised. Route accounts to different agents with bindings[].match.accountId.
Matrix Spaces
Matrix Spaces let rooms be organised into a tree.There is no config for Spaces — they work automatically once the bot is invited to a Space. Individual rooms within the Space still require the bot to be invited separately and follow the normal
groupPolicy / groups access rules.Capabilities
DMs, rooms, threads, media, reactions, and location are all supported. Polls send and inbound poll starts convert to text (responses and ends are ignored). Native (homeserver-registered) slash commands are not supported.Troubleshooting
Logged in but room messages ignored
Logged in but room messages ignored
The room is blocked by
groupPolicy or is not in the room allowlist.DMs ignored
DMs ignored
The sender is pending approval under
dm.policy: "pairing" — approve with openclaw pairing approve matrix <CODE>.Encrypted rooms fail to decrypt
Encrypted rooms fail to decrypt
Crypto support failed to load or
encryption is not enabled. Rebuild the crypto module and re-verify the device.