Skip to content

What is agent-wechat?

agent-wechat is a programmable WeChat interface. It runs the WeChat desktop application inside a Docker container and exposes a REST + WebSocket API for controlling it — send and receive messages, list chats, download media, and more.

What you can do

  • Read chats, messages, and media (images, voice, files)
  • Send text messages, images, and files
  • Login via QR code displayed in your terminal or through your AI agent
  • Monitor for new messages in real-time

How you can use it

There are several ways to interact with agent-wechat:

MethodBest for
CLI (wx command)Quick local use, scripting, debugging
OpenClaw pluginAdding WeChat as a channel in OpenClaw
Wechaty puppetUsing existing Wechaty bots with WeChat
REST API directlyCustom integrations

Requirements

  • Docker (Colima on macOS, or Docker Desktop)
  • Node.js >= 22 (for the CLI)
  • Not compatible with serverless environments — the container requires ptrace capabilities (see Hosting Requirements)

Packages

PackageDescription
@agent-wechat/cliCLI for managing the container and interacting with WeChat
@agent-wechat/wechatOpenClaw plugin for AI agent integration
@agent-wechat/wechaty-puppetWechaty puppet implementation