Cue and OpenClaw use separate Feishu config files. Cue reads
~/.cue/config.json or ~/.cue/agents/<agent>/agent.json. OpenClaw uses ~/.openclaw/openclaw.json.If you are setting up Feishu for OpenClaw inside a sandbox, use the OpenClaw docs instead:
/openclaw/setup/feishu.Before You Start
- You need access to the Feishu Open Platform.
- Lark tenants should use Lark Open Platform and set
domain: "lark"in config. - Cue Feishu runtime currently reads config from
~/.cue/config.jsonor a per-agent override in~/.cue/agents/<agent>/agent.json. - Cue currently uses Feishu WebSocket mode. Webhook mode is not part of the runtime contract.
Step 1: Create the Feishu App
In Feishu or Lark Open Platform:- Create an app.
- Enable bot capability.
- Copy the App ID and App Secret.
- Enable event subscription / long connection.
- Add the event
im.message.receive_v1. - Publish the app in your tenant.
Working Permission Set
If you want the fastest first setup, use this known working batch-import permission set:Step 2: Add the Config to Cue
Edit one of these files:- Global config:
~/.cue/config.json - Per-agent override:
~/.cue/agents/<agent>/agent.json
- For Lark tenants, change
domainto"lark". requireMention: trueis the safest first configuration for group chats.groupPolicymust be set explicitly if you want group messages to work.channel-config.jsonis not the runtime source of truth for Feishu.
Optional: Bind One Feishu Chat to One Existing Cue Conversation
Usebindings when one specific Feishu DM or group chat should always route into one existing Cue conversation.
This is especially useful when:
- you want Feishu replies to appear in the same Cue conversation you already use in web
- you want that chat to run with
agentType: "openclaw"instead of normal Cue runtime
~/.cue/agents/<agent>/agent.json:
<FEISHU_CHAT_ID>with the Feishu chat id, often anoc_...value<CUE_CONVERSATION_ID>with the Cue conversation UUID you want this chat to use
- open the target Feishu chat
- open chat settings / details
- scroll near the bottom and look for a field like
Chat ID: oc_xxxxxx
- Put this in
agent.jsonwhen you want one specific local agent to own the Feishu connection and binding. agentTypecan becueoropenclaw.conversationIdis the Cue conversation identity, not an OpenClaw session id.- Do not paste real App Secrets or production chat ids into committed config files or docs.
Step 3: Restart Cue
After saving config:Step 4: Validate
Check runtime status:- DM the bot directly, or
- mention it in a group chat if
groupPolicyis enabled
Sandbox / code-server Setup
If you are doing this inside a Cue sandbox or code-server session, the same config belongs inside the sandbox home directory:/home/user/.cue/config.json/home/user/.cue/agents/<agent>/agent.json
Troubleshooting
- App shows offline or Feishu reports no long connection:
Restart the target Cue worker and check
cue -m status --agent <agent> --json. - DMs work but group messages do not:
Check
groupPolicy,requireMention, and your allowlists. - Feishu blocks the bot on missing permissions:
Re-check the batch-import set above, especially
im:message:send_as_bot,im:message:readonly, andim:chat.members:bot_access. - You edited
channel-config.jsonand nothing changed: Move the config intoagent.jsonor~/.cue/config.json. - You run both Cue and OpenClaw: Confirm which App ID and App Secret belong to which runtime before changing anything.