Personal WeChat via Wisdom
Use the user's self-hosted Wisdom service to operate their personal WeChat
account. Wisdom runs on a Windows host with WeChat Desktop logged in and exposes
an HTTP API.
Credentials are injected by the
BYOC connector:
- — Wisdom server base URL, e.g.
http://82.156.126.14:8000
.
- — Wisdom . Secret — never echo, print, or log it.
The helper sends the token as
Authorization: Bearer ...
; it never puts the
token in the URL. For queued UI operations such as search and send, the helper
submits the task and waits for
before printing the final
result.
This is the user's real personal WeChat account. Read operations can run
directly. Sending messages or files must be dry-run first, then performed only
after the user explicitly approves the exact target and content.
CLI
The skill ships a stdlib-only helper:
bash
WX=$SKILL_DIR/scripts/personal_wechat.py
Verify Connection First
Always start with status when the user asks to use WeChat:
Expected healthy shape:
json
{"auth":{"logged_in":true,"wechat_running":true,"page":"logged_in"}}
If
, tell the user to open the Wisdom web UI / RDP and scan the
WeChat QR code. If the API returns 401, ask the user to reconnect the Personal
WeChat connector with the current Wisdom API token.
Read Workflows
Current Account
Contacts
bash
python3 $WX contacts --limit 50
Recent Conversations
Use the normal conversations endpoint first; it prefers WeChat DB when ready and
falls back to Wisdom's app DB.
bash
python3 $WX conversations --limit 20
For decrypted local WeChat history sessions:
bash
python3 $WX conversations --history --limit 20
Messages in a Conversation
First list conversations, then use the
as
:
bash
python3 $WX messages "34642176898@chatroom" --limit 50 --order asc
Historical Messages
Read from Wisdom's decrypted WeChat local databases:
bash
python3 $WX history --limit 50
python3 $WX history --talker "34642176898@chatroom" --limit 50
python3 $WX history --limit 20 --offset 20
Raw SQL, Read-Only Only
Wisdom permits only
and
:
bash
python3 $WX sql MicroMsg.db 'SELECT count(*) AS cnt FROM Session'
Use raw SQL only for diagnostics or targeted metadata queries. Do not dump large
message tables unless the user explicitly asks.
Refresh History DB
If history looks stale, refresh the decrypted DB snapshot:
bash
python3 $WX refresh-history
Search
bash
python3 $WX search "Alice"
Search drives the WeChat UI, so it may be slower than local DB history reads.
Sending Messages — GATED
dry-runs by default. It never sends unless
is present, or
unless an AceDataCloud scheduled task pre-authorized this Skill and you use
.
bash
python3 $WX send "Alice" "今晚 8 点开会吗?"
# -> {"dry_run": true, ...}
Show the dry-run output to the user and ask for explicit approval of the exact
recipient and text. Only then run:
bash
python3 $WX send "Alice" "今晚 8 点开会吗?" --confirm
Never add
in the first attempt. Never infer consent from vague text.
The user must clearly approve sending this exact message.
Scheduled-task unattended confirmation
When running inside an AceDataCloud scheduled task, the platform may pre-authorize
specific Skills for unattended execution. If all of these are true:
AICHAT_UNATTENDED_MODE=true
- is or
acedatacloud/personal-wechat
- appears in
AICHAT_UNATTENDED_ALLOWED_SKILLS
then the user has pre-authorized this Skill for that scheduled task. In that
case, use:
bash
python3 $WX send "Alice" "今晚 8 点开会吗?" --unattended-confirm
If the helper returns
unattended_confirmation_denied
, do not retry with
; report the dry-run and explain that the task needs this Skill to be
selected in its unattended authorization settings.
Safety Rules
- Never print .
- Treat
PERSONALWECHAT_BASE_URL + API_TOKEN
as full remote control of the user's WeChat.
- For normal chat write/send operations: dry-run first, ask for explicit approval, then re-run with .
- For scheduled-task unattended writes: use only when the platform env says this Skill is pre-authorized.
- Do not call logout/restart endpoints from the skill unless the user explicitly asks to repair the Wisdom service.
- If Wisdom returns 503 for history, run
python3 $WX refresh-history
once, then retry the read.
- If the server is unreachable, ask the user to check the Windows host / security group / port 8000.
Endpoint Mapping
The helper wraps these Wisdom endpoints:
GET /api/contacts?version=2.0
GET /api/conversations/history
GET /api/messages/history
POST /api/messages/history/query
POST /api/messages/history/refresh
- (only after or verified )