ScriptsJul 27, 2026·3 min read

Wechaty — Conversational RPA SDK for Chatbot Makers

Open-source SDK for building chatbots across WeChat, WhatsApp, and other messaging platforms using a unified JavaScript/TypeScript API.

Agent ready

Safe staging for this asset

This asset is staged first. The copied prompt tells the agent to inspect the staged files and ask before activating scripts, MCP config, or global config.

Stage only · 29/100Policy: stage
Agent surface
Any MCP/CLI agent
Kind
Skill
Install
Stage only
Trust
Trust: Established
Entrypoint
Wechaty
Safe staging command
npx -y tokrepo@latest install 07f0e43e-89bf-11f1-9bc6-00163e2b0d79 --target codex

Stages files first; activation requires review of the staged README and plan.

Introduction

Wechaty is an open-source conversational RPA SDK that lets developers build chatbots for WeChat, WhatsApp, Gitter, Lark, and other messaging platforms through a single, unified API. It abstracts away the protocol-level details of each platform so you can focus on conversation logic rather than transport plumbing.

What Wechaty Does

  • Provides a universal chatbot API across 10+ messaging platforms
  • Handles contact management, room (group) operations, and friendship events
  • Supports sending and receiving text, images, files, links, and mini-programs
  • Offers a puppet architecture that swaps platform connectors without changing bot code
  • Ships SDKs in TypeScript, Python, Go, Java, .NET, PHP, and Scala

Architecture Overview

Wechaty follows a puppet-provider pattern. The core SDK defines a high-level Wechaty class that emits events (message, login, friendship, room-join). Under the hood, a Puppet abstraction delegates to a concrete PuppetProvider (e.g., PadLocal for iPad protocol, WhatsApp Web, or Gitter). Providers can run in-process or as a gRPC remote service, which means a Python bot can drive a TypeScript puppet over the network.

Self-Hosting & Configuration

  • Install via npm: npm install wechaty
  • Choose a puppet provider: WECHATY_PUPPET=wechaty-puppet-padlocal
  • Set the puppet token as an env var: WECHATY_TOKEN=your_token
  • For WhatsApp, use the free whatsapp-web puppet with no token required
  • Deploy as a Docker container for headless server-side bots

Key Features

  • Multi-platform: one codebase, many chat networks
  • Event-driven API with async/await support throughout
  • Polyglot SDKs sharing the same puppet service via gRPC
  • Plugin system for middleware such as QR-code generation, message filtering, and auto-reply
  • Active community with 200+ contributors and 100+ published plugins

Comparison with Similar Tools

  • Botpress — visual flow builder with broader NLU; Wechaty is code-first with wider IM coverage
  • Rasa — focuses on NLU/dialogue management; Wechaty focuses on platform connectivity
  • node-telegram-bot-api — Telegram-only; Wechaty covers multiple platforms in one SDK
  • whatsapp-web.js — WhatsApp-only reverse-engineered client; Wechaty wraps it as one puppet among many
  • Hubot — GitHub's classic bot framework; Wechaty provides richer IM-specific primitives

FAQ

Q: Is Wechaty free to use? A: The SDK itself is open-source under Apache-2.0. Some puppet providers (like PadLocal for WeChat) require a paid token, while others (WhatsApp Web) are free.

Q: Can I run a single bot on multiple platforms simultaneously? A: Yes. Instantiate multiple Wechaty instances with different puppet providers, and share your message handler logic across them.

Q: Which programming languages does Wechaty support? A: TypeScript/JavaScript is the primary SDK. Official polyglot SDKs exist for Python, Go, Java, .NET, PHP, Scala, and Rust, all communicating with puppets via gRPC.

Q: Does Wechaty work in China behind the GFW? A: Yes. WeChat puppets run domestically, and WhatsApp puppets can connect through standard proxies if needed.

Sources

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets