Crew connects to WeCom (企业微信) through its AI-bot API over an outbound WebSocket. Create the bot in your WeCom admin console, drop in two values, and you're chatting. Replies stream back live.
userid / 账号)Look for WeCom WS connected and subscribed in the status badge. Message the bot in WeCom.
# Save credentials to ~/.kiro/crew/.env echo "WECOM_BOT_ID=your-bot-id" >> ~/.kiro/crew/.env echo "WECOM_SECRET=your-bot-secret" >> ~/.kiro/crew/.env
In ~/.kiro/crew/config.json:
{ "wecom": { "enabled": true, "allowed_users": [{ "userid": "zhangsan", "name": "Zhang San" }] } }
Then: kirocrew restart
Message the bot in WeCom. If it stays quiet, confirm your userid is allowed.
KIROCREW_OWNER_ID) plus anyone in allowed_users"allow_all_users": true to skip individual listing — this is an explicit opt-in (an empty list never means "everyone")Images, regular files, and voice notes sent to the bot reach the agent. WeCom supplies voice-note transcripts, while attached audio files are downloaded and transcribed locally. Inbound limits are 10 MB per image, 20 MB per file, and 10 items per message.
Files the agent sends through file_send or a dashboard upload arrive as native WeCom media. PNG and JPEG files arrive as pictures, MP4 and WebM files as videos, and other formats as downloads. Outbound pictures and voice notes are limited to 2 MB; files and videos are limited to 20 MB. A larger picture is delivered as a file instead of being dropped.
An image merely mentioned inline in a reply is not uploaded. Use file_send when the image itself should arrive.
| Command | Effect |
|---|---|
/new (or 新对话, 清空) | Start a fresh conversation |
/compact | Compress context |
OPTIONS prompts arrive as plain text; just reply normally| Key | Default | Purpose |
|---|---|---|
wecom.enabled | false | Turns the channel on |
wecom.allowed_users | [] | { "userid", "name" } entries (empty = owner only) |
wecom.allow_all_users | false | Allow all organization members |
wecom.soft_threshold_pct | 80 | Suggest /compact past this |
wecom.hard_threshold_pct | 95 | Hard cutoff |
wecom.ws_url | wss://openws.work.weixin.qq.com | WeCom AI-bot endpoint |
Credentials in ~/.kiro/crew/.env: WECOM_BOT_ID and WECOM_SECRET.
| Problem | Fix |
|---|---|
| No reply | Sender's userid isn't allowed or enabled is false |
No channel started in logs | A credential is unset |
| Connects then goes quiet | Bot may have been removed from the WeCom console — re-add and restart |
WeCom