OpenIM channel plugin for OpenClaw Gateway.
Chinese documentation: README.zh-CN.md
- Direct chat and group chat support
- Inbound and outbound text/image/file messages
openim_send_videois intentionally sent as a file message- Quote/reply message parsing for inbound context
- Multi-account login via
channels.openim.accounts.<id> - Group trigger policy with optional mention-only mode
- Interactive setup command:
openclaw openim setup
Install from npm:
openclaw plugins install @openim/openclaw-channelOr install from local path:
openclaw plugins install /path/to/openclaw-channelRepository: https://github.com/openimsdk/openclaw-channel
- npm package name:
@openim/openclaw-channel - plugin id:
openclaw-channel(used inplugins.entriesandplugins.allow) - channel id:
openim(used inchannels.openim) - setup command:
openclaw openim setup
openclaw openim setup{
"channels": {
"openim": {
"accounts": {
"default": {
"enabled": true,
"token": "your_token",
"wsAddr": "ws://127.0.0.1:10001",
"apiAddr": "http://127.0.0.1:10002"
}
}
}
}
}userID and platformID are optional. If omitted, they are auto-derived from JWT token claims (UserID and PlatformID).
requireMention is optional and defaults to true.
inboundWhitelist is optional. If omitted or empty, inbound handling keeps existing behavior.
If set, only these users can trigger processing:
- direct messages to the account
- group messages where they
@the account
Single-account fallback (without accounts) is supported.
Environment fallback is supported for the default account:
OPENIM_TOKENOPENIM_WS_ADDROPENIM_API_ADDR
Optional env overrides:
OPENIM_USER_IDOPENIM_PLATFORM_ID
-
openim_send_texttarget:user:<id>orgroup:<id>text: message textaccountId(optional): select sending account
-
openim_send_imagetarget:user:<id>orgroup:<id>image: local path (file://supported) orhttp(s)URLaccountId(optional): select sending account
-
openim_send_videotarget:user:<id>orgroup:<id>video: local path (file://supported) orhttp(s)URL- behavior: sent as a file message (not OpenIM video message)
name(optional): override filename for URL inputaccountId(optional): select sending account
-
openim_send_filetarget:user:<id>orgroup:<id>file: local path (file://supported) orhttp(s)URLname(optional): override filename for URL inputaccountId(optional): select sending account
pnpm run build
pnpm run test:connectFor test:connect, configure .env first (see .env.example).
AGPL-3.0-only. See LICENSE.