Skip to content

Deploy AI Agent on WeChat for Less Than 1 Yuan Per Day with DeepSeek

Problem

I wanted to run an AI agent on WeChat, but every solution I found had the same problem: too expensive.

Here’s what traditional deployment costs:

traditional-costs.txt
Cloud server (minimal): 50-200 RMB/month
API costs (GPT-4): 100-500 RMB/month (varies by usage)
Webhook/proxy service: 20-50 RMB/month
Domain + SSL: 10-30 RMB/month
-----------------------------------------
Total: 180-780 RMB/month

For a personal AI assistant or small business chatbot, this is prohibitive. I needed something cheaper.

Solution

I found a combination that costs less than 1 RMB per day: MMClaw + DeepSeek API.

mmclaw-deepseek-costs.txt
DeepSeek API: <1 RMB/day (~30 RMB/month)
Server: 0 RMB (client-side connection)
Domain/SSL: 0 RMB (QR code authentication)
MMClaw: 0 RMB (free and open source)
-----------------------------------------
Total: ~30 RMB/month

The secret is MMClaw’s architecture. Unlike traditional WeChat bots that require a server with public IP and webhook endpoints, MMClaw connects from your local machine using QR code authentication. No server, no domain, no SSL certificate needed.

Why DeepSeek for Cost

DeepSeek offers the most competitive pricing for Chinese language AI models:

deepseek-pricing.txt
Model: DeepSeek-V3
Input: 0.5 RMB per million tokens
Output: 2 RMB per million tokens
Model: DeepSeek-Chat
Input: 1 RMB per million tokens
Output: 2 RMB per million tokens

For comparison, here’s how other providers stack up:

provider-comparison.txt
Provider Input (RMB/1M) Output (RMB/1M)
DeepSeek-V3 0.5 2.0
DeepSeek-Chat 1.0 2.0
GPT-4-Turbo 70 210
GPT-3.5-Turbo 3.5 7.0
Claude-3-Sonnet 21 105

DeepSeek is 35-100x cheaper than GPT-4 for Chinese language tasks. The quality is excellent for Chinese conversations, code assistance, and general Q&A.

Setting Up DeepSeek API

First, I got my API key from DeepSeek:

setup-deepseek.sh
# 1. Go to platform.deepseek.com
# 2. Create account and verify
# 3. Generate API key at /api_keys
# 4. Set environment variable
export DEEPSEEK_API_KEY="sk-xxxxxxxxxxxxxxxx"

The API is compatible with OpenAI’s format, so integration is straightforward:

deepseek-client.py
from openai import OpenAI
client = OpenAI(
api_key="sk-xxxxxxxxxxxxxxxx",
base_url="https://api.deepseek.com"
)
response = client.chat.completions.create(
model="deepseek-chat",
messages=[
{"role": "user", "content": "Hello, how are you?"}
]
)
print(response.choices[0].message.content)

Setting Up MMClaw for WeChat

MMClaw is a Python package that handles WeChat integration without server infrastructure:

install-mmclaw.sh
pip install mmclaw
# Initialize configuration
mmclaw init

The configuration is minimal:

mmclaw-config.py
from mmclaw import WeChatAgent
agent = WeChatAgent(
model="deepseek-chat",
api_key="sk-xxxxxxxxxxxxxxxx",
api_base="https://api.deepseek.com"
)
# This will display a QR code for WeChat login
agent.start()

When I ran this, MMClaw displayed a QR code in my terminal:

login-output.txt
$ python mmclaw-config.py
Scan QR code with WeChat to login:
████████████████████████
████████████████████████
████████████████████████
████████████████████████
████████████████████████
Waiting for scan...

After scanning with WeChat, the bot was connected. No server deployment, no webhook configuration, no public IP required.

Daily Cost Breakdown

I tracked my usage for a typical day:

daily-usage.txt
Activity Tokens Used Cost (RMB)
----------------------------------------------------
Morning Q&A (20 messages) 15,000 0.03
Afternoon coding help 25,000 0.05
Evening chat (30 messages) 20,000 0.04
Document summarization 10,000 0.02
----------------------------------------------------
Total daily: 70,000 0.14 RMB

Even on heavy usage days with 100+ messages and complex tasks:

heavy-usage.txt
Activity Tokens Used Cost (RMB)
----------------------------------------------------
Full day coding session 200,000 0.40
Research and analysis 100,000 0.20
Regular conversations 50,000 0.10
----------------------------------------------------
Total heavy day: 350,000 0.70 RMB

The cost is “negligible” as the original plan stated. My monthly bill has never exceeded 30 RMB.

Why This Works

The key insight is that MMClaw uses a client-side connection model:

Traditional WeChat Bot Architecture:

traditional-architecture.txt
User Message -> WeChat Server -> Your Server (webhook) -> LLM API
|
Requires:
- Public IP
- Domain name
- SSL certificate
- 24/7 server running

MMClaw Architecture:

mmclaw-architecture.txt
User Message -> WeChat Server -> MMClaw (local) -> DeepSeek API
|
Requires:
- Python script running
- QR code login

The client-side connection eliminates all infrastructure costs. The trade-off is that your local machine needs to stay online, but that’s already true for development work.

Complete Setup Example

Here’s my complete setup that runs on my laptop:

wechat-ai-agent.py
import os
from mmclaw import WeChatAgent
from openai import OpenAI
class DeepSeekWeChatBot:
def __init__(self):
self.client = OpenAI(
api_key=os.getenv("DEEPSEEK_API_KEY"),
base_url="https://api.deepseek.com"
)
self.agent = WeChatAgent(
model="deepseek-chat",
on_message=self.handle_message
)
def handle_message(self, message):
"""Process incoming WeChat message"""
response = self.client.chat.completions.create(
model="deepseek-chat",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": message.content}
]
)
return response.choices[0].message.content
def start(self):
"""Start the bot"""
print("Starting WeChat AI Agent...")
print("Cost: <1 RMB/day for typical usage")
self.agent.start()
if __name__ == "__main__":
bot = DeepSeekWeChatBot()
bot.start()

Run it:

run-bot.sh
export DEEPSEEK_API_KEY="sk-xxxxxxxxxxxxxxxx"
python wechat-ai-agent.py
# Output:
# Starting WeChat AI Agent...
# Cost: <1 RMB/day for typical usage
# Scan QR code to login...
# Connected! Bot is now running.

Cost Monitoring

I added simple cost tracking to monitor daily usage:

cost-tracker.py
import json
from datetime import datetime
class CostTracker:
def __init__(self):
self.daily_costs = {}
self.RATE_INPUT = 0.5 / 1_000_000 # RMB per token
self.RATE_OUTPUT = 2.0 / 1_000_000 # RMB per token
def track(self, input_tokens: int, output_tokens: int):
today = datetime.now().strftime("%Y-%m-%d")
cost = (input_tokens * self.RATE_INPUT +
output_tokens * self.RATE_OUTPUT)
if today not in self.daily_costs:
self.daily_costs[today] = 0
self.daily_costs[today] += cost
# Alert if approaching 1 RMB
if self.daily_costs[today] > 0.8:
print(f"Warning: Daily cost at {self.daily_costs[today]:.2f} RMB")
def report(self):
for date, cost in sorted(self.daily_costs.items()):
print(f"{date}: {cost:.4f} RMB")
# Usage in the bot
tracker = CostTracker()
def handle_message_with_tracking(message):
response = client.chat.completions.create(...)
tracker.track(
response.usage.prompt_tokens,
response.usage.completion_tokens
)
return response.choices[0].message.content

After a week of usage:

weekly-report.txt
2026-03-18: 0.12 RMB
2026-03-19: 0.15 RMB
2026-03-20: 0.08 RMB
2026-03-21: 0.22 RMB (heavy usage day)
2026-03-22: 0.11 RMB
2026-03-23: 0.09 RMB
2026-03-24: 0.14 RMB
-------------------------
Weekly total: 0.91 RMB

Comparison: Traditional vs MMClaw + DeepSeek

full-comparison.txt
Traditional MMClaw + DeepSeek
---------- -----------------
Monthly server 50-200 RMB 0 RMB
Monthly API 100-500 RMB 20-40 RMB
Domain + SSL 10-30 RMB 0 RMB
Setup complexity High Low (pip install)
Maintenance 24/7 server Run script when needed
Chinese language Poor (GPT-4) Excellent (DeepSeek)
Total monthly 160-730 RMB 20-40 RMB

The savings are dramatic. For Chinese language AI assistance on WeChat, this combination is unbeatable.

When to Use This Setup

This setup works best for:

  • Personal AI assistants
  • Small business chatbots
  • Development and testing
  • Low to medium traffic scenarios

It’s not ideal for:

  • High-availability production systems (requires your machine to stay online)
  • High-traffic commercial bots
  • Scenarios requiring webhook integrations

For those cases, you’d need traditional server deployment, but costs would be higher.

Summary

In this post, I showed how to deploy an AI agent on WeChat for less than 1 RMB per day using MMClaw and DeepSeek.

The key point is that MMClaw’s client-side connection eliminates infrastructure costs (no server, no domain, no SSL), while DeepSeek’s pricing for Chinese language models is 35-100x cheaper than GPT-4.

For 30 RMB per month, you get a full-featured AI assistant on WeChat that handles Chinese conversations, coding help, and general Q&A with excellent quality. This is the most cost-effective solution I’ve found for personal AI agents in the Chinese market.

Final Words + More Resources

My intention with this article was to help others share my knowledge and experience. If you want to contact me, you can contact by email: Email me

Here are also the most important links from this article along with some further resources that will help you in this scope:

Oh, and if you found these resources useful, don’t forget to support me by starring the repo on GitHub!

Comments