The alibabacloud-agentloop-management Skill enables AI Agents such as Cursor, Claude Code, and QoderWork to onboard applications to AgentLoop observability through natural language. You describe your onboarding requirements in a conversation, and the AI Agent automatically orchestrates aliyun cms2 CLI commands to complete the full onboarding workflow.
After onboarding, you can view the following monitoring data in the console:
Server-side applications: APM data including application topology, API calls, abnormal transactions, and slow transactions
AI applications: AI observability metrics including LLM call latency, token usage, Agent traces, and tool calls
AI Agent onboarding is an intelligent wrapper around CLI and console onboarding. It uses the AgentLoop CLI (aliyun cms2) and standard probe solutions (such as ack-onepilot, AliyunJavaAgent, aliyun-bootstrap, instgo, and OpenTelemetry) under the hood. If your application is deployed in Container Service for Kubernetes (ACK) or Alibaba Cloud Container Compute Service (ACS), make sure the cluster has the ack-onepilot component installed and authorized. For more information, see Install the Java agent by using the ack-onepilot component.
AI Agents are powered by large language models and may have model hallucination risks such as incorrect command parameters or resource identification errors. Although the Skill has a built-in two-phase confirmation mechanism, carefully verify the commands and target resources generated by the Agent before approving execution. Onboarding operations may involve cluster component changes, application restarts, and other production-impacting changes. (Recommended) Complete onboarding verification and impact assessment in a test environment first, and confirm that the probe's impact on application performance and stability is acceptable before using it in a production environment.
Applicable scenarios
The AI Agent automatically selects the appropriate probe and onboarding path based on the application type:
Application type | Typical technology stack | Key metrics | Typical deployment environment |
Server-side applications | Java, Golang, Python, Node.js microservices | API QPS/RT, application topology, slow transactions | ACK/ACS, ECS |
AI applications | LangChain, DashScope, Dify, AgentScope | LLM calls, token usage, Agent traces | ACK/ACS, ECS |
How AI Agent onboarding works
The alibabacloud-agentloop-management Skill encapsulates the AgentLoop CLI (aliyun cms2) onboarding process into a structured workflow executable by AI Agents. Core capabilities include:
Natural language driven — Describe your onboarding requirements in one sentence without memorizing CLI commands and parameters.
Scenario-aware — Automatically selects the probe solution based on application type, language, and deployment environment (ECS, ACK/ACS).
Automated orchestration — Completes Workspace confirmation, APM initialization, credential retrieval, service registration, and probe configuration.
Safe and controllable — Executes two-phase confirmation for change operations such as Patch Deployment and startup parameter modifications. Executes only after user review.
The typical workflow is as follows:
You describe the onboarding requirements (Workspace, application type, language/framework, application name, and deployment environment). If a Workspace matching the
agentloop-{32-character code}format is not provided, the Agent proactively asks for it.The Agent checks the CLI environment and credentials, and initializes the APM infrastructure.
The Agent generates an execution plan showing commands, impact scope, and rollback methods.
After you confirm, the Agent performs probe injection or startup parameter changes.
The Agent verifies the onboarding results and guides you to view monitoring data in the console.
Prerequisites
Condition | Description |
Alibaba Cloud account | AgentLoop is activated, and you have management permissions for the target Workspace |
AgentLoop Workspace | Required. Format: |
Alibaba Cloud CLI | Version ≥ 3.3.15, with the |
CLI credentials | Access credentials configured through |
AI Agent | QoderWork, Cursor, Claude Code, or another tool that supports Agent Skills is installed |
K8s scenario | The ACK/ACS cluster has ack-onepilot (version ≥ 5.1.0) installed and ARMS resource authorization is complete |
ECS scenario | The target ECS instance can execute commands through Cloud Assistant or SSH |
In K8s scenarios, ack-onepilot onboarding involves installing or modifying cluster components. Adding Labels to target Deployments triggers Pod rolling restarts, which may affect running services or AI inference workloads.
Step 1: Install and configure the CLI environment
If you have not installed Alibaba Cloud CLI, see Install Alibaba Cloud CLI to complete the installation.
Verify that your CLI version is 3.3.15 or later and that the cms2 plugin is available:
# Verify CLI version >= 3.3.15
aliyun version
# Verify the cms2 plugin is available
aliyun cms2 --helpIf the cms2 command is not available, update the plugin:
aliyun plugin updateConfigure access credentials. If obtaining an AccessKey is inconvenient, we recommend using OAuth. For more information, see OAuth credentials. If you use an AccessKey, run the following command:
aliyun configure(Recommended) Use a RAM user with the necessary permissions for AgentLoop (cms2 API), ARMS, and Container Service. In K8s scenarios, managed clusters typically use ARMS Addon Token for password-free authorization. Dedicated clusters or ACS clusters may require configuring AK/SK in ack-onepilot. For details, see the authorization section in Install the Java agent by using the ack-onepilot component.
Step 2: Install the alibabacloud-agentloop-management Skill
Open the Skill marketplace page: alibabacloud-agentloop-management.
Follow the on-page instructions to install the Skill into Cursor, Claude Code, or QoderWork.
After installation, restart the AI assistant or confirm in the conversation that the Skill is loaded.
The following table lists natural language trigger examples:
Trigger keyword examples | Corresponding capability |
"Onboard Java application", "Spring Boot monitoring" | Java server-side application K8s/ECS onboarding |
"Golang probe onboarding", "instgo" | Golang application onboarding |
"LangChain onboarding", "LangGraph monitoring" | Python AI application K8s/ECS onboarding |
"DashScope application onboard AgentLoop" | Qwen SDK application onboarding |
"AI Agent monitoring", "LLM call monitoring" | AI observability metric collection |
"Dify onboard OpenTelemetry" | Dify OTel configuration guidance |
"ack-onepilot onboard APM" | K8s container non-intrusive probe injection |
"Install Java probe on ECS" | ECS AliyunJavaAgent onboarding |
Step 3: Initiate onboarding using natural language
When describing your onboarding requirements, include the following information. The Agent automatically detects or asks for any missing details.
Information | Required | Example |
AgentLoop Workspace | Yes |
|
Application type / language / framework | Yes | Java, LangChain, DashScope, Dify |
Application name | Yes |
|
Deployment environment | Yes | ACK cluster, ECS |
Cluster/instance information | Depends on scenario | Namespace/Deployment name, ECS instance ID |
Region | Optional | Provide separately, or automatically derived from cluster information |
Server-side application examples
Java application in K8s:
Onboard the order-service deployment in the default namespace of my ACK cluster to AgentLoop APM, language is Java, Workspace is agentloop-2694ecf8****************1f84542dJava application on ECS:
Help me onboard the Spring Boot application order-api on ECS instance i-bp1xxxxxxxxxx to APM monitoring, Workspace is agentloop-2694ecf8****************1f84542dGolang application in K8s:
Help me onboard the Golang microservice payment-service in my ACK cluster to AgentLoop application monitoring, Workspace is agentloop-2694ecf8****************1f84542dAI application examples
LangChain application in K8s:
Help me onboard the LangChain application customer-support-agent in my ACK cluster to AgentLoop monitoring, Workspace is agentloop-2694ecf8****************1f84542dDashScope application on ECS:
Help me onboard the DashScope conversational application qa-bot on ECS to AgentLoop AI observability monitoring, Workspace is agentloop-2694ecf8****************1f84542dDify self-hosted deployment:
My Dify is deployed on K8s, help me configure OpenTelemetry reporting to AgentLoop, Workspace is agentloop-2694ecf8****************1f84542dStep 4: Confirm the execution plan and complete onboarding
The AI Agent uses a two-phase confirmation protocol for all change operations:
Phase | Behavior |
Phase A (Plan) | Displays target resources, specific commands, impact scope, and rollback methods, then ends the current turn and waits for confirmation |
Phase B (Execute) | Executes only after explicit user approval (such as replying "yes" or "confirm") |
Read-only commands (get, list) and idempotent initializations (apm configuration create) do not require confirmation — the Agent executes them directly.
After you confirm, the Agent performs probe injection or startup parameter changes based on your deployment scenario. The Agent lists all planned changes and rollback steps in the execution plan before execution. For details about the typical commands the Agent runs for each scenario, see Onboarding execution reference: K8s (ACK/ACS).
After onboarding is complete, the Agent prompts you to wait 2–3 minutes and then check the monitoring data in the console.
Step 5: Verify onboarding results
Verify through CLI
Replace cn-hangzhou in the following command with your actual region ID:
aliyun cms2 apm service list \
--workspace agentloop-2694ecf8****************1f84542d \
--service-name <application-name> \
--region cn-hangzhouSuccess criteria: The application appears in the service list with a Running status.
Verify through K8s (container scenarios)
kubectl rollout status deployment/<deployment-name> -n <namespace>
kubectl get pods -n <namespace> -l app=<app-label> \
-o jsonpath='{range .items[*]}{.metadata.name}: initContainers={.spec.initContainers[*].name}{"\n"}{end}'
kubectl logs -n <namespace> -l app=<app-label> --tail=30 | grep -i "arms\|OneAgent\|bootstrap\|agent"Verify through ECS
# Java application: confirm the ARMS Agent is loaded in the process
ps aux | grep "aliyun-java-agent" | grep -v grepView monitoring data in the console
Log on to the AgentLoop console.
Select the target Workspace.
In the left-side navigation pane, choose .
Click the target application name to view monitoring data:
Server-side applications: Application topology, API calls (QPS/RT/error rate), abnormal transactions, slow transactions
AI applications: LLM calls (model name, latency, success rate), token statistics, Agent traces, Tool Call topology, exception tracing
Onboarding execution reference: K8s (ACK/ACS)
This section and the following two sections describe the typical commands and operations the AI Agent executes automatically during onboarding. These steps are shown for reference — the Agent handles them for you.
The following uses the K8s scenario as an example. The Agent's execution flow is the same for Java server-side and Python AI applications, differing only in the language identifier in Labels.
(1) Retrieve account and cluster information
aliyun sts get-caller-identity --force -o json
aliyun cs describe-clusters(2) Initialize APM infrastructure and retrieve credentials
aliyun cms2 apm configuration create \
--workspace agentloop-2694ecf8****************1f84542d \
--region cn-hangzhou
aliyun cms2 apm configuration get \
--workspace agentloop-2694ecf8****************1f84542d \
--region cn-hangzhou -o jsonThe returned authToken is the LicenseKey, and publicDomain / privateDomain are the data reporting Endpoints.
(3) Register the application service
# Server-side Java application example
aliyun cms2 apm service create \
--workspace agentloop-2694ecf8****************1f84542d \
--region cn-hangzhou \
--body '{"serviceName":"order-service","serviceType":"TRACE","attributes":"{\"language\":\"java\"}"}' \
< /dev/null
# AI Python application example
aliyun cms2 apm service create \
--workspace agentloop-2694ecf8****************1f84542d \
--region cn-hangzhou \
--body '{"serviceName":"customer-support-agent","serviceType":"TRACE","attributes":"{\"language\":\"python\"}"}' \
< /dev/null(4) Check ack-onepilot component status
kubectl get pods -n ack-onepilot(5) Patch Deployment to inject the probe
Patching a Deployment to add Labels triggers Pod rolling restarts.
Java server-side application:
kubectl patch deployment order-service -n default \
--type=strategic -p '{
"spec":{"template":{"metadata":{"labels":{
"aliyun.com/app-language":"java",
"armsPilotAutoEnable":"on",
"armsPilotCreateAppName":"order-service",
"armsPilotAppWorkspace":"agentloop-2694ecf8****************1f84542d"
}}}}}
}'Python AI application (LangChain / DashScope):
kubectl patch deployment customer-support-agent -n default \
--type=strategic -p '{
"spec":{"template":{"metadata":{"labels":{
"aliyun.com/app-language":"python",
"armsPilotAutoEnable":"on",
"armsPilotCreateAppName":"customer-support-agent",
"armsPilotAppWorkspace":"agentloop-2694ecf8****************1f84542d"
}}}}}
}'Labels must be added at the spec.template.metadata.labels level (Pod Template), not at the Deployment's metadata.labels level. The following Labels are required:
labels:
armsPilotAutoEnable: "on"
armsPilotCreateAppName: "<application-name>"
armsPilotAppWorkspace: "<workspace-name>"
aliyun.com/app-language: "<language>" # e.g., java, golang, pythonThe following examples show complete Deployment YAML manifests for reference.
Complete YAML reference (Java server-side application):
apiVersion: apps/v1
kind: Deployment
metadata:
name: order-service
namespace: default
spec:
replicas: 2
selector:
matchLabels:
app: order-service
template:
metadata:
labels:
app: order-service
armsPilotAutoEnable: "on"
armsPilotCreateAppName: "order-service"
armsPilotAppWorkspace: "agentloop-2694ecf8****************1f84542d"
aliyun.com/app-language: java
spec:
containers:
- name: order-service
image: registry.example.com/order-service:latest
ports:
- containerPort: 8080Complete YAML reference (Python AI application):
apiVersion: apps/v1
kind: Deployment
metadata:
name: customer-support-agent
namespace: default
spec:
replicas: 2
selector:
matchLabels:
app: customer-support-agent
template:
metadata:
labels:
app: customer-support-agent
armsPilotAutoEnable: "on"
armsPilotCreateAppName: "customer-support-agent"
armsPilotAppWorkspace: "agentloop-2694ecf8****************1f84542d"
aliyun.com/app-language: python
spec:
containers:
- name: customer-support-agent
image: registry.example.com/customer-support-agent:latest
ports:
- containerPort: 8000(6) Verify rolling update
kubectl rollout status deployment/<deployment-name> -n <namespace> --timeout=120sOnboarding execution reference: ECS
In ECS scenarios, the Agent executes the following operations on the target instance through Cloud Assistant or SSH:
Download and extract the corresponding language probe (such as AliyunJavaAgent or aliyun-bootstrap).
Configure probe properties (LicenseKey, AppName, Workspace).
Modify application startup parameters or environment variables.
Restart the application and verify probe loading.
Java application JVM startup parameter example:
java -javaagent:/opt/arms/AliyunJavaAgent/aliyun-java-agent.jar \
-Darms.licenseKey=<LicenseKey> \
-Darms.appName=order-api \
-Darms.workspace=agentloop-2694ecf8****************1f84542d \
-jar app.jarOnboarding execution reference: Dify and OTel
Dify has built-in OpenTelemetry support. The Agent guides you to configure the OTel Exporter to report Trace data to the AgentLoop APM Endpoint (LicenseKey and Endpoint are obtained from apm configuration get), without injection through ack-onepilot.
Supported probe solutions
Server-side applications
The AI Agent automatically selects one of the following onboarding methods based on the application language and deployment environment:
Language | ack-onepilot (K8s) | Proprietary probe | OpenTelemetry |
Java | Supported | AliyunJavaAgent | OTel Java Agent |
Golang | Supported | instgo | OTel Go SDK |
Python | Supported | aliyun-bootstrap | opentelemetry-instrument |
Node.js | — | @loongsuite/cms_node_sdk | OTel Node SDK |
PHP | — | — | OTel PHP extension |
.NET | — | — | OTel .NET Auto-Instrument |
For Java, Golang, and Python applications in K8s scenarios, ack-onepilot non-intrusive injection is preferred, requiring no modifications to application code or Dockerfiles. In ECS scenarios, onboarding is typically completed by modifying JVM startup parameters (Java) or installing probe packages (Golang/Python).
AI applications
AI framework | Underlying probe | Typical deployment environment |
LangChain / LangGraph | Python aliyun-bootstrap | ACK/ACS, ECS |
DashScope (Qwen) | Python aliyun-bootstrap | ACK/ACS, ECS |
AgentScope | Python aliyun-bootstrap | ACK/ACS, ECS |
OpenAI SDK | Python aliyun-bootstrap | ACK/ACS, ECS |
Dify | Dify built-in OTel | Self-hosted, K8s |
Coze | Golang instgo | ACK/ACS, ECS |
OpenClaw / CoPaw / Hermes | Dedicated installer script | Varies |
Python-based AI frameworks in K8s scenarios typically use ack-onepilot to automatically inject the aliyun-bootstrap probe. For applications with built-in OpenTelemetry support such as Dify, the Agent guides you to configure the OTel Exporter to point to the AgentLoop Endpoint without injection through ack-onepilot.
FAQ
The cms2 command is unavailable
Cause: The CLI version is too old or the cms2 plugin is not installed.
Solution:
aliyun upgrade -y
aliyun plugin update
aliyun cms2 --helpPods are not injected with the probe in K8s scenarios
Cause: ack-onepilot is not installed, the version is too old, or ARMS authorization is not complete.
Solution:
Verify that the ack-onepilot version is ≥ 5.1.0.
Check the
kubectl get pods -n ack-onepilotoutput.Confirm that the cluster ARMS Addon Token or AK/SK authorization is configured.
Confirm that
aliyun.com/app-languagematches the actual application language.Confirm that Labels are added at the Pod Template level.
Pods enter CrashLoopBackOff after onboarding
Cause: Probe injection failed or the probe is incompatible with the application runtime environment.
Solution:
Check initContainer logs to troubleshoot injection failures.
Confirm that
aliyun.com/app-languagematches the actual application language.Verify successfully in a test environment, and then re-execute onboarding.
Probe is loaded but no data appears in the console
Cause: LicenseKey, Workspace, or Endpoint configuration is incorrect, or there are network connectivity issues.
Solution:
Run
aliyun cms2 apm configuration getto verify credentials.Confirm that the
armsPilotAppWorkspaceLabel value matches the Workspace name.Check network connectivity from the cluster or ECS instance to the APM Endpoint. Use
privateDomainfor VPC internal networks.Trigger a business request or LLM call, wait 2–3 minutes, and then check the console.
No LLM call data after AI application onboarding
Cause: The probe is not loaded correctly, or the AI framework is not recognized by the probe.
Solution:
Confirm that ack-onepilot has injected the initContainer into the Pod.
Confirm that the application uses a Python AI framework supported by aliyun-bootstrap (such as LangChain or DashScope).
Trigger an LLM call, wait 2–3 minutes, and then check the console.
Check the application logs for probe initialization success messages.
How to roll back onboarding
K8s scenario: Remove the ARMS-related Labels, and the Pods undergo a rolling restart without probe injection.
kubectl patch deployment <deployment-name> -n <namespace> \
--type json \
--patch '[
{"op": "remove", "path": "/spec/template/metadata/labels/armsPilotAutoEnable"},
{"op": "remove", "path": "/spec/template/metadata/labels/armsPilotCreateAppName"},
{"op": "remove", "path": "/spec/template/metadata/labels/armsPilotAppWorkspace"}
]'ECS scenario: Remove the -javaagent and related -Darms.* configurations from the startup parameters, and restart the application.