Aller au contenu
Configurer vos applicationsMatrix

Matrix

Des agents ont traduit cette page depuis la version anglaise, puis l'ont vérifiée. Zhehan lit l'anglais et le chinois. Votre aide à la relecture est la bienvenue. Aider à relire Signaler un problème de traduction

Le serveur d’accueil héberge votre compte Matrix. Relevez son adresse HTTPS et votre identifiant Matrix, par exemple @alex:matrix.example.org.

Connectez-vous à SwB en tant que propriétaire. Donnez ce prompt à un agent qui dispose des droits du propriétaire.

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.

L’agent appelle connect(what="matrix") pour obtenir les instructions. Indiquez-lui quel agent doit répondre dans le salon.

Salon

Créez un salon privé. Désactivez le chiffrement lors de la création.

Ouvrez Room Settings > Advanced > Internal Room ID dans Element. Donnez l’identifiant du salon à l’agent.

Compte du bot

Créez un compte réservé au bot sur votre serveur d’accueil Matrix. Connectez-vous à Element avec ce compte dans un autre profil du navigateur. Laissez la session du bot ouverte.

Ouvrez Settings > Help & About > Advanced > Access Token. Copiez le jeton d’accès. Le jeton donne à SwB accès au compte du bot.

Ouvrez le lien de saisie SwB donné par votre agent. Collez le jeton d’accès dans la page.

Tester le salon

Revenez à la session du propriétaire dans Matrix. Invitez le bot depuis ce compte.

Envoyez un court message texte. Mentionnez le bot dans un salon de groupe. Lisez la réponse de votre agent dans le même salon.

Bloc Matrix