docs/guides/feishu-ai-agent.md
This guide connects nanobot to Feishu or Lark through the feishu channel. The
channel uses a WebSocket long connection, so the first setup does not require a
public webhook URL.
feishu channel enabled in config.jsonnanobot agent -m "Hello!"
nanobot gateway continuously.python -m pip install nanobot-ai
nanobot onboard --wizard
Install the optional channel dependency:
nanobot plugins enable feishu
The easiest path is QR login:
nanobot channels login feishu
Open the printed URL or scan the QR code. nanobot writes the generated appId,
appSecret, domain, and enabled fields into the active config.
If QR login is unavailable, create a Feishu/Lark app manually and merge this
shape into ~/.nanobot/config.json:
{
"channels": {
"feishu": {
"enabled": true,
"appId": "cli_xxx",
"appSecret": "xxx",
"groupPolicy": "mention",
"streaming": true,
"domain": "feishu"
}
}
}
Omitting allowFrom enables pairing-only mode. A new user should DM the bot,
get a pairing code, and be approved before using the bot normally.
For manual apps, enable the Bot capability, receive-message events, and Long
Connection mode. If your app cannot get the cardkit:card:write permission,
set "streaming": false.
nanobot channels status
nanobot gateway
DM the bot first. It should return a pairing code. Approve it from a trusted local surface:
nanobot agent -m "/pairing approve ABCD-EFGH"
After approval, DM the bot again or mention it in a group chat:
@nanobot Hello from Feishu
allowFrom only when you want a
static allowlist.groupPolicy as "mention" before inviting the bot into busy groups.cardkit:card:write or set
"streaming": false.nanobot gateway --verbose.