← 返回
未分类

Rokid AIUI 智能体开发

Specialized agent for developing AIUI applications. Invoke when writing AIUI code, needing API references for jsui/wx, debugging AIUI applications, or aligning AIUI visual design with this Skill's design guidelines.
Specialized agent for developing AIUI applications. Invoke when writing AIUI code, needing API references for jsui/wx, debugging AIUI applications, or aligning AIUI visual design with this Skill's design guidelines.
user_cd36c53d
未分类 community v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 9
下载
💾 0
安装
1
版本
#latest

概述

AIUI Agent Developer Guide

This guide provides independent and comprehensive context for AI agents developing AIUI applications. It includes project structure, SFC .ink support specifications, and standard API references, designed to help Large Language Models (LLMs) generate accurate AIUI pages and logic code.

1. Project Structure

A standard AIUI application project typically contains the following core files:

  • AGENTS.md: The agent manifest, defining the agent's identity and capabilities.
  • app.json: Global configuration, including page routes, window settings, etc.
  • app.js: Application lifecycle and global logic.
  • pages/: Page directory containing the application's pages, primarily using the Single File Component (SFC) .ink format.
  • assets/: Directory for storing static resources like images and audio.

1.1 Agent Manifest (AGENTS.md)

The manifest file defines the agent's basic information and required permissions/skills:

# Agent Manifest

## Identity
- **Name**: My AIUI Agent
- **Version**: 1.0.0
- **Description**: A brief application description.
- **Author**: Developer Name

## Capabilities
- **Permissions**:
  - camera
  - microphone
  - network
  - audio
- **Skills**:
  - weather-lookup

1.2 Global Configuration (app.json)

Defines application page paths and global UI styles:

{
  "pages": [
    "pages/index/index"
  ],
  "window": {
    "navigationBarTitleText": "My AIUI Agent",
    "viewport": {
      "width": "device-width"
    }
  }
}

1.3 Application Registration (app.js)

AIUI uses an ES module-based registration system, registering the application by exporting a default configuration object:

export default {
  onLaunch() {
    console.log('App Launch');
  },
  globalData: {
    userInfo: null
  }
};

1.4 Page Configuration (page.json)

In AIUI, each page acts as a Model Context Protocol (MCP) UI component. The configuration for each page is defined in its respective page.json (or within the