A skill is a capability encapsulation unit provided by the system for AI agents. Skills are declared through the skillProfiles tag in the module.json5 Configuration File. An app can query installed skill information through the APIs provided by skillManager, discovering and invoking AI agent capabilities on the device.
Since: 26.0.0
Skill configuration information, used to define the skill capabilities of an AI agent.
Since: 26.0.0
Model restriction: This API can be used only in the stage model.
Atomic service API: This API can be used in atomic services since API version 26.0.0.
System capability: SystemCapability.BundleManager.BundleFramework.Core
| Name | Type | Read-Only | Optional | Description |
|---|---|---|---|---|
| bundleName | string | Yes | No | Bundle name of the app to which the skill belongs. |
| moduleName | string | Yes | No | Name of the module to which the skill belongs. |
| skillName | string | Yes | No | Name of the skill. |
| skillType | SkillType | Yes | No | Type of the skill. |
| skillPath | string | Yes | No | Installation path of the skill. |
| abilityName | string | Yes | No | Name of the ability associated with the skill. |
| versionCode | number | Yes | No | Version number of the skill. |
| description | string | Yes | Yes | Description of the skill. When the app calls the skillManager API and the SkillInfoFlag passed in does not include GET_SKILL_INFO_WITH_DESCRIPTION, this field returns the default value undefined. Developers must check the validity of the value to prevent code exceptions. |
| srcEntries | Array<string> | Yes | Yes | List of code file paths that implement the skill. When the app calls the skillManager API and the SkillInfoFlag passed in does not include GET_SKILL_INFO_WITH_SRC_ENTRIES, this field returns the default value undefined. Developers must check the validity of the value to prevent code exceptions. |
| permissions | Array<string> | Yes | Yes | List of permissions required to call the skill. When the app calls the skillManager API and the SkillInfoFlag passed in does not include GET_SKILL_INFO_WITH_PERMISSIONS, this field returns the default value undefined. Developers must check the validity of the value to prevent code exceptions. |
| requestPermissions | Array<string> | Yes | Yes | Permissions requested by the module where the skill is located. When the app calls the skillManager API and the SkillInfoFlag passed in does not include GET_SKILL_INFO_WITH_REQUEST_PERMISSIONS, this field returns the default value undefined. Developers must check the validity of the value to prevent code exceptions. |
Enumerates the skill types.
Since: 26.0.0
Model restriction: This API can be used only in the stage model.
Atomic service API: This API can be used in atomic services since API version 26.0.0.
System capability: SystemCapability.BundleManager.BundleFramework.Core
| Name | Value | Description |
|---|---|---|
| APP_SKILL | 0 | App skill. |
| INDEPENDENT_SKILL | 1 | Independent skill. |