Skip to main content

WeCom

This is a shipped runtime-backed surface: direct sends are implemented, the serve loop is implemented, and the channel can join multi-channel-serve or gateway run.

At A Glance

FieldValue
Catalog idwecom
Config keywecom
Implementation statusruntime_backed
Transportwecom_aibot_long_connection
Aliaseswechat-work, qywx
Default send target kindconversation

Minimal Config

[wecom]
enabled = true
bot_id_env = "WECOM_BOT_ID"
secret_env = "WECOM_SECRET"
allowed_conversation_ids = ["group_demo"]

Smoke Test

loong wecom-send --target "wmxxxxxxxxxxxxxxxx" --text "hello from loong"
loong wecom-serve

Command Surface

OperationCommandUsage or status
proactive sendwecom-sendUsage: loong wecom-send [OPTIONS] —target <TARGET> —text <TEXT>
long connection reply loopwecom-serveUsage: loong wecom-serve [OPTIONS]

Required Fields For Send

RequirementConfig pathsEnv pointer pathsDefault env
channel enabledwecom.enabled
wecom.accounts.<account>.enabled
nonenone
aibot bot idwecom.bot_id
wecom.accounts.<account>.bot_id
wecom.bot_id_env
wecom.accounts.<account>.bot_id_env
WECOM_BOT_ID
aibot secretwecom.secret
wecom.accounts.<account>.secret
wecom.secret_env
wecom.accounts.<account>.secret_env
WECOM_SECRET

Required Fields For Serve

RequirementConfig pathsEnv pointer pathsDefault env
channel enabledwecom.enabled
wecom.accounts.<account>.enabled
nonenone
aibot bot idwecom.bot_id
wecom.accounts.<account>.bot_id
wecom.bot_id_env
wecom.accounts.<account>.bot_id_env
WECOM_BOT_ID
aibot secretwecom.secret
wecom.accounts.<account>.secret
wecom.secret_env
wecom.accounts.<account>.secret_env
WECOM_SECRET
allowed conversation idswecom.allowed_conversation_ids
wecom.accounts.<account>.allowed_conversation_ids
nonenone

Optional Transport Tuning

Tuning fieldConfig pathsWhy it exists
websocket url overridewecom.websocket_url
wecom.accounts.<account>.websocket_url
controlled environments, bridge setups, or diagnostics
ping interval secondswecom.ping_interval_s
wecom.accounts.<account>.ping_interval_s
tune keepalive cadence for the network path
reconnect interval secondswecom.reconnect_interval_s
wecom.accounts.<account>.reconnect_interval_s
tune retry behavior after disconnects

Gateway And Ownership

This surface can run directly through its own *-serve command, or under Gateway And Supervision through multi-channel-serve and gateway run.

Operator Notes

  • Loong documents WeCom as the official AIBot long-connection lane. Do not describe a webhook callback mode as if it were the same shipped contract.
  • websocket_url, ping_interval_s, and reconnect_interval_s are tuning knobs, not day-zero requirements for a basic rollout.