HEHANG / KNOWLEDGE
Weixin-AI-DeepSeek-Bridge
Self-hosted WeChat AI assistant with OpenClaw, DeepSeek, and a full admin console. 基于 OpenClaw 和 DeepSeek 的自托管微信 AI 助手,内置模型、人设、技能、服务和日志管理后台。
仓库 README 快照,完整保留原文;功能和版本以仓库为准。Repository README snapshot. Check the repository for current versions and behavior.
GitHub ↗ · JavaScript
Weixin AI DeepSeek Bridge
This project runs a DeepSeek chat bridge for Tencent Weixin AI / OpenClaw. It also includes an admin console for model settings, persona files, skills, services, and logs.
Features
- POST /chat: simple chat API for local tests.
- POST /v1/chat/completions: OpenAI-compatible chat API.
- GET /v1/models: returns the current configured model.
- Supports stream=true.
- Uses OPENCLAW_PROXY_KEY to protect public bridge APIs.
- Includes /admin management console.
- No runtime npm dependencies are required.
Environment
Copy the example file:
cp .env.example .env
chmod 600 .envImportant values:
DEEPSEEK_API_KEY=sk-your-key
DEEPSEEK_BASE_URL=https://api.deepseek.com
DEEPSEEK_MODEL=deepseek-v4-pro
OPENCLAW_PROXY_KEY=change-this-random-token
ADMIN_TOKEN=change-this-admin-token
OPENCLAW_HOME=/root/.openclawDo not commit real API keys.
Start Locally
node src/server.jsOpen:
http://127.0.0.1:8787
http://127.0.0.1:8787/adminCLI test:
node src/cli.js --once "hello"OpenAI-compatible test:
curl http://127.0.0.1:8787/v1/chat/completions \
-H "Authorization: Bearer $OPENCLAW_PROXY_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek-v4-pro","messages":[{"role":"user","content":"hello"}]}'CentOS 7.9 Install
Run from the project directory:
sudo bash scripts/install-centos7.shThe script installs a CentOS 7 compatible Node.js build, copies the app to /opt/weixin-ai-deepseek, creates a systemd service, and tries to install the Weixin OpenClaw plugin.
After editing /opt/weixin-ai-deepseek/.env, restart:
sudo systemctl restart weixin-ai-deepseek
curl http://127.0.0.1:8787/healthAdmin Console
Default integrated URL:
http://SERVER_IP:8787/adminIf running the admin console in /root/ai-cmd on port 8790:
http://SERVER_IP:8790/adminEnable the admin service:
cd /opt/weixin-ai-deepseek
bash scripts/install-admin-service.shView the admin token:
grep '^ADMIN_TOKEN=' /opt/weixin-ai-deepseek/.envAdmin features:
- View bridge and OpenClaw Gateway status.
- Change DeepSeek model, temperature, max tokens, and timeout.
- Update DeepSeek API key, proxy key, and admin token.
- Edit OpenClaw workspace persona files.
- Create, edit, enable, disable, and delete local skills.
- Run limited OpenClaw skills commands: list, search, verify, install.
- Edit /root/.openclaw/openclaw.json and detected model fields.
- Restart weixin-ai-deepseek and openclaw-gateway.
- Read journal logs.
Use HTTPS and a strong ADMIN_TOKEN before exposing /admin to the public internet.
Weixin Plugin
Install or update:
npx -y @tencent-weixin/openclaw-weixin-cli@latest installOpenAI-compatible config:
Provider: OpenAI Compatible
Base URL: http://127.0.0.1:8787/v1
API Key: OPENCLAW_PROXY_KEY from .env
Model: deepseek-v4-proUseful Commands
sudo systemctl restart weixin-ai-deepseek
sudo systemctl restart openclaw-gateway
sudo journalctl -u weixin-ai-deepseek -f
sudo journalctl -u openclaw-gateway -f
bash scripts/install-openclaw-weixin.sh
bash scripts/test-local.sh