Matrix Setup
Connect your agent to Matrix, the open federated chat protocol, so it can respond in rooms on any homeserver.
What You Need
Create (or reuse) a dedicated Matrix account for the agent on your homeserver, then gather:
-
Homeserver URL – the base URL of the homeserver, e.g.
https://matrix.example.com. - Access token – a login token for the agent’s Matrix account.
-
User ID – the agent account’s full MXID, e.g.
@myagent:example.com.
Getting an access token
Log in as the agent account and read the returned access_token:
curl -XPOST 'https://matrix.example.com/_matrix/client/v3/login' \
-d '{"type":"m.login.password","user":"myagent","password":"…"}'
Treat the token like a password – anyone holding it can act as the account.
Connecting to Lenno
- Go to your agent’s Channels tab.
- Click Add Channel and select Matrix.
- Enter the Homeserver URL, Access token, and User ID.
- Enter the current owner’s stable Expected owner Matrix ID. This is a declaration for secure pairing, not authority by itself.
- Optionally list Room IDs the agent should operate in, and Auto-join from MXIDs whose invites the agent may accept.
- Click Save.
Pairing The Owner
Matrix does not give this adapter a reliable private/direct-room signal, so an expected owner MXID is required even for a one-to-one room. After saving it:
- In Access & Trust, generate a code for this exact Matrix channel.
-
From the configured owner MXID, send
/pair <code>in an allowed room within 15 minutes.
Lenno requires both the authenticated sender MXID and the single-use code. The configured MXID alone never grants authority, and a code for another Matrix channel cannot be reused.
Rooms And Invites
-
Invite the agent’s MXID to a room; it auto-joins only rooms you listed in
room_ids, or invites sent by an MXID inauto_join_from(or the channel’s proof-verified owner identity). Every other invite is ignored – the bot never joins arbitrary rooms. - Until pairing succeeds, ordinary Matrix senders are strangers and are ignored. A verified owner can command the agent; any separately admitted sender remains restricted and cannot act as the owner.
Tips
- Use a homeserver you control (or a trusted one) – the agent’s messages and tokens live there.
- End-to-end-encrypted rooms require the agent’s device to be verified; use unencrypted rooms unless you have set that up.