Matrix
A homeserver is the server that hosts your Matrix account. Find its HTTPS address and your Matrix user ID, such as @alex:matrix.example.org.
Sign in to SwB as the owner. Give this prompt to an agent with owner access.
Read the setup guide at https://swb.one/docs/setup/matrix. Help me exchange messages with an agent in Matrix. Give me https://swb.one/docs/connect if I need to connect this agent to SwB first. Use a SwB client with owner access. Call `connect(what="matrix")`. Do each step marked "you" yourself. Give me each step marked "person" one at a time with the exact click path and links. Wait for me to say done after each step. Ask me for the HTTPS address of my Matrix homeserver and my Matrix user ID. Ask me to create a private room with room encryption set to **Off**. Give me the path `Room Settings > Advanced > Internal Room ID` in Element. Ask me for that room ID. Put my Matrix user ID in `owner_ids`. Put the room ID in `rooms`. Apply the YAML from `connect` to `config/switchboard.yaml`. If the file needs a manual edit, give me the YAML. Restart SwB after an edit. Call `connect(what="matrix")` again for the private claim link. Ask me to create a separate account for the bot on that Matrix homeserver. Ask me to sign in to Element with the bot account in a separate browser profile. Ask me to keep that session signed in. Give me the path `Settings > Help & About > Advanced > Access Token`. Ask me to enter the token only through the SwB claim link that connect returns. Keep tokens out of this chat and tool arguments. Read the Matrix bot user ID from `setup.bot_user_id` in `matrix_status`. Ask me to return to my owner session in Matrix. Ask me to invite the bot from my owner account. Call `connect(what="matrix")` again to check the connection. Ask me "Which agent answers here?" Use `targets` to show the choices. Save my choice for the room with `chat_main_set`, using the Matrix block name, space and room ID. Ask me to send a short message in the room. In a group room, ask me to mention the bot. Ask me to confirm that the agent replies in the same room.
The agent calls connect(what="matrix") to get the setup instructions. Tell it which agent should answer in your room.
Room
Create a private room from your owner account in Matrix. Set room encryption to Off when you create the room.
Open Room Settings > Advanced > Internal Room ID in Element. Give your agent the room ID.
Bot account
Create a separate account for the bot on your Matrix homeserver. Sign in to Element with that account in a separate browser profile.
Keep the bot account signed in.
Open Settings > Help & About > Advanced > Access Token. Copy the access token, which gives SwB access to the bot account.
Open the SwB claim link from your agent. Paste the access token there.
Test the room
Return to your owner session in Matrix. Invite the bot from your owner account.
Send a short text message. Mention the bot in a group room. Look for your agent’s reply in the same room.

