docs: update docs and readme

This commit is contained in:
zhayujie
2026-05-24 18:29:57 +08:00
parent 29af855ecd
commit 91d427c8f9
32 changed files with 618 additions and 264 deletions

View File

@@ -15,8 +15,11 @@ description: Integrate CowAgent into Feishu via a custom enterprise app
No need to manually create an app on the Feishu Developer Platform. Start the Cow project, open the web console (default `http://127.0.0.1:9899/`), go to **Channels**, click **Add Channel**, choose **Feishu**, then under the **Scan QR** tab click **One-click Create Feishu App** and scan with the **Feishu App** to complete app creation and connection automatically.
<img src="https://cdn.link-ai.tech/doc/20260505181126.png" width="800"/>
<Note>
The created app comes with all required permissions (messaging, card read/write, group events, etc.) and event subscriptions pre-configured. Currently only the Feishu mainland version is supported (Lark international not yet supported).
1. Requires `lark-oapi` ≥ 1.5.5.
2. The created app comes with all required permissions (messaging, card read/write, group events, etc.) and event subscriptions pre-configured — no manual setup on the developer console needed. Currently only the Feishu mainland version is supported (Lark international not yet supported).
</Note>
When starting from CLI without `feishu_app_id` configured, the QR code is also printed to the terminal.

View File

@@ -11,29 +11,29 @@ The table below summarizes the inbound message types, bot reply types, and group
| Channel | Text | Image | File | Voice | Group Chat |
| --- | :-: | :-: | :-: | :-: | :-: |
| [WeChat](/channels/weixin) | ✅ | ✅ | ✅ | ✅ | |
| [Web Console](/channels/web) | ✅ | ✅ | ✅ | ✅ | |
| [Feishu](/channels/feishu) | ✅ | ✅ | ✅ | ✅ | ✅ |
| [DingTalk](/channels/dingtalk) | ✅ | ✅ | ✅ | ✅ | ✅ |
| [WeCom Smart Bot](/channels/wecom-bot) | ✅ | ✅ | ✅ | ✅ | ✅ |
| [QQ](/channels/qq) | ✅ | ✅ | ✅ | | ✅ |
| [WeCom App](/channels/wecom) | ✅ | ✅ | ✅ | ✅ | |
| [Official Account](/channels/wechatmp) | ✅ | ✅ | | ✅ | |
| [WeChat](/en/channels/weixin) | ✅ | ✅ | ✅ | ✅ | |
| [Web Console](/en/channels/web) | ✅ | ✅ | ✅ | ✅ | |
| [Feishu](/en/channels/feishu) | ✅ | ✅ | ✅ | ✅ | ✅ |
| [DingTalk](/en/channels/dingtalk) | ✅ | ✅ | ✅ | ✅ | ✅ |
| [WeCom Bot](/en/channels/wecom-bot) | ✅ | ✅ | ✅ | ✅ | ✅ |
| [QQ](/en/channels/qq) | ✅ | ✅ | ✅ | | ✅ |
| [WeCom App](/en/channels/wecom) | ✅ | ✅ | ✅ | ✅ | |
| [Official Account](/en/channels/wechatmp) | ✅ | ✅ | | ✅ | |
- The **Image / File / Voice** columns indicate that the channel can send and receive the corresponding message types; see each channel's docs for details
- The **Group Chat** column indicates the ability to recognize and respond to group messages
<Tip>
The voice / image capabilities of each channel depend on the configuration of the corresponding model provider. See [Models Overview](/models) for details.
The voice / image capabilities of each channel depend on the configuration of the corresponding model provider. See [Models Overview](/en/models/index) for details.
</Tip>
## Channel List
- [Web Console](/channels/web) — built-in browser-based chat and management panel, enabled by default
- [WeChat](/channels/weixin) — log in via personal WeChat QR scan
- [Feishu](/channels/feishu) — Feishu custom bot
- [DingTalk](/channels/dingtalk) — DingTalk custom bot
- [WeCom Smart Bot](/channels/wecom-bot) — WeCom smart robot
- [QQ](/channels/qq) — QQ official bot open platform
- [WeCom App](/channels/wecom) — WeCom custom app integration
- [Official Account](/channels/wechatmp) — WeChat Official Account (subscription / service account)
- [Web Console](/en/channels/web) — built-in browser-based chat and management panel, enabled by default
- [WeChat](/en/channels/weixin) — log in via personal WeChat QR scan
- [Feishu](/en/channels/feishu) — Feishu custom bot
- [DingTalk](/en/channels/dingtalk) — DingTalk custom bot
- [WeCom Bot](/en/channels/wecom-bot) — WeCom AI Bot via WebSocket long connection
- [QQ](/en/channels/qq) — QQ Official Bot open platform
- [WeCom App](/en/channels/wecom) — WeCom custom app integration
- [Official Account](/en/channels/wechatmp) — WeChat Official Account (subscription / service)

View File

@@ -3,71 +3,88 @@ title: WeCom Bot
description: Connect CowAgent to WeCom AI Bot (WebSocket long connection)
---
Connect CowAgent via WeCom AI Bot, supporting both direct messages and group chats. No public IP required — uses WebSocket long connection with Markdown rendering and streaming output.
> Connect CowAgent via WeCom AI Bot, supporting both internal direct messages and group chats. No public IP required — uses a WebSocket long connection, with Markdown rendering and streaming output.
<Note>
WeCom Bot and WeCom App are two different integration methods. WeCom Bot uses WebSocket long connection, requiring no public IP or domain, making it easier to set up.
WeCom Bot and WeCom App are two different integration methods. WeCom Bot uses a WebSocket long connection and requires no public IP or domain, making setup much simpler.
</Note>
## 1. Create an AI Bot
## 1. Connection methods
### Option A: One-click QR scan (recommended)
No need to create the bot ahead of time. Start CowAgent and open the Web console (local URL: http://127.0.0.1:9899/), go to the **Channels** tab, click **Connect Channel**, choose **WeCom Bot**, switch to **QR scan** mode, and scan the QR code with **WeCom** — bot creation and connection complete automatically.
<img src="https://cdn.link-ai.tech/doc/20260401121213.png" width="800"/>
<Note>
After a successful scan, you can further configure the bot (name, avatar, visibility scope, etc.) in **WeCom Workbench → AI Bot**.
</Note>
### Option B: Manual creation
Create the AI Bot in WeCom and obtain the Bot ID and Secret, then connect via the Web console or config file.
**Step 1: Create the AI Bot**
1. Open the WeCom client, go to **Workbench**, and click **AI Bot**:
<img src="https://cdn.link-ai.tech/doc/20260316180959.png" width="800"/>
2. Click **Create Bot****Manual Creation**:
2. Click **Create Bot → Manual Creation**:
<img src="https://cdn.link-ai.tech/doc/20260316181118.png" width="600"/>
<img src="https://cdn.link-ai.tech/doc/20260316181118.png" width="800"/>
3. Scroll to the bottom of the right panel and select **API Mode**:
<img src="https://cdn.link-ai.tech/doc/20260316181215.png" width="600"/>
<img src="https://cdn.link-ai.tech/doc/20260316181215.png" width="800"/>
4. Set the bot name, avatar, and visibility scope. Select **Long Connection** mode, note down the **Bot ID** and **Secret**, then click Save.
4. Set the bot name, avatar, and visibility scope. Choose **Long Connection** mode, save the **Bot ID** and **Secret**, then click Save.
## 2. Configuration
**Step 2: Connect to CowAgent**
### Option A: Web Console
<Tabs>
<Tab title="Web Console">
Open the Web console, go to the **Channels** tab, click **Connect Channel**, choose **WeCom Bot**, switch to **Manual** mode, enter the Bot ID and Secret, and click Connect.
Start the program and open the Web console (local access: http://127.0.0.1:9899). Go to the **Channels** tab, click **Connect Channel**, select **WeCom Bot**, fill in the Bot ID and Secret from the previous step, and click Connect.
<img src="https://cdn.link-ai.tech/doc/20260316181711.png" width="800"/>
</Tab>
<Tab title="Config File">
Add the following to `config.json`, then start CowAgent:
<img src="https://cdn.link-ai.tech/doc/20260316181711.png" width="600"/>
```json
{
"channel_type": "wecom_bot",
"wecom_bot_id": "YOUR_BOT_ID",
"wecom_bot_secret": "YOUR_SECRET"
}
```
### Option B: Config File
| Parameter | Description |
| --- | --- |
| `wecom_bot_id` | Bot ID of the AI Bot |
| `wecom_bot_secret` | Secret of the AI Bot |
</Tab>
</Tabs>
Add the following to your `config.json`:
The log line `[WecomBot] Subscribe success` confirms the connection is established.
```json
{
"channel_type": "wecom_bot",
"wecom_bot_id": "YOUR_BOT_ID",
"wecom_bot_secret": "YOUR_SECRET"
}
```
| Parameter | Description |
| --- | --- |
| `wecom_bot_id` | Bot ID of the AI Bot |
| `wecom_bot_secret` | Secret for the AI Bot |
After configuration, start the program. The log message `[WecomBot] Subscribe success` indicates a successful connection.
## 3. Supported Features
## 2. Supported features
| Feature | Status |
| --- | --- |
| Direct Messages | ✅ |
| Group Chat (@bot) | ✅ |
| Text Messages | ✅ Send & Receive |
| Image Messages | ✅ Send & Receive |
| File Messages | ✅ Send & Receive |
| Streaming Reply | ✅ |
| Scheduled Push | ✅ |
| Direct chat | ✅ |
| Group chat (@bot) | ✅ |
| Text messages | ✅ Send / Receive |
| Image messages | ✅ Send / Receive |
| File messages | ✅ Send / Receive |
| Streaming replies | ✅ |
| Scheduled push messages | ✅ |
## 4. Usage
## 3. Usage
Search for the bot name in WeCom to start a direct conversation.
Search for the bot's name inside WeCom to start a direct chat.
To use in group chats, add the bot to a group and @mention it to send messages.
To use the bot in an internal group chat, add it to the group and @-mention it.
<img src="https://cdn.link-ai.tech/doc/20260316182902.png" width="800"/>

View File

@@ -1,19 +1,21 @@
---
title: WeChat
description: Connect CowAgent to personal WeChat
description: Connect CowAgent to personal WeChat (via the official API)
---
> Connect CowAgent to your personal WeChat. Simply scan a QR code to log in no public IP required. Supports text, image, voice, file, and video messages.
> Connect CowAgent to your personal WeChat — scan to log in, no public IP required. Supports text, image, voice, file, and video messages in 1-on-1 chats. Backed by WeChat's official API; safe to use. After connecting, a bot assistant is added to your conversation list without affecting normal account usage.
## 1. Configuration
## 1. Setup and run
### Option A: Web Console
### Option A: Web console
Start the program and open the Web console (local access: http://127.0.0.1:9899). Go to the **Channels** tab, click **Connect Channel**, select **WeChat**, and follow the prompts to scan the QR code.
Start CowAgent and open the Web console (local URL: http://127.0.0.1:9899/). Go to the **Channels** tab, click **Connect Channel**, select **WeChat**, and follow the prompts to scan in.
### Option B: Config File
<img src="https://cdn.link-ai.tech/doc/20260322195114.png" width="800" />
Set `channel_type` to `weixin` in your `config.json`:
### Option B: Config file
Set `channel_type` to `weixin` in `config.json`:
```json
{
@@ -21,52 +23,49 @@ Set `channel_type` to `weixin` in your `config.json`:
}
```
After starting the program, a QR code will be displayed in the terminal. Scan it with WeChat and confirm on your phone to complete login.
After starting CowAgent, a QR code is displayed in the terminal. Scan it with WeChat to complete login.
<img src="https://cdn.link-ai.tech/doc/20260322195509.png" width="800" />
<Note>
For backward compatibility, setting `channel_type` to `wx` also activates the WeChat channel.
1. For backward compatibility, setting `channel_type` to `wx` also activates the WeChat channel.
2. The WeChat client must be on version **8.0.69** or higher.
</Note>
## 2. Parameters
## 2. Usage
| Parameter | Description | Default |
| --- | --- | --- |
| `channel_type` | Set to `weixin` or `wx` | — |
Once authorized, the integration completes and you can start chatting. A bot assistant is created in your WeChat conversation list, leaving normal account usage unaffected.
Login credentials are automatically saved to `~/.weixin_cow_credentials.json`. To force a re-login, delete this file and restart.
> You can find the bot at any time by searching for **"微信ClawBot"**. You may also rename it, change its avatar, pin it to the top of your conversation list, and so on.
<img src="https://cdn.link-ai.tech/doc/83ae8251d896219fde4803f4205205be.jpg" width="250" />
## 3. Login
### QR Code Login
### QR code login
On first startup, a QR code is displayed in the terminal (valid for approximately 2 minutes). Scan it with WeChat and confirm on your phone.
On first startup, a QR code appears in the terminal (valid for around 2 minutes). Scan it with WeChat and confirm on your phone to log in.
- The QR code automatically refreshes when it expires
- The `qrcode` dependency is already included in `requirements.txt`, enabling QR code rendering directly in the terminal
- The QR code refreshes automatically when it expires
- The `qrcode` dependency is already included in `requirements.txt`, so the QR code renders directly in the terminal after install
### Credential Persistence
### Credential persistence
After successful login, credentials are saved to `~/.weixin_cow_credentials.json`. Subsequent startups will reuse the saved credentials without requiring a new scan.
After a successful login, credentials are saved to `~/.weixin_cow_credentials.json`. Subsequent startups reuse the saved credentials with no need to re-scan.
To force a re-login, delete the credentials file and restart the program.
To force a re-login, delete the credentials file and restart.
### Session Expiry
### Session expiry
When the WeChat session expires (errcode -14), the program automatically clears old credentials and initiates a new QR login — no manual intervention required.
When the WeChat session expires (errcode `-14`), CowAgent automatically clears old credentials and initiates a new QR login — no manual intervention required.
## 4. Supported Features
## 4. Supported features
| Feature | Status |
| --- | --- |
| Direct Messages | ✅ |
| Text Messages | ✅ Send & Receive |
| Image Messages | ✅ Send & Receive |
| File Messages | ✅ Send & Receive |
| Video Messages | ✅ Send & Receive |
| Voice Messages | ✅ Receive |
## 5. Notes
1. Ensure network access to `ilinkai.weixin.qq.com`.
2. Media files (images, files, videos) are transferred via CDN with AES-128-ECB encryption, handled automatically by the program.
3. A stable network connection is recommended to avoid frequent disconnections that would require re-scanning.
| Direct messages | ✅ |
| Text messages | ✅ Send & Receive |
| Image messages | ✅ Send & Receive |
| File messages | ✅ Send & Receive |
| Video messages | ✅ Send & Receive |
| Voice messages | ✅ Receive (built-in speech recognition) |