Interact with DataWorks Data Agent for conversational data analysis, session lifecycle management, and artifact download. Use this Skill when users want to chat with a Data Agent for data querying, create or resume Agent sessions, list session history, download analysis artifacts, check token usage, or cancel an active session.
Data & analysis
Alibabacloud Dms Data Agent Platform Setup
Try itCreate 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,...
What it does
Create 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.
The skill document
Create Dify Instance
Provision 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).
Prerequisites
1. Check Aliyun CLI
[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
2. Observability — Session ID & User-Agent
[REQUIRED] Generate a session-id at the start of every skill session. Use it consistently across ALL CLI commands and Python SDK calls.
Session-ID Generation Rule
- Generate once per session, reuse throughout the entire workflow
- Format: 32-character lowercase hex string (e.g.,
openssl rand -hex 16) - Must be consistent across CLI / SDK / Terraform within the same session
export SKILL_SESSION_ID=$(openssl rand -hex 16)
User-Agent Template
AlibabaCloud-Agent-Skills/alibabacloud-dms-data-agent-platform-setup/{session-id}
- Python scripts (
detect_dify_instance.py,openAPI_call.py): readSKILL_SESSION_IDfrom environment automatically - Aliyun CLI commands: inject via
--user-agentflag on each command:
aliyun dms-enterprise \
--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.
3. Configure Alibaba Cloud Credentials
[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:
- Query instance list (
aliyun dms-enterprise list-instances): uses Aliyun CLI credentials - Provision Dify instance (
openAPI_call.py): uses the Alibaba Cloud default credential chain
3a. Configure Aliyun CLI Credentials
aliyun 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:
- Obtain an AccessKey from the Alibaba Cloud Console
- Configure credentials outside of this session to avoid exposing secrets:
aliyun configure set \ --mode AK \ --access-key-id \ --access-key-secret \ --region cn-hangzhou - Re-run
aliyun configure listto confirm the profile is active
3b. Configure Python Script Credentials
openAPI_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.
4. Python Environment
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/.
Script Location
./scripts/detect_dify_instance.py— Check whether the DMS Dify service is available in the target region./scripts/openAPI_call.py— Provision a Dify instance
Run commands from the directory containing this
SKILL.mdfile.
Pre-check: Verify DMS Service Availability
[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
Example:
.venv/bin/python ./scripts/detect_dify_instance.py cn-shanghai
- If the API returns an empty list (
[]), that is normal — it means no Dify instances exist yet, but the service is available. - If the API returns an error, prompt the user to enable the DMS service in the Alibaba Cloud Console before proceeding.
Simple Mode
All components (Workspace, database, KV store, vector database) are newly created.
Parameters to Collect from User
| 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 |
Execution Command
.venv/bin/python ./scripts/openAPI_call.py '{
"VpcId": "",
"VSwitchId": "",
"BackupVSwitchId": "",
"SecurityGroupId": "",
"ZoneId": "",
"DataRegion": "",
"ResourceQuota": "12CU",
"WorkspaceOption": "CreateNewInstance",
"WorkspaceName": "",
"DatabaseOption": "CreateNewInstance",
"DbInstanceAccount": "",
"DbInstancePassword": "",
"KvStoreOption": "CreateNewInstance",
"KvStoreAccount": "",
"KvStorePassword": "",
"VectordbOption": "CreateNewInstance",
"VectordbAccount": "",
"VectordbPassword": "",
"StorageType": "cloud_essd",
"NatGatewayOption": "NoNeed",
"MajorVersion": "1.13.x",
"Edition": "OpenCommunity",
"DryRun": true
}'
Advanced Mode
Allows fine-grained control over all parameters, including using existing Workspace, database, KV store, and vector database instances.
Step 1: Collect Base Network Parameters
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 |
Step 2: Confirm WorkspaceOption
Ask the user: use an existing Workspace or create a new one?
UseExistingInstance: user must provideWorkspaceId(string)CreateNewInstance: user must provideWorkspaceName- Note:
WorkspaceIdandWorkspaceNameare mutually exclusive. If both are provided, prompt the user to correct the input.
Step 3: Confirm Each Sub-Service Option Individually
Ask the user to choose for each of the following independently:
DatabaseOption
CreateNewInstance: no additional parameters needed; uses default configurationUseExistingInstance:- Ask the user if they know the
DbResourceId(integer) - If not, run the following command and find the
InstanceIdfromInstanceList.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}"
- Ask the user if they know the
KvStoreOption
CreateNewInstance: no additional parameters neededUseExistingInstance:- Ask the user if they know the
KvStoreResourceId(integer) - If not, run:
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 if they know the
VectordbOption
CreateNewInstance: no additional parameters neededUseExistingInstance:- Ask the user if they know the
VectordbResourceId(integer) - If not, run:
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 if they know the
Step 4: Collect Account and Password
Ask the user for account name and password, and fill in:
DbInstanceAccount/DbInstancePasswordKvStoreAccount/KvStorePasswordVectordbAccount/VectordbPassword
Step 5: Confirm Other Advanced Parameters
The 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 |
Step 6: Dry Run and Final Provisioning
- Construct the full JSON with
DryRun=trueand run the script - After confirming no errors, set
DryRuntofalseand run again to provision
Notes
- The Python script uses the Alibaba Cloud default credential chain; configure credentials per the official guide before running the script
WorkspaceId(use existing Workspace) andWorkspaceName(create new Workspace) are mutually exclusiveDbResourceId,KvStoreResourceId, andVectordbResourceIdare all integer types- Always perform a dry run with
DryRun=truebefore final provisioning - Ensure
SKILL_SESSION_IDis exported before running any command in this workflow
Related skills
Connect a cloud or sandbox Agent to Alibaba Cloud Agent Data Gateway (Dgate) through its managed MCP service, or install/reinstall the Dgate CLI and its local Agent Skill/Rule bundle on macOS, Linux, or Windows. Use when the user asks to configure a Region-bound Dgate MCP endpoint and AccessToken, set up Dgate without installing a binary, install the dgate command, refresh the bundled dgate-cli skills, or verify either access path.
Operate Alibaba Cloud AgentLoop Dataset resources with aliyun CLI and the AgentLoop API version 2026-05-20. Use when requests concern AgentLoop datasets, dat...
The skill should be used when the user asks about Alibaba Cloud AgentLoop platform for onboarding applications into observability, managing Datasets, building pipelines, and evaluating.
Alibaba Cloud OOS ChatOps Agent for natural-language cloud resource management and O&M operations. Supports querying ECS/RDS/VPC/SLB resources, executing ope...
Query and manage Alibaba Cloud RDS instances in the user's own account through Alibaba Cloud CLI and official RDS, VPC, BssOpenApi, and DAS OpenAPIs. Use for listing or inspecting RDS instances, zones, classes, performance, logs, parameters, databases, accounts, networks, whitelists, bills, and SQL insight statistics, or for explicitly requested instance creation, parameter/specification/description changes, account creation, whitelist changes, public endpoint allocation, whitelist-template attachment, tagging, restart, and instance deletion. Do not use this skill to diagnose incidents, troubleshoot performance anomalies, or perform root-cause analysis; it only queries current RDS instance state and executes the explicitly supported instance-management operations.