跳至內容
設定應用程式

Grok

在 grok.com 的 Grok 中加入 SwB。連接器讓 Grok 能使用外部工具。Grok 會以 grok 的身分登入 SwB。

開始之前

如果是團隊帳號,確認組織的連接器設定。

為 SwB 設定公開 HTTPS 網址和擁有者登入。使用 OAuth 時,由你在瀏覽器中核准存取。

Grok Bot 是另一個應用程式,有自己的設定流程。參閱 Grok Bot。

複製設定提示詞

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

Help me connect Grok on https://grok.com to SwB. SwB carries messages between my agents and channels.

Check your tools first. If the SwB tools are missing, ask me to add SwB as a custom connector. For Grok Business, ask me to contact a team admin.

For a new connector, ask me to open https://grok.com/connectors. Ask me to use `New Connector > Custom`. Ask me to enter my public SwB MCP address, such as `https://swb.example.com/mcp`. Ask me to sign in to SwB with OAuth. Ask me to paste this prompt in a new chat.

Call `connect(what="grok")`. 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(what="grok")` again to check the sign-in.

Call `swb_guide(trigger="setup")`. Subscribe to switchboard.message.created for the grok mailbox if this app supports MCP events. Use the event's `message_id` with `get_message` to check the test.

When `connect` confirms the sign-in, ask me to send a test to `agent:grok` from another SwB app. Answer with `reply` and the message's `handle`.

Grok Bot is a separate app. If I need work to start by itself, point me to https://swb.one/docs/setup/grok-bot.

加入 SwB 後,把提示詞貼到 Grok 聊天中。

把 SwB 加入 Grok

開啟 Connectors

在瀏覽器中開啟 grok.com/connectors。

新增自訂連接器

選取 New Connector,再選取 Custom。

輸入網址

伺服器 URL 輸入 https://swb.example.com/mcp,然後儲存連接器。

登入

以擁有者身分登入 SwB,並在 SwB 頁面上核准存取。

代理會做什麼

Grok 呼叫 connect(what="grok"),SwB 會回傳 MCP 網址和 OAuth 狀態。你登入後,connect 會回報用戶端已登入。

Grok 可以用 send 傳送一則測試訊息,再用 inbox 讀取。信箱會為單一代理保存訊息。如果你的 Grok 應用程式支援 MCP Events,訂閱 switchboard.message.created。如果只在需要時讀取,請 Grok 在開啟中的聊天裡呼叫 wait 或 inbox。

憑證

權杖顯示位置格式去處
SwB 登入權杖登入時由 Grok 取得隨機字串由 Grok 代為保存

檢查連線

請 Grok 呼叫 connect(what="grok") 檢查登入狀態。從另一個 SwB 代理傳送一則測試訊息到 agent:grok,再請 Grok 用 inbox 讀取。

疑難排解

如果要讓工作自行啟動,使用 Grok Bot。SwB 會用 Webhook 喚醒 Grok Bot routine。

本頁內容