docs/guides/wechat-ai-agent.md
This guide connects nanobot to WeChat through the weixin channel. The channel
uses HTTP long polling with QR-code login through the supported upstream API.
weixin channel enabled in nanobotnanobot agent -m "Hello!"
python -m pip install nanobot-ai
nanobot onboard --wizard
Install the optional channel dependency:
nanobot plugins enable weixin
Merge this snippet into ~/.nanobot/config.json:
{
"channels": {
"weixin": {
"enabled": true
}
}
}
Omitting allowFrom enables pairing-only mode. The first private WeChat message
from a new sender gets a pairing code instead of agent access.
Log in:
nanobot channels login weixin
Use --force if you need to discard saved login state and authenticate again.
nanobot channels status
nanobot gateway
Send a private WeChat message to the bot. It should reply with a pairing code. Approve it from a trusted local surface:
nanobot agent -m "/pairing approve ABCD-EFGH"
Send the message again after approval and watch gateway logs for the sender ID and reply.
allowFrom only when you want a
static allowlist.nanobot channels login weixin --force.