Weixin Agent SDK

Normal
GitHub TypeScript MIT

Description

Weixin Agent SDK enables connecting any AI agent to WeChat (Weixin) bots, allowing quick integration of AI agents into WeChat official accounts or bots for intelligent conversation and automated services.

Key Features

  • Connect any AI backend to WeChat via a simple Agent interface, supporting text, image, audio, video, and file messages
  • Built-in ACP (Agent Client Protocol) adapter enables one-command integration with Claude Code, Codex, kimi-cli and more
  • Proactive message pushing allows Bot instances to send text, images, videos and files on schedule or on demand
  • Long-polling message reception requires no public server, with checkpoint resume and auto-reconnection on session expiry
  • Complete OpenAI example with multi-turn conversation and image input support, flexible model and API configuration via env vars
  • Built-in /echo and /toggle-debug slash commands for easy debugging and performance monitoring

Use Cases

💡 Integrate enterprise AI customer service systems into WeChat for intelligent conversation and automation
💡 Connect OpenAI/Claude large models via WeChat bot to build a personal AI assistant
💡 Use ACP protocol to connect Codex or Claude Code to WeChat for remote AI programming collaboration
💡 Automatically push reports, reminders, and notifications to WeChat users on schedule
💡 Build multimedia interactive Agents on WeChat with image recognition and speech-to-text support

Quick Start

Install: npm install weixin-agent-sdk. Login: pnpm run login. Implement the Agent interface's chat method, call login() to scan QR code, then start(agent) to begin the message loop. ACP integration: one command to connect Claude Code (npx weixin-acp claude-code) or Codex (npx weixin-acp codex).

Related Projects