docs/en/channels/wechatmp.mdx
CowAgent supports both personal subscription accounts and enterprise service accounts.
| Type | Requirements | Features |
|---|---|---|
| Personal Subscription | Available to individuals | Sends a placeholder reply first; users must send a message to retrieve the full response |
| Enterprise Service | Enterprise with verified customer service API | Can proactively push replies to users |
Add the following configuration to config.json:
{
"channel_type": "wechatmp",
"single_chat_prefix": [""],
"wechatmp_app_id": "wx73f9******d1e48",
"wechatmp_app_secret": "YOUR_APP_SECRET",
"wechatmp_aes_key": "",
"wechatmp_token": "YOUR_TOKEN",
"wechatmp_port": 80
}
These configurations must be consistent with the WeChat Official Account Platform. Navigate to Settings & Development → Basic Configuration → Server Configuration and configure as shown below:
wechatmp_app_secret), and add the server IP to the whitelistconfig.json with the official account parameters matching the platform configurationsudo if you don't have permission; stop any process occupying port 80)http://{HOST}/wx, where {HOST} can be the server IP or domainAfter following the account and sending a message, you should see the following result:
Due to subscription account limitations, short replies (within 15s) can be returned immediately, but longer replies will first send a "Thinking..." placeholder, requiring users to send any text to retrieve the answer. Enterprise service accounts can solve this with the customer service API.
<Tip> **Voice Recognition**: You can use WeChat's built-in voice recognition. Enable "Receive Voice Recognition Results" under "Settings & Development → API Permissions" on the official account management page. </Tip>The setup process for enterprise service accounts is essentially the same as personal subscription accounts, with the following differences:
"channel_type": "wechatmp_service" in config.json; other configurations remain the same{
"channel_type": "wechatmp_service",
"single_chat_prefix": [""],
"wechatmp_app_id": "YOUR_APP_ID",
"wechatmp_app_secret": "YOUR_APP_SECRET",
"wechatmp_aes_key": "",
"wechatmp_token": "YOUR_TOKEN",
"wechatmp_port": 80
}