Mini Program AI Development Mode (Beta) Integration Guide

View Markdown

Last edited on 2026-09-09

The Mini Program AI Development Mode (hereinafter referred to as this mode) provides an intelligent operating environment and development framework. Developers can use this framework to abstract the functions of Mini Program into atomic interfaces and atomic components, which are then encapsulated into SKILLS for invocation by the Mini Program AI.

When a user initiates a conversation through the Mini Program AI, the AI analyzes the request using the Mini Program MCP protocol to select appropriate atomic interfaces and components. It processes the data and executes tasks accordingly, ultimately delivering the integrated results to the user.

Under this mode, users maintain the same login credentials as in the original Mini Program. Developers can share login credentials stored within Mini Program via the storage interface, or they can complete the login process using interfaces such as wx.login and wx.getPhoneNumber.

Important Notes:

This feature is currently in beta testing, and code review for the Mini Program AI Development Mode is not available yet. Further updates on when reviews will be available will be provided separately. Please do not incorporate code related to this mode into official releases for review to avoid delaying the release of stable versions.

Basic Concepts

1. Mini Program MCP

Mini Program MCP is a set of protocols designed to expose callable capabilities to Mini Program AI. Unlike standard MCP, Mini Program MCP is tailored to the characteristics of Mini Program development. Developers only need to provide a complete implementation of the SKILL as specified, and Mini Program AI will be able to properly reason through and execute the corresponding atomic interfaces, thereby fulfilling the user’s requirements.

2. Atomic Interface

The smallest execution unit in this mode, it encapsulates a single business function with standardized input parameters and output structures, running in an independent JS environment within the WeChat client.

3. Atomic Components

The visual representation unit of atomic interfaces, which renders the structured data returned by atomic interfaces into GUI cards for display within the conversation flow.

Debugging is not currently supported

4. Page Handoff

This is the implementation method for visually displaying atomic interfaces within Mini Program. The structured data returned by the atomic interfaces is passed to Mini Program and rendered on the page.

After a user sends a message, Mini Program AI generates text responses along with Mini Program “Account Card” responses based on atomic interfaces, knowledge bases, and other relevant content. By tapping on the Mini Program “Account Card,” users can be directed to the corresponding handoff page.

Developers are advised to configure appropriate handoff pages for atomic interfaces. The information provided for these pages can affect evaluation results, thereby impacting the performance of Mini Program AI calls.

5. SKILL

A comprehensive encapsulation of capabilities to complete tasks in specific scenarios. One ** Mini Program ** can encapsulate multiple SKILLs, with each SKILL comprising: a business description (SKILL.md), a declaration of the model’s callable capabilities (mcp.json), and implementations of atomic interfaces and atomic components.

Development Guide

Application for Activation

You can apply by selecting Development Mode as the integration mode in either the web version under “WeChat Public Platform - Basic Features - AI Capabilities” or in Mini Program “WeChat Developer Tool” under “Management - WeChat AI Management”.

Integration Methods

Developers can refer to the Integration Methods to abstract the functions of Mini Program into atomic interfaces and atomic components, which are then encapsulated as SKILL for invocation by the Mini Program AI.

Operation Mechanism

The operation mechanism of this mode involves interactions among the WeChat client runtime, the Mini Program AI backend, and third-party services. Specifically, atomic interfaces and atomic components operate in an independent execution environment within the WeChat client, which is distinct from the Mini Program runtime environment. For detailed information on the specific mechanism, please refer to Operation Mechanism.

Debugging Guide

For development and integration, developers need to download and install the WeChat Developer Tools (latest version of Nightly Electron Build). For detailed instructions on the development and debugging process, please refer to the Debugging Guide.

Best Practices

To properly encapsulate the SKILL so that Mini Program AI can accurately recognize user intents and deliver a better user experience, refer to Best Practices.

Component and API Support

The interface capabilities provided in this mode are generally consistent in usage with those in the Mini Program environment. Compared to the interfaces in the Mini Program environment, this mode introduces several exclusive APIs, while also supporting the vast majority of existing built-in components and APIs. For more details, please refer to Component and API Support.

Example Demo

We provide a sample demo that utilizes all available features. It can be opened using the WeChat Developer Tool for preview and testing.

Note: The appid in the demo code needs to be replaced with an appid that has applied for “Development Mode” under WeChat Public Platform > Basic Features > AI Capabilities.