wechat agent gateway install

    by 郭苏锐

    1

    Install and verify a Python gateway to route WeChat messages to local AI agents like Claude Code or Hermes.

    Free

    Security scanned

    Works with the AI Agents you already use

    wechat agent gateway install

    Example session with this skill installed

    Set up a WeChat gateway for Claude Code at ~/wechat-bot and verify it with the offline demo. The command for the agent is 'claude -p {text}'.

    • Read your context and instructions
    • Compiled the wechat agent gateway

    I have successfully initialized the WeChat agent gateway. I cloned the repository, verified the environment, and prepared the configuration for Claude Code.

    WeChat Gateway Installation Summary

    ComponentStatusDetails
    WorkspaceCreated~/wechat-bot
    Doctor CheckPassedPython 3.9+, Git, Ports 18500/18600 available
    Offline DemoVerifiedvirtual_loop_demo.py completed exit code 0
    Agent ConfigReadyMode: exec, Command: claude -p {text}
    SecurityConfigureddata/ directory permissions set to 0600

    Generated gateway.json

    {
      "default_agent": "claude",
      "agents": {
        "claude": {
          "type": "exec",
          "label": "Claude Code",
          "prefix": "c",
          "command": ["claude", "-p", "{text}"],
          "timeout": 900
        }
      },
      "virtual": {"enabled": false}
    }
    

    Agent Startup Command

    python3 -m agent_gateway --config gateway.json
    

    Next steps

    1. Run python3 login.py in the project root and scan the QR code with your WeChat bot account.
    2. Start the gateway using the command provided above.
    3. Send the message 保活 to your bot in WeChat to confirm the gateway is routing messages.
    Generated gateway.json

    Connects securely to your tools. The creator never sees your data.

    About this skill

    WeChat connectivity is a persistent barrier for developers building local AI agents. Bridging a terminal-based agent like Claude Code or a custom CLI tool to a mobile WeChat client usually requires heavy dependencies, complex API registrations, or fragile web-scraping hacks.

    This skill automates the deployment of a dependency-free Python gateway that turns a WeChat bot identity into a routing layer for your local LLM agents. It handles the entire lifecycle from repository cloning and environment validation to binding your WeChat account and configuring message routing via standard I/O or HTTP long-polling.

    What it does

    • Gateway Deployment clones and sets up the zero-dependency Python gateway for macOS, Linux, or Windows.
    • Environment Validation executes a local doctor script to verify Python versions, port availability, and file permissions.
    • Offline Verification runs a virtual loop demo to confirm agent-to-gateway communication before connecting to WeChat.
    • Agent Orchestration configures message routing in two modes: exec for direct CLI execution or virtual for persistent, stateful agent sessions.
    • Identity Binding manages the WeChat bot authentication flow via QR code and secures the resulting credentials.
    • Diagnostic Troubleshooting provides a structured resolution path for session expiration, port conflicts, and message dispatch failures.

    How it works

    1. Initialize the workspace by cloning the repository to a local path and running the doctor.py script to ensure the environment is ready.
    2. Execute the offline smoke test using the virtual_loop_demo.py utility to prove the stack works without a network connection.
    3. Configure the routing logic in gateway.json by defining your agent's CLI command or setting up the virtual iLink server.
    4. Link the WeChat account by generating an authentication QR code and saving the session tokens locally.
    5. Launch the gateway and monitor the live console for incoming messages and agent responses.

    Frameworks & tools

    The gateway is built on Python 3.9+ using only the standard library. It integrates with any CLI-based agent including Claude Code and Hermes, and utilizes git for version management.

    Why this beats prompting it yourself

    Manual configuration often leads to session fragmentation where multiple processes conflict over the same WeChat bot identity. This skill enforces a strict verification sequence that prevents identity expiration errors and port collisions before they interrupt your workflow.

    Use cases

    • Mobile Agent Access to interact with your local development agents via a mobile WeChat client.
    • Long-lived Agent Sessions using the virtual mode to maintain context across multiple mobile interactions.
    • Headless Bot Hosting for running a self-hosted AI assistant on a home server or Raspberry Pi.
    • Multi-Agent Routing to dispatch messages to different CLI tools based on message prefixes.

    Known limitations

    Requires a WeChat bot identity compatible with the iLink protocol. Python 3.10+ is required for the full test suite, though the runtime works on 3.9. Status QR code display defaults to text-based URL unless a QR library is manually installed.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 10 days ago

    • Free with an Agensi account

    Accounts
    GitHub
    Software
    PythonGit

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Network Access

    Allowed Hosts

    github.com
    Listed10 days ago

    What's inside

    Frequently Asked Questions

    This skill automates the setup of a Python-based bridge that routes WeChat messages directly to your local AI agents (like Claude Code), allowing you to interact with powerful local LLMs from your mobile device without complex API overhead.

    It is compatible with any agent that can be triggered via a Command Line Interface (CLI), including Claude Code and Hermes, and supports both direct execution and stateful virtual sessions.

    No, the gateway is designed to be extremely lightweight and uses only the Python standard library, ensuring it runs efficiently on everything from high-end Macs to a Raspberry Pi.

    The skill includes a 'doctor' script for environment validation and an offline smoke test mode, allowing you to verify that your agent communication works perfectly before you ever link your WeChat account.

    You receive the complete deployment automation package, including the environment validation scripts, the routing configuration templates, and the identity binding tools needed to establish the WeChat-to-Agent link.

    The gateway supports a 'virtual' mode for persistent sessions and multi-agent routing, which allows you to dispatch messages to different local tools based on specific prefixes or keywords.

    New in Workflow Automation

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Workflow Automation.

    Free