npx skills add ...
npx skills add huaweicloud/huaweicloud-skills --skill huawei-cloud-flexus-l-deploy-jiuwenswarm
One-click deployment of JiuwenSwarm multi-Agent collaboration platform on Huawei Cloud Flexus L instances. Usage scenarios: When users need to quickly deploy JiuwenSwarm/JiuwenClaw on Huawei Cloud Flexus L instances, when they need to automatically create cloud instances and deploy AI Agent platforms, when they need to configure model APIs and message channels (Xiaoyi/Feishu/DingTalk). Automatically create instances, deploy applications via COC, configure models and message channels. Trigger keywords: JiuwenSwarm deployment, JiuwenClaw deployment, 九问Swarm部署, 九问Claw部署, 一键部署JiuwenSwarm, AI智能体平台部署, 部署九问Swarm, 部署九问Claw,云服务器部署AI平台.
npx skills add huaweicloud/huaweicloud-skills --skill huawei-cloud-flexus-l-deploy-jiuwenswarm
scripts directory have implemented all functions. Do not create additional py files.scripts directory.This skill provides a complete automated deployment solution for the JiuwenSwarm (JiuwenClaw) multi-Agent collaboration platform on Huawei Cloud Flexus L instances. It implements full-process automation from environment preparation to message channel configuration through phased scripts.
HUAWEICLOUD_SDK_SECURITY_TOKEN environment variable is set along with AK/SK, the skill will use temporary credentials for authentication.--break-system-packages when running pip on some newer Linux distributions.requests, huaweicloudsdkcore, huaweicloudsdkcochcloud) must be installed and available in PATH (used for IAM/RMS queries, see references/api-specs.md)Component Description:
hcloud RMS ListAllResources)English Examples:
This skill executes deployment in 7 phases. Each phase must complete before the next begins.
PYTHONIOENCODING=utf-8hcloud)hcloud IAM KeystoneListProjects)⚠️ Requires customer confirmation before execution!
--region parameter not provided, interactively prompt user to select a region from supported options--timeout) → Get instance_id, public_ip, ecs_instance_idjiuwenswarm service is running (systemctl is-active).env has FRONTEND_HOST=0.0.0.0curl localhost:5173 returns 200)http://{public_ip}:5173.env, update 4 core parameters, set permission 600config.yaml, update channel fields, set permission 644Query COC execution status by UUID. Supports single query, verbose output, wait-for-completion, and file loading. See references/verification-method.md for details.
| Status | Description |
|---|---|
| READY | Ready |
| PROCESSING | Running, waiting required |
| FINISHED | Completed successfully |
| ABNORMAL | Execution abnormal, failed |
| CANCELED | Canceled |
Credential configuration (choose one):
Option A — hcloud CLI config (recommended, no env vars needed):
Option B — Environment variables:
Before executing any cloud resource creation operations, explicit customer consent must be obtained!
| Operation | Confirmation Required |
|---|---|
| Create new Flexus L instance | Required |
| Deploy application on existing instance | Required |
| Modify cloud resource configuration | Required |
Confirmation Template:
| Parameter | Description | Default Value |
|---|---|---|
| --name | Instance name | jiuwenSwarm-{timestamp} |
| --flavor | Instance flavor (2c-4g-50g / 2c-4g-70g / 4c-8g-180g) | 2c-4g-50g |
--region | Region (cn-north-4/cn-east-3/cn-south-1/cn-southwest-2). If not specified, interactive selection will be shown. | (Interactive) |
--wait | Wait for creation completion (polls RMS every 30s for instance status) | False |
| --timeout | Maximum time to wait in seconds when --wait is used | 600 (10 minutes) |
| --confirm | Skip confirmation prompt | False |
| Parameter | Description | Default Value |
|---|---|---|
| --ip | Instance public IP | Required |
| --wait | Wait for deployment completion | True |
| --timeout | Timeout in seconds | 1800 |
| Parameter | Description |
|---|---|
| --api-base | Model API URL |
| --api-key | Model API key |
| --model-name | Model name |
| --model-provider | Model provider |
| --ip | Instance public IP |
| --interactive | Interactive configuration |
| Parameter | Description |
|---|---|
| --channel | Channel type (xiaoyi/feishu/dingtalk) |
| --ip | Instance public IP |
| --interactive | Interactive configuration |
| Parameter | Description | Default Value |
|---|---|---|
| --uuid, -u | COC execution UUID | Required |
| --from-file, -f | Read UUID from JSON file | - |
| --key, -k | UUID key name in JSON file | execute_uuid |
| --verbose, -v | Show detailed output | False |
| --wait, -w | Wait for task completion | False |
| --timeout, -t | Wait timeout in seconds | 1800 |
| --interval, -i | Polling interval in seconds | 60 |
Web UI access requires two conditions:
.env FRONTEND_HOST=0.0.0.0)The .env file at /root/.jiuwenswarm/config/.env must use the correct variable names:
| .env Variable | Purpose | Required Value |
|---|---|---|
FRONTEND_HOST | Frontend HTTP bind | 0.0.0.0 |
FRONTEND_PORT | Frontend HTTP port | 5173 |
WEB_HOST | WebChannel bind | 0.0.0.0 |
AGENT_SERVER_HOST | AgentServer bind | 0.0.0.0 |
GATEWAY_HOST | Gateway bind | 0.0.0.0 |
Access URL: http://<instance_public_ip>:5173
Security Warning: After opening the port, JiuwenSwarm Web interface will be accessible. Please evaluate security risks before enabling. It is recommended to open temporarily only when needed and close after use.
Credential priority: hcloud config file → environment variables.
Credentials are read from ~/.hcloud/config.json. If encryption is enabled (authEncrypt=true), the script automatically disables it to read plaintext values.
No environment variables needed — the script reads directly from the config file.
| Environment Variable | Description | Required |
|---|---|---|
HUAWEICLOUD_SDK_AK | Access Key (permanent or temporary) | Yes |
HUAWEICLOUD_SDK_SK | Secret Key (permanent or temporary) | Yes |
HUAWEICLOUD_SDK_SECURITY_TOKEN | Security Token (STS only) | No |
HUAWEICLOUD_REGION | Huawei Cloud Region (default: cn-north-4) | No |
Reference: https://support.huaweicloud.com/iam_faq/iam_01_0620.html
| Service | Endpoint | Purpose |
|---|---|---|
| Flexus L | https://hcss.{region}.myhuaweicloud.com/v1/light-instances | Create/query instances |
| IAM | KooCLI: hcloud IAM KeystoneListProjects --cli-region=<region> [--name=<region>] | Get Project ID / domain ID (global service, hcloud auto-resolves domain ID with valid credentials) |
| RMS | KooCLI: hcloud RMS ListAllResources --cli-region=cn-north-4 --cli-domain-id=<domain_id> [--region_id=<region>] [--type=hcss.l-instance] | Query resources (global service: always use unified cn-north-4 endpoint, filter by target region via region_id param) |
| COC | https://coc.myhuaweicloud.com/v1/job/scripts/{script_uuid} | Remote script execution (global service: SDK client always uses cn-north-4 endpoint, each target instance's region is carried in the request body) |
Supported Regions: cn-north-4 (North Beijing 4), cn-east-3 (East Shanghai 1), cn-south-1 (South Guangzhou), cn-southwest-2 (Southwest Guiyang 1)
System Image: Ubuntu 24.04 LTS
The following reference documents provide detailed information for this skill:
| Document | Description |
|---|---|
| references/api-specs.md | API specifications for Huawei Cloud services (Flexus L, IAM, RMS, COC) |
| references/iam-policies.md | IAM permission policies and policy JSON for deployment |
| references/deployment-checklist.md | Pre/post deployment checklist for all phases |
| references/verification-method.md | Verification methods and acceptance testing procedures |
| references/acceptance-criteria.md | Acceptance criteria and sign-off requirements |
| references/troubleshooting.md | Troubleshooting guide for common deployment issues |