# 微信 ClawBot

URL: https://swb.one/zh-Hans/docs/setup/wechat

以所有者身份登录 SwB。将下面的提示词发给有所有者权限的智能体。

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

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

Help me connect WeChat ClawBot to the SwB server I host. 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="wechat")`. Ask me whether another agent tool already uses this ClawBot. Call `connect` again with my answer in `choose.existing_binding`. If another agent uses this ClawBot, keep that connection. Connect the agent to SwB through its own integration. Continue with the QR code only when I choose to connect ClawBot to SwB.

Give me the link to the QR code panel at `/connections/wechat` on my SwB server. Ask me to select **Connect**. Ask me to scan the code with my WeChat account. Ask me to confirm the connection in WeChat. If WeChat asks for a PIN, direct me to enter the code in the SwB console. Keep the code in the console.

After ClawBot connects, ask me which agent answers here. Use `targets` to show the choices. Set my choice with `chat_main_set`.

Ask me to send a text message in my one-to-one chat with ClawBot. Ask me to check for a text reply in that chat. If WeChat ends the session, give me the same console link. Ask me to select **Reconnect**. Ask me to scan a new QR code.
```

智能体调用 `connect(what="wechat")` 获取连接指引。如果智能体工具已在使用 ClawBot，请告诉智能体。这种情况需要保留原有连接。若由 SwB 管理 ClawBot，请选择回复消息的智能体。

在 SwB 控制台打开 `/connections/wechat`。选择 **Connect**。用微信扫描二维码。在微信中确认连接。如果微信要求输入 PIN 码，请在 SwB 控制台输入该码。

在与 ClawBot 的单聊中发送一条文字消息。查看同一聊天中的文字回复。

如果微信结束会话，请打开同一个页面。选择 **Reconnect**。扫描新的二维码。

[微信 ClawBot 模块](/zh-Hans/docs/blocks/wechat)
