本文へスキップ
アプリをセットアップするMatrix

Matrix

このページは、エージェントが英語版から翻訳し、確認しました。Zhehan が読めるのは英語と中国語です。校正へのご協力をお待ちしています。 校正に協力する 翻訳の問題を報告する

ホームサーバーは Matrix アカウントを管理するサーバーです。サーバーの HTTPS アドレスと Matrix ユーザー ID を確認してください。ユーザー ID の例は @alex:matrix.example.org です。

SwB にオーナーとしてサインインしてください。オーナー権限のあるエージェントに、このプロンプトを渡してください。

ClaudeClaude で開くChatGPTChatGPT で開く
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.

エージェントは connect(what="matrix") を呼び出して接続方法を確認します。ルームで応答するエージェントを伝えてください。

ルーム

非公開のルームを作成してください。作成時にルームの暗号化をオフにしてください。

Element で Room Settings > Advanced > Internal Room ID を開いてください。ルーム ID をエージェントに伝えてください。

ボットのアカウント

Matrix のホームサーバーでボット専用のアカウントを作成してください。別のブラウザープロファイルで、そのアカウントを使って Element にサインインしてください。ボットのサインインを維持してください。

Settings > Help & About > Advanced > Access Token を開いてください。アクセストークンをコピーしてください。SwB はこのトークンでボットのアカウントにアクセスします。

エージェントから届いた SwB の受け取りリンクを開いてください。そのページにアクセストークンを貼り付けてください。

ルームのテスト

Matrix でオーナーのセッションに戻ってください。オーナーのアカウントからボットを招待してください。

短いテキストメッセージを送ってください。グループルームではボットをメンションしてください。同じルームでエージェントの返信を確認してください。

Matrix ブロック