corespeed-io/wechatbot

微信 iLink Bot SDK for OpenClaw/AI Agent

What it solves

WeChatBot provides a production-ready SDK to connect AI agents and bots to the WeChat iLink protocol. It simplifies the process of integrating LLM-powered assistants into WeChat, handling the complexities of authentication, session management, and message polling without requiring the developer to implement the protocol from scratch.

How it works

The project offers multi-language support (Node.js, Python, Go, and Rust) to allow developers to build bots using their preferred stack. It functions as a client that manages a connection to the protocol API, handling QR code login, credential persistence (so users don't have to scan again after restarts), and long-polling for incoming messages. It also includes a context token system for session persistence and AES-128-ECB encryption for secure communication.

Who it’s for

Developers building AI agents or automated assistants that need to operate within the WeChat ecosystem, particularly those targeting production environments where multi-tenant support (running multiple accounts in one process) is required.

Highlights

  • Multi-language SDKs: Native support for Node.js, Python, Go, and Rust.
  • Multi-tenant Architecture: Isolated bot instances allowing a single backend process to manage multiple WeChat accounts.
  • Session Persistence: Automatic credential storage and session recovery to avoid frequent re-logins.
  • Rich Media Support: Ability to send and receive images, files, audio, and video.
  • Developer Tooling: Includes a middleware pipeline (Node.js), a message builder API, and a pre-compiled Echo Bot for quick testing.