# ChatGPT dots

URL: https://swb.one/ja/docs/setup/dots

dot とは、個人用の ChatGPT エージェントです。`dots` ブロックは、既定で Slack を通じてメッセージを送ります。このガイドでは SwB のメールボックスを使います。メールボックスには、1 つのエージェント宛てのメッセージが入ります。

## 始める前に [#始める前に]

[お使いのプランと地域](https://help.openai.com/en/articles/20001530-getting-started-with-your-dot)で dots を使えるかを確認してください。

dots を使えて、[カスタム MCP の書き込み権限](https://help.openai.com/en/articles/12584461-connecting-custom-mcp-servers-in-chatgpt)があるワークスペースを使ってください。MCP サーバーは、アプリに外部のツールを使わせるサーバーです。

ワークスペースで dots が制限されている場合は、管理者に **Use dots** を有効にしてもらってください。

SwB サーバーには、公開 HTTPS アドレス、オーナーのサインイン、`dots` ブロックが必要です。ブロックとは、設定ファイルで有効にする SwB の接続の 1 つです。

## セットアップ用プロンプトをコピーする [#セットアップ用プロンプトをコピーする]

https://swb.one/prompts/dots.md

```
Read the setup guide at https://swb.one/docs/setup/dots.

Help me connect my ChatGPT dot to SwB. A dot is my personal ChatGPT agent. SwB carries messages between my agents and channels.

Check your tools first. If the SwB tools are missing, follow https://swb.one/docs/setup/chatgpt to add the connector. Ask me to add the plugin to my dot.

Call `connect(what="chatgpt")` to check the sign-in. Ask me for my dot's name. From a client with owner access, call `connect(what="dots", choose={"dot":"<name>"})`. 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. Call `connect` again with the same choices. For direct delivery, set `delivery: mailbox` in the dots block in `config/switchboard.yaml`. Restart SwB after the change.

When `connect` reports that the dot is ready, find its address with `targets(block="dots")`. Ask me to send a test to that address from another SwB app.

The default mailbox is `chatgpt`. If your app supports MCP events, subscribe to switchboard.message.created for your SwB mailbox. Otherwise, call wait or inbox at the start of each task. SwB checks your callback address before it sends events. Use the event's `message_id` with `get_message`. Answer with `reply` and the message's `handle`. Tell me how you received the test.
```

dot に SwB を追加したあと、このプロンプトを貼り付けてください。

## メールボックスへの配信を設定する [#メールボックスへの配信を設定する]

### dots ブロックを有効にする [#dots-ブロックを有効にする]

`config/switchboard.yaml` にこのブロックを追加してください。そのあと、SwB を再起動してください。

```yaml
blocks:
  dots:
    delivery: mailbox
    dots:
      dot:
        mailbox: chatgpt
```

### Plugins を開く [#plugins-を開く]

デスクトップのブラウザーで [chatgpt.com/plugins](https://chatgpt.com/plugins) を開いてください。

### サーバーを追加する [#サーバーを追加する]

**+** を選択してください。次に **Add custom MCP server** を選択してください。

### アドレスを入力する [#アドレスを入力する]

名前に `SwB` と入力してください。**Server URL** に、`https://swb.example.com/mcp` のような SwB の MCP アドレスを入力してください。

### プラグインを作成する [#プラグインを作成する]

**OAuth** を選択してください。**I understand and want to continue** を選択してください。次に **Create as a plugin** を選択してください。

### インストールしてサインインする [#インストールしてサインインする]

プラグインをインストールしてください。オーナーとして SwB にサインインしてください。アクセスを承認してください。

### dot を開く [#dot-を開く]

[chatgpt.com](https://chatgpt.com) で dot を開いてください。その dot に SwB のプラグインを追加してください。

## エージェントの動作 [#エージェントの動作]

dot は `connect(what="chatgpt")` を呼び出して、OAuth のサインインを確認します。OAuth では、SwB のページでアクセスを承認します。オーナーの全権限を持つエージェントに、`connect(what="dots")` を実行して `dots` ブロックを確認するよう頼んでください。

dot が MCP Events に対応している場合は、`chatgpt` のメールボックスについて `switchboard.message.created` を購読できます。イベントは、メッセージが届いたことを dot に知らせます。SwB は、イベントを受け取るアドレスを確認します。dot は `get_message` でメッセージを読み、`reply` で回答します。開いているチャットでメッセージを集めるときは、`wait` か `inbox` を使います。

## 認証情報 [#認証情報]

| トークン | 表示される場所 | 形式 | 入力する場所 |
| - | - | - | - |
| SwB のサインイントークン | サインイン時に ChatGPT が受け取ります | ランダムな文字列 | ChatGPT が保管します |
| イベントの署名用シークレット | クライアントが購読時に送ります | `whsec_` に続く Base64 の文字列 | SwB が暗号化して保存します |

## 接続を確認する [#接続を確認する]

ほかの SwB エージェントに、`send(to="dots:dot:dot", task="SwB setup test: reply pong")` の実行を頼んでください。イベントの購読が動いていれば、dot が起きて、その会話で返信します。メールボックスへのアクセスを個別に確認するときは、dot で `inbox` を呼び出してください。

## 問題を解決する [#問題を解決する]

`connect` が `dots` ブロックを有効にするよう案内したら、ブロックを追加してください。SwB を再起動してください。

`connect` が Slack のワークスペースを求めた場合、ブロックは Slack での配信を使っています。`delivery: mailbox` を設定し、SwB を再起動してください。
