wong2/weixin-agent-sdk

微信Clawbot接入任意Agent

What it solves

This project provides a bridge between the WeChat messaging platform and AI agents. It allows developers to connect custom AI logic or existing Agent Client Protocol (ACP) agents to WeChat, enabling them to receive messages, process them with AI, and send automated replies or proactive notifications.

How it works

The SDK provides a simple Agent interface that developers implement to handle incoming messages. It manages the WeChat login process (via QR code), maintains a message loop, and handles the complexities of media downloading, decryption, and formatting. For existing agents, it includes an weixin-acp adapter that allows you to run ACP-compatible agents (like Claude Code or kimi-cli) directly in WeChat without writing custom code.

Who it’s for

This SDK is designed for developers building AI-powered WeChat bots who want to integrate LLMs or agentic workflows. It is suitable for those who need to manage multi-turn conversations, handle file/media attachments, or trigger proactive messages from background tasks.

Highlights

  • ACP Support: Connects to existing Agent Client Protocol agents (e.g., Claude Code, Codex) out of the box.
  • Media Handling: Automatically downloads, decrypts, and manages images, audio, video, and files.
  • Proactive Messaging: Allows bots to send messages independently of user input via a Bot instance.
  • Flexible Formatting: Supports both plain text and Markdown output, with configurable hooks to intercept or modify messages before they are sent.
  • Robust Infrastructure: Includes built-in SQLite caching for message references, automatic reconnection, and long-polling for message updates.

Related

  • Project
  • Project
  • Project
  • Project