What is wx-bot?
wx-bot is a self-hosted bridge for connecting WeChat to a personal AI agent such as Grok or Muse. It receives WeChat messages through Tencent’s ClawBot/iLink service, stores them in a local inbox, and delivers them to an agent by webhook or pull; the agent can send replies back through wx-bot. It runs on Linux and macOS and works with the WeChat account scanned at login, rather than supporting messages from friends.
wx-bot Features:
Message Handling: Receive text, images, voice with transcription, files, and video as events that include sender details and local media paths.
Delivery Modes: Send incoming events to an agent using a webhook, or let the agent collect them from the inbox with pull and acknowledge each event.
Local Inbox: Save messages to a local SQLite inbox before confirming receipt, and automatically retry delivery when an attempt fails.
Agent Replies: Send text, images, files, or video from the connected agent to a WeChat recipient using the command-line interface.
Local Network: Use outbound connections only and keep the local API bound to loopback rather than opening an external port.
Service Operations: Check service health and status, inspect chat logs when enabled, requeue abandoned messages, and update or roll back the installation.
wx-bot Benefits:
Fewer Lost Messages: Persisting events before confirmation and retrying failed delivery helps keep conversations available when an agent is temporarily unreachable.
Flexible Handoffs: Choose a push or pull workflow to fit how the agent receives work, without changing the WeChat conversation itself.
Clearer Troubleshooting: Health checks, status information, and optional chat history help narrow down where a message handoff or login has stopped working.
More Controlled Exposure: Keeping the API on loopback and using outbound-only networking avoids the need to expose a local service to incoming internet traffic.
One Place to Reply: Sending replies through the same bridge lets an agent continue a WeChat exchange without switching to a separate manual sending process.
Use Cases:
Personal Agent Inbox: Connect a personal agent to a single WeChat account so it can receive messages and return replies in that conversation.
Voice Message Processing: Pass WeChat voice messages and their transcriptions to an agent for handling alongside the rest of the conversation.
Media-Based Requests: Send an agent a WeChat message containing an image, file, or video when the request depends on that media.
Webhook Integration: Forward new WeChat events to an agent endpoint when the agent is set up to accept incoming webhook requests.
Pull-Based Workflows: Let an agent periodically claim inbox events, process them, and acknowledge each one after completing the work.

