docs/guides/qq-ai-agent.md
This guide connects nanobot to QQ through the official qq channel. The
official channel uses the botpy SDK and currently focuses on private messages.
For QQ group chat and OneBot v11 workflows, use the Napcat section in the full
chat-apps reference.
qq channel enabled in nanobotnanobot agent -m "Hello!"
python -m pip install nanobot-ai
nanobot onboard --wizard
Install the optional channel dependency:
nanobot plugins enable qq
In the QQ Open Platform, create a bot application and copy the AppID and
AppSecret. Add your QQ account to the sandbox test members, then merge this
snippet into ~/.nanobot/config.json:
{
"channels": {
"qq": {
"enabled": true,
"appId": "YOUR_APP_ID",
"secret": "YOUR_APP_SECRET",
"msgFormat": "plain"
}
}
}
Omitting allowFrom enables pairing-only mode. A new private sender should get
a pairing code before normal agent access.
nanobot channels status
nanobot gateway
Send the QQ bot a private message from a sandbox account. It should return a pairing code. Approve it from a trusted local surface:
nanobot agent -m "/pairing approve ABCD-EFGH"
Send the message again after approval.
allowFrom only when you want a
static allowlist.msgFormat as "plain".