macOS WeChat Auto-Reply Agent
A fully offline macOS WeChat intelligent reply system: screen capture + OCR to monitor new messages, a local LLM to generate natural replies, and simulated keystrokes to send — plus a built-in WeChat UI reverse-engineering toolkit.
A fully offline macOS WeChat auto-reply Agent, along with supporting reverse-engineering work on the WeChat client.
Reply Agent
watcher monitors screen region changes → ocr identifies new messages → brain (local LLM) generates replies in a style that’s “natural, concise, and sounds like the user” → sender uses pyautogui to simulate keystrokes and send, with memory managing conversation context.
Two Layers
The project is split into an exploration layer (solving the core challenge of “how to read WeChat messages on macOS”: window detection, screenshots, UI structure dumping, protobuf parsing, and key extraction) and a product layer (wechat-agent-v1/ — the complete Agent system: main / watcher / ocr / brain / sender / memory).
Tech Stack
Python 3 + pyautogui + OpenCV + OCR + macOS Accessibility API + Ollama local model. macOS only, requiring Accessibility permissions.
Highlights
- Screenshot + OCR frame-diff detection to identify new messages; local LLM (Ollama Qwen3:8b) generates replies that are natural, concise, and in-character
- pyautogui simulates keyboard input and send; runs fully offline with no data leaving the machine
- Also delivers WeChat UI structure and protobuf reverse-engineering scripts, decoupled from the core Agent system