Creating a Bot
First, log in to the WeCom Admin Console.
Security And Management in the left sidebar, then click Intelligent Bot under Management Tool.
As shown:

Create Bot and select Manual Creation, scroll to the bottom of the page, click Create via API Mode, and enter the page:

Long Connection Configuration
Enable Long Connection API Mode
In the WeCom Admin Console, go to the Intelligent Bot configuration page, enable “API Mode” and select “Long Connection”:
Obtaining Credentials
After enabling the Long Connection API mode, you need to obtain the following credentials to establish the connection:| Credential | Description |
|---|---|
| BotID | The unique identifier of the intelligent bot, used to identify the bot |
| Secret | The dedicated key for long connections, used for identity verification |
Configuring the Bot
Start the LangBot main program, select the adapterWeCom Intelligent Bot, and fill in the configuration items.
Enter the BotID, Secret, and bot name from the long connection into the fields, click save and enable.
The bot name must match the name of the newly created bot, otherwise the bot will not respond in group chats.

URL Callback Configuration
Click to randomly generate Token and EncodingAESKey, then fill in the basic bot information above. Pay attention to setting the visibility scope.
My Company in the left sidebar and save the Company ID at the bottom.
Configuring Callback URL
Start the LangBot main program, select the adapterWeCom Intelligent Bot, and fill in the configuration items.Among them, the token is Token, the Encoding-AESKey is EncodingAESKey, and the Bot ID can be filled in as xxx (or filled in randomly, it will be changed later). After filling in, click
Save, and Enable the robot.

We recommend that you first refer to Configure HTTP Reverse Proxy to configure the LangBot callback address.

URL Callback. If the creation is successful, it will jump to the details page. If the message Request URL Failed appears, please double-check whether the above steps have been completed one by one.
Details page after successful creation:\

Bot ID and bot name from the WeCom robot details page, return to the LangBot management page, change the Bot ID of the deployed intelligent robot to the copied ID, fill in the bot name, and restart the robot.
Enable Streaming
A streaming toggle has been added for locally deployed models or models that do not support streaming.
Start Using
Enter WeCom, click➕, as shown:

Company-Created, select the created bot, and enter the chat interface.
Similarly, if you want to invite the bot to a group chat, click the add member button in the group chat and add the bot from there.
Effect Images

