🤖HermesBlog
Hermes Messaging Platforms · Part 18/9/2026

WeChat — AI in Everyone's App

WeChat — AI in Everyone's App — easy-to-understand guide based on official docs

Think of this as teaching your WeChat to talk to a super-smart assistant—except the assistant lives in the cloud, and you don’t need to build a single server to make it work.


What Is This All About?

Hermes Agent is an open-source AI agent framework. In plain English: it lets you connect your favorite messaging apps to AI tools that can answer questions, automate tasks, or even manage your calendar.

This guide focuses on WeChat—the personal messaging app billions of people use daily. With Hermes, you can make your WeChat chat with an AI bot, all through a simple QR code login. No complicated webhooks, no public IP address, no server setup.


What You Need Before Starting

  • A personal WeChat account (the one on your phone)
  • Python installed on your computer
  • A terminal (Command Prompt on Windows, Terminal on Mac/Linux)

That’s it. No paid API keys, no cloud hosting.


Step 1: Install the Required Packages

Open your terminal and run:

pip install aiohttp cryptography

If you installed Hermes with the “messaging” extra, you can also run:

cd ~/.hermes/hermes-agent && uv pip install -e ".[messaging]"

This just adds extra tools for showing the QR code nicely in your terminal.


Step 2: Run the Setup Wizard

The easiest way to connect your WeChat is through the built-in wizard:

hermes gateway setup

When asked, choose Weixin. The wizard will:

  1. Ask WeChat’s iLink Bot API for a QR code
  2. Show that QR code in your terminal (or give you a URL)
  3. Wait for you to scan it with your phone’s WeChat app
  4. Save your login credentials automatically

After you confirm the login on your phone, you’ll see:

WeChat connected successfully, account_id=your-account-id

Your account ID is saved for you.


Step 3: Set Up Your Environment Variables

Now you need to tell Hermes which account to use. Open your ~/.hermes/.env file and add:

WEIXIN_ACCOUNT_ID = your-account-id

You can also control who can talk to your bot:

WEIXIN_DM_POLICY = open
WEIXIN_ALLOWED_USERS = user_id_1,user_id_2
  • open means anyone can message the bot
  • allowed_users lets you restrict it to specific people

A Quick Reality Check (Important!)

This adapter connects to an iLink bot identity, not your personal WeChat account directly. That means:

  • The bot is a separate identity from your personal account
  • It works reliably for direct messages and small group chats
  • It’s not designed for mass broadcasting or spamming

So treat it like a helpful coworker, not a megaphone.


Your First Chat

Once everything is set up, start the gateway:

hermes gateway start

Then open WeChat on your phone, find the bot contact, and send a simple message like “Hello.” Within seconds, you should get a reply from your AI assistant.

From there, you can ask it to summarize news, draft emails, or even set reminders—all without leaving WeChat.


Summary and a Practical Tip

You now have a personal AI assistant living inside WeChat, connected through a free, open-source tool. The whole setup takes less than ten minutes and requires zero cloud infrastructure.

Practical tip: Start with a small group of friends or a test chat before inviting real contacts. This lets you learn how the bot behaves, adjust your permission settings, and avoid any awkward early mistakes. Once you’re comfortable, open the floodgates and let your WeChat do the talking.

📖 Official Docs

This article is based on the official Hermes Agent documentation:Official docs › user-guide/messaging/weixin