Install
openclaw skills install @sdk-team/alibabacloud-dms-data-agent-platform-setupCreate an agent platform instance in DMS via Alibaba Cloud OpenAPI. Supports Simple Mode and Advanced Mode. Use this skill when the user wants to provision, deploy, or set up a new Dify instance on Alibaba Cloud DMS.
openclaw skills install @sdk-team/alibabacloud-dms-data-agent-platform-setupProvision a Dify instance automatically via Alibaba Cloud OpenAPI. Supports Simple Mode (create all resources from scratch) and Advanced Mode (fine-grained control over each component).
[REQUIRED] Verify Aliyun CLI version >= 3.3.1 before proceeding.
aliyun version
If the command is not found or the version is below 3.3.1, install or upgrade:
macOS (Homebrew, recommended)
brew install aliyun-cli
# Upgrade if already installed
brew upgrade aliyun-cli
After installation, enable automatic plugin installation:
aliyun configure set --auto-plugin-install true
[REQUIRED] Generate a session-id at the start of every skill session. Use it consistently across ALL CLI commands and Python SDK calls.
openssl rand -hex 16)export SKILL_SESSION_ID=$(openssl rand -hex 16)
AlibabaCloud-Agent-Skills/alibabacloud-dms-data-agent-platform-setup/{session-id}
detect_dify_instance.py, openAPI_call.py): read SKILL_SESSION_ID from environment automatically--user-agent flag on each command:aliyun dms-enterprise <action> \
--endpoint dms-enterprise.aliyuncs.com \
--user-agent "AlibabaCloud-Agent-Skills/alibabacloud-dms-data-agent-platform-setup/${SKILL_SESSION_ID}"
Do NOT use
aliyun configure ai-mode set-user-agent(deprecated). Always use per-command--user-agentinjection.
[REQUIRED] Both credential sets must be configured — Aliyun CLI credentials AND Python SDK credentials. Neither can be omitted. NEVER read, echo, or print AK/SK values.
This skill performs two types of operations, each using a different credential method:
aliyun dms-enterprise list-instances): uses Aliyun CLI credentialsopenAPI_call.py): uses the Alibaba Cloud default credential chainaliyun configure list
Confirm that a valid profile exists in the output (AK, STS, or OAuth).
If no valid profile exists, stop and prompt the user to:
aliyun configure set \
--mode AK \
--access-key-id <your-access-key-id> \
--access-key-secret <your-access-key-secret> \
--region cn-hangzhou
aliyun configure list to confirm the profile is activeopenAPI_call.py uses the Alibaba Cloud default credential chain — no environment variables need to be set manually. The SDK automatically resolves credentials in the following order: environment variables, credentials file, instance RAM role, etc.
Configure your credentials by following the official guide: Alibaba Cloud Python SDK v2 — Manage Access Credentials
NEVER hardcode AK/SK values in code or pass them as command-line arguments.
It is recommended to use uv to create an isolated virtual environment with pinned dependencies:
uv venv .venv
uv pip install --python .venv/bin/python -r scripts/requirements.txt
requirements.txt is provided in ./scripts/.
./scripts/detect_dify_instance.py — Check whether the DMS Dify service is available in the target region./scripts/openAPI_call.py — Provision a Dify instanceRun commands from the directory containing this
SKILL.mdfile.
[REQUIRED] Before running
openAPI_call.py, rundetect_dify_instance.pyto verify that the DMS service is accessible in the target region.
.venv/bin/python ./scripts/detect_dify_instance.py <region-id>
Example:
.venv/bin/python ./scripts/detect_dify_instance.py cn-shanghai
[]), that is normal — it means no Dify instances exist yet, but the service is available.All components (Workspace, database, KV store, vector database) are newly created.
| Parameter | Description |
|---|---|
VpcId | VPC ID |
VSwitchId | VSwitch ID |
BackupVSwitchId | Backup VSwitch ID |
SecurityGroupId | Security Group ID |
ZoneId | Availability Zone ID |
DataRegion | Data region |
WorkspaceName | Name for the new Workspace |
| Account | Database account (used for DbInstanceAccount, KvStoreAccount, VectordbAccount; default: dify_user) |
| Password | Database password (used for DbInstancePassword, KvStorePassword, VectordbPassword) |
DryRun | Recommended: set to true for a dry run first, then false to provision |
.venv/bin/python ./scripts/openAPI_call.py '{
"VpcId": "<VpcId>",
"VSwitchId": "<VSwitchId>",
"BackupVSwitchId": "<BackupVSwitchId>",
"SecurityGroupId": "<SecurityGroupId>",
"ZoneId": "<ZoneId>",
"DataRegion": "<DataRegion>",
"ResourceQuota": "12CU",
"WorkspaceOption": "CreateNewInstance",
"WorkspaceName": "<WorkspaceName>",
"DatabaseOption": "CreateNewInstance",
"DbInstanceAccount": "<account>",
"DbInstancePassword": "<password>",
"KvStoreOption": "CreateNewInstance",
"KvStoreAccount": "<account>",
"KvStorePassword": "<password>",
"VectordbOption": "CreateNewInstance",
"VectordbAccount": "<account>",
"VectordbPassword": "<password>",
"StorageType": "cloud_essd",
"NatGatewayOption": "NoNeed",
"MajorVersion": "1.13.x",
"Edition": "OpenCommunity",
"DryRun": true
}'
Allows fine-grained control over all parameters, including using existing Workspace, database, KV store, and vector database instances.
Ask the user for the following:
| Parameter | Description |
|---|---|
VpcId | VPC ID |
VSwitchId | VSwitch ID |
BackupVSwitchId | Backup VSwitch ID |
SecurityGroupId | Security Group ID |
ZoneId | Availability Zone ID |
DataRegion | Data region |
Ask the user: use an existing Workspace or create a new one?
UseExistingInstance: user must provide WorkspaceId (string)CreateNewInstance: user must provide WorkspaceNameWorkspaceId and WorkspaceName are mutually exclusive. If both are provided, prompt the user to correct the input.Ask the user to choose for each of the following independently:
CreateNewInstance: no additional parameters needed; uses default configurationUseExistingInstance:
DbResourceId (integer)InstanceId from InstanceList.Instance:
aliyun dms-enterprise list-instances \
--endpoint dms-enterprise.aliyuncs.com \
--user-agent "AlibabaCloud-Agent-Skills/alibabacloud-dms-data-agent-platform-setup/${SKILL_SESSION_ID}"
CreateNewInstance: no additional parameters neededUseExistingInstance:
KvStoreResourceId (integer)aliyun dms-enterprise list-instances \
--endpoint dms-enterprise.aliyuncs.com \
--user-agent "AlibabaCloud-Agent-Skills/alibabacloud-dms-data-agent-platform-setup/${SKILL_SESSION_ID}"
CreateNewInstance: no additional parameters neededUseExistingInstance:
VectordbResourceId (integer)aliyun dms-enterprise list-instances \
--endpoint dms-enterprise.aliyuncs.com \
--user-agent "AlibabaCloud-Agent-Skills/alibabacloud-dms-data-agent-platform-setup/${SKILL_SESSION_ID}"
Ask the user for account name and password, and fill in:
DbInstanceAccount / DbInstancePasswordKvStoreAccount / KvStorePasswordVectordbAccount / VectordbPasswordThe following parameters have default values. Ask the user if any need to be changed:
| Parameter | Default | Allowed Values |
|---|---|---|
ResourceQuota | 12CU | Custom string |
Replicas | 1 | Integer |
NatGatewayOption | NoNeed | NoNeed, Enable |
PayType | PrePaid | PrePaid, PostPaid |
PayPeriodType | Month | Month, Year |
PayPeriod | 1 | Integer |
MajorVersion | 1.13.x | Custom string |
Edition | OpenCommunity | OpenCommunity, Community, Enterprise |
EnableExtraEndpoint | true | true, false |
OnlyIntranet | false | true, false |
DryRun | true | Recommended: true for dry run first, then false to provision |
DryRun=true and run the scriptDryRun to false and run again to provisionWorkspaceId (use existing Workspace) and WorkspaceName (create new Workspace) are mutually exclusiveDbResourceId, KvStoreResourceId, and VectordbResourceId are all integer typesDryRun=true before final provisioningSKILL_SESSION_ID is exported before running any command in this workflow