跳到内容
设置

Muse

实时唤醒 Muse

要让 Muse 在消息到达时立即开始工作,推荐使用 Muse gadget。gadget 是与 Muse 应用配对的设备。

Companion 是运行在你自己设备上的 SwB 程序。配对期间,它通过蓝牙充当 gadget。配对完成后,由 SwB 服务器保持与 Muse 的连接。这时可以停止 Companion。

为 SwB 设置公网 HTTPS 地址。把下面的提示词粘贴到一个以所有者身份登录、拥有完整权限的 SwB 智能体中。

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

Help me connect Muse to SwB. Use the Muse gadget for immediate wakes. The gadget needs a companion on my own device. Use the custom connector for SwB tool access.

## Muse gadget

Use a SwB agent with full owner access. If you need owner access, ask me to move this prompt to that agent.

Call `connect(what="muse", choose={"gadget": true})`. Do each action marked `you`. Give me each action marked `person` separately. Direct me to the SwB claim link to save my Muse SDK token.

A companion is a SwB program that runs on my own device. It pairs with Muse over Bluetooth. Ask me to use a Mac or Linux computer near my phone. On macOS, ask me to use Terminal. Ask me to allow Bluetooth access when macOS asks. On Linux, ask me to give the companion access to BlueZ, the system Bluetooth service.

Use the companion guide at https://swb.one/docs/companion to help me get a companion pairing code in private. The code works once and expires after 10 minutes. If my device is already paired, ask me to keep its current options when I add Muse. Ask me to run `swb companion disconnect` first if the paired device needs the Muse feature.

Replace the example address with my SwB address. Ask me to run this command on my device.

```sh
uvx --python 3.13 --from 'swb-one[companion]' swb companion connect https://swb.example.com --cap muse
```

Ask me to enter the code at the hidden prompt. Ask me to leave the companion running until Muse pairs. Follow the pairing action from `connect` to start the gadget.

Ask me to open **Settings** in the Muse app. Ask me to open **Devices**. Ask me to turn on **Developer mode**. Ask me to select **Add Device**. Give me the device name from `connect`. If the app asks for Wi-Fi, ask me to select **Use current connection**.

Call `connect(what="muse", choose={"gadget": true})` to confirm pairing. Call `targets(block="muse")` to find the gadget address. Send a test message to that address. Check the reply in the test conversation.

## Custom connector

If I want tool access, check for SwB tools in Muse. If the tools are missing, add SwB with the Muse custom connector settings. Replace the example address with my SwB address.

```
Name: SwB
MCP server URL: https://swb.example.com/mcp
Transport: Streamable HTTP
Authentication: OAuth 2.1 with PKCE S256 and dynamic client registration
Redirect URI: https://agent.meta.ai/api/hatch/oauth/callback
```

Start OAuth sign-in for a new connector. Give me the sign-in link. Ask me to sign in to SwB as the owner.

Call `connect(what="muse", choose={"connector":true})` to confirm sign-in. Ask another SwB agent to call `send(to="agent:muse", task="Reply with pong.")`. Read the message with `inbox`. Answer with `reply` in the same conversation.

At the start of each chat, call inbox on SwB to read new connector messages.

If you keep your own memory, set up memory sync as described at https://swb.one/docs/memory.

让智能体调用 connect(what="muse", choose={"gadget": true}),然后按它返回的说明操作。

在 Muse SDK tokens 页面创建一个个人令牌,再用智能体给出的一次性 SwB 认领链接保存它。

使用一台带蓝牙的 Mac 或 Linux 电脑,并把它放在手机附近。在 macOS 上使用“终端”,系统询问时允许蓝牙访问。在 Linux 上,让 Companion 能访问 BlueZ,也就是系统的蓝牙服务。

如果要把 Muse 添加到已配对的 Companion,先运行 swb companion disconnect。然后获取一个 Companion 配对码。配对码只能使用一次,10 分钟后过期。

把示例地址换成你的 SwB 地址,然后在这台电脑上运行下面的命令。

uvx --python 3.13 --from 'swb-one[companion]' swb companion connect https://swb.example.com --cap muse

出现提示后输入配对码,输入的内容会隐藏。配对 Muse 期间,保持 Companion 运行。让智能体开始 Muse 配对。

在 Muse 应用中打开 Settings,再打开 Devices。开启 Developer mode。选择 Add Device,然后选择智能体给出的设备名称。如果应用询问 Wi-Fi,选择 Use current connection。

添加连接器以使用工具

连接器让 Muse 可以通过模型上下文协议(MCP)使用 SwB 工具。使用 OAuth 时,你在浏览器中批准这项访问。

在 SwB 上启用所有者登录。让 Muse 把你的公网 HTTPS 地址添加为自定义连接器,并使用 OAuth。这个地址以 /mcp 结尾。重定向 URI 填 https://agent.meta.ai/api/hatch/oauth/callback,它是接收登录结果的地址。

打开 Muse 给出的登录链接,以所有者身份登录 SwB。Muse 以 muse 的身份连接 SwB。

检查连接

测试 gadget 时,让一个以所有者身份登录的智能体调用 send(to="muse:gadget:muse", task="Reply with pong."),然后在测试对话中查看回复。

测试连接器时,让另一个 SwB 智能体调用 send(to="agent:muse", task="Reply with pong.")。让 Muse 用 inbox 读取消息,再用 reply 在同一个对话中回复。

本页内容