-
Notifications
You must be signed in to change notification settings - Fork 440
Feature Request: WeChat Personal Bot Channel via iLink SDK #266
Description
Feature Request: WeChat Personal Bot Channel via iLink SDK
Summary
This proposal requests the integration of Tencent's iLink SDK (OpenClaw WeChat Plugin) as a new channel type in Clawith, enabling personal WeChat bot capabilities for individual digital employees.
Unlike existing enterprise channels (Feishu, WeCom, DingTalk), the iLink SDK allows personal WeChat accounts to function as bot interfaces through a simple QR code binding process—eliminating the need for complex bot registration and approval workflows.
Background
Tencent's iLink Bot API (2026)
In 2026, Tencent officially opened the iLink Bot API through the OpenClaw plugin (@tencent-weixin/openclaw-weixin), enabling:
- Personal WeChat accounts as bot interfaces (not enterprise WeCom)
- QR code binding - users scan to link their WeChat to a bot
- Official API - not a third-party hack, fully supported by Tencent
- Message quota management - built-in rate limiting
Key Technical Resources
| Resource | Description |
|---|---|
| OpenClaw WeChat Plugin | Official npm package |
| iLink Protocol Analysis | Protocol documentation |
| Tencent Cloud IM Integration | Official setup guide |
Problem Statement: Enterprise Channel Limitations
Current Channel Options in Clawith
| Channel | Bot Registration | User Binding | Scalability |
|---|---|---|---|
| Feishu | Requires app approval | Per-tenant installation | Complex for multi-tenant |
| WeCom | Enterprise verification | Admin configuration | Enterprise-only |
| DingTalk | Enterprise approval | Admin configuration | Enterprise-only |
| Slack | App marketplace | Workspace install | Per-workspace |
| Discord | Bot token | Server invite | Per-server |
The "One Bot Per Person" Problem
For enterprise deployments where each employee gets a personal digital employee:
| Platform | Challenge |
|---|---|
| Feishu | Each bot requires: App ID, App Secret, approval process, tenant installation |
| WeCom | Requires enterprise verification, admin approval, per-user configuration |
| DingTalk | Similar enterprise approval bottlenecks |
Result: At scale (e.g., 1000 employees), administrators must:
- Register and manage 1000+ bot applications
- Handle approval workflows for each
- Configure tenant/user bindings individually
- Maintain credentials and tokens for each bot
This is operationally infeasible for large-scale personal digital employee deployments.
Proposed Solution: WeChat iLink Channel
How iLink Differs from Enterprise Channels
| Aspect | Enterprise Channels (Feishu/WeCom) | WeChat iLink |
|---|---|---|
| Bot Registration | Complex approval process | Automatic (per bot instance) |
| User Binding | Admin/Tenant configuration | QR code scan |
| Account Type | Enterprise/Service account | Personal WeChat |
| Onboarding | Multi-step approval | Single scan |
| Per-User Bot | Requires separate registration | Native support |
User Experience Flow
┌─────────────────────────────────────────────────────────────┐
│ WeChat iLink Binding │
├─────────────────────────────────────────────────────────────┤
│ │
│ 1. Admin creates digital employee in Clawith │
│ ↓ │
│ 2. System generates unique QR code for this bot │
│ ↓ │
│ 3. Employee scans QR code with personal WeChat │
│ ↓ │
│ 4. WeChat account ↔ Digital employee binding established │
│ ↓ │
│ 5. Employee chats with their digital employee in WeChat │
│ │
└─────────────────────────────────────────────────────────────┘
No bot registration. No admin approval. No complex configuration.
Market Opportunity
Unique Value Proposition
| Feature | Clawith + WeChat iLink | Competitors |
|---|---|---|
| Personal WeChat bot | ✅ Official API | ❌ Not available |
| QR code binding | ✅ Native | ❌ Requires enterprise setup |
| Per-user digital employee | ✅ Scalable | ❌ Complex registration |
| Enterprise-grade multi-agent | ✅ Clawith core |
Competitive Landscape
No existing platform offers:
- Enterprise multi-agent capabilities
- Personal WeChat integration
- Simple per-user bot provisioning
This combination would position Clawith as the first enterprise multi-agent platform with native personal WeChat support.
Target Scenarios
- Enterprise Digital Employees - Each staff member gets a personal AI assistant in WeChat
- Customer Service - Dedicated bot per customer service representative
- Sales Team Support - Personal assistant for each sales person
- Executive Assistants - Private AI assistant for leadership
Technical Design
1. Database Schema Changes
Add wechat_ilink to channel type enum:
# backend/app/models/channel_config.py
channel_type: Mapped[str] = mapped_column(
Enum(
"feishu", "wecom", "dingtalk", "slack", "discord",
"atlassian", "microsoft_teams", "agentbay",
"wechat_ilink", # NEW
name="channel_type_enum"
),
...
)Add iLink-specific fields:
# WeChat iLink specific config
ilink_bot_id: Mapped[str | None] = mapped_column(String(255))
ilink_bot_secret: Mapped[str | None] = mapped_column(String(512))
ilink_binding_qr_code: Mapped[str | None] = mapped_column(String(1024)) # QR code URL
ilink_bound_openid: Mapped[str | None] = mapped_column(String(255)) # Bound user's WeChat OpenID2. API Endpoints
# backend/app/api/wechat_ilink.py
router = APIRouter(prefix="/wechat-ilink", tags=["wechat-ilink"])
@router.post("/agents/{agent_id}/bind")
async def generate_binding_qr_code(
agent_id: uuid.UUID,
current_user: User = Depends(get_current_user),
db: AsyncSession = Depends(get_db),
):
"""Generate QR code for WeChat binding."""
# Call iLink API to generate binding QR code
# Store bot_id, bot_secret, qr_code_url
pass
@router.post("/callback")
async def ilink_callback(request: Request):
"""Handle iLink gateway callback (messages, binding events)."""
# Process incoming message from iLink gateway
# Route to appropriate agent based on openid mapping
pass
@router.get("/agents/{agent_id}/status")
async def get_binding_status(
agent_id: uuid.UUID,
current_user: User = Depends(get_current_user),
):
"""Check if WeChat account is bound to this agent."""
pass3. Service Layer
# backend/app/services/wechat_ilink_service.py
class WeChatILinkService:
"""Service for WeChat iLink Bot integration."""
async def create_bot(self, agent_id: str) -> dict:
"""Create an iLink bot instance for an agent."""
# Call OpenClaw gateway API
# Returns: bot_id, bot_secret, qr_code_url
pass
async def send_message(self, openid: str, message: str):
"""Send message to bound WeChat user."""
pass
async def handle_incoming_message(self, payload: dict) -> str:
"""Process incoming message from iLink gateway."""
# 1. Parse message payload
# 2. Find agent by openid mapping
# 3. Trigger agent execution
# 4. Return response
pass4. iLink Protocol Integration
Based on the protocol documentation:
# iLink API endpoints (Tencent Cloud IM gateway)
ILINK_API_BASE = "https://ilink.bot.weixin.qq.com"
# Key operations:
# 1. POST /bot/create - Create bot instance
# 2. POST /bot/bind_qr - Generate binding QR code
# 3. POST /message/send - Send message to user
# 4. Webhook callback - Receive messages from users5. Frontend Integration
Add WeChat iLink option to channel configuration UI:
// frontend/src/pages/AgentDetail.tsx (Channel Config section)
const CHANNEL_TYPES = [
{ value: 'feishu', label: 'Feishu', icon: '📎' },
{ value: 'wecom', label: 'WeCom', icon: '💼' },
{ value: 'wechat_ilink', label: 'WeChat (Personal)', icon: '💬' }, // NEW
// ...
];
// WeChat iLink config component
function WeChatILinkConfig({ agentId }) {
const [qrCode, setQrCode] = useState(null);
const [bound, setBound] = useState(false);
const generateQR = async () => {
const res = await fetch(`/api/agents/${agentId}/wechat-ilink/bind`, { method: 'POST' });
const data = await res.json();
setQrCode(data.qr_code_url);
};
return (
<div>
{bound ? (
<div>✅ WeChat account bound</div>
) : (
<div>
<button onClick={generateQR}>Generate Binding QR Code</button>
{qrCode && <img src={qrCode} alt="Scan to bind WeChat" />}
</div>
)}
</div>
);
}Implementation Plan
Phase 1: Core Integration (2-3 weeks)
| Task | Description |
|---|---|
| Database migration | Add wechat_ilink channel type and fields |
| API endpoints | Binding QR code, callback, status check |
| Service layer | iLink protocol implementation |
| Basic testing | Message send/receive |
Phase 2: Production Hardening (1-2 weeks)
| Task | Description |
|---|---|
| Error handling | Network failures, rate limits |
| Security | Signature verification, payload validation |
| Monitoring | Connection status, message metrics |
| Documentation | Setup guide, API reference |
Phase 3: UX Enhancement (1 week)
| Task | Description |
|---|---|
| Frontend UI | Binding flow, status display |
| Admin panel | Bulk provisioning, status overview |
| User guide | Step-by-step onboarding docs |
Addressing Potential Concerns
"We already support WeCom, why add WeChat?"
WeCom ≠ Personal WeChat
| Aspect | WeCom (企业微信) | WeChat iLink (个人微信) |
|---|---|---|
| Target User | Enterprise employees | Any WeChat user |
| Setup | Enterprise verification | No verification needed |
| Use Case | B2B internal | B2C personal assistant |
| Binding | Admin-controlled | User-controlled (QR scan) |
They serve different use cases and different user segments.
"Is this an official API or a hack?"
Official. Tencent released the iLink Bot API in 2026 through the OpenClaw plugin (@tencent-weixin/openclaw-weixin). This is:
- Published by Tencent's official npm organization
- Hosted on Tencent Cloud infrastructure
- Covered by Tencent's terms of service
"What about rate limits?"
The iLink API includes built-in message quota management. For enterprise deployments:
- Quotas scale with Tencent Cloud IM plan
- Sufficient for typical personal assistant workloads
- Can be upgraded for high-volume scenarios
"Does this compete with Feishu integration?"
No. They complement each other:
| Scenario | Recommended Channel |
|---|---|
| Enterprise collaboration | Feishu/WeCom |
| Personal digital employee | WeChat iLink |
| Customer-facing bot | WeChat iLink |
| Team workspace | Slack/Discord |
Success Metrics
| Metric | Target |
|---|---|
| Binding success rate | > 95% |
| Message delivery latency | < 2s |
| Setup time (per bot) | < 30 seconds |
| User satisfaction | > 4.5/5 |
Conclusion
Integrating WeChat iLink as a channel type would:
- Enable scalable personal digital employees - No complex bot registration per user
- Simplify onboarding - Single QR code scan to bind
- Capture unique market position - First enterprise multi-agent platform with personal WeChat support
- Expand addressable market - Beyond enterprise to individual consumers
With 1.2+ billion WeChat users, this integration has the potential to dramatically expand Clawith's reach and establish it as the leading platform for personal AI assistants in China.
References: