Install
openclaw skills install @sdk-team/alibabacloud-flink-ai-opsUse when users of Alibaba Cloud Realtime Compute for Apache Flink (阿里云实时计算Flink版) want to use the cloud AI assistant (云端AI智能助手) for Q&A (问答), intelligent job diagnosis (智能诊断), multi-turn conversation (多轮会话), or responding to pending approvals (审批续接). Also use to query and modify scheduled patrol configuration (定时巡检配置), manually trigger a patrol (手动触发巡检), list and query patrol reports (查询巡检报告), wait for and interpret patrol reports (等待并解读巡检报告), or validate assistant and patrol inputs locally. Out of scope are regular or strictly read-only job diagnosis, SQL, job and session cluster operations, instance management, AI service enablement and disablement, IM channels, cloud-side skill management, and other cloud products.
openclaw skills install @sdk-team/alibabacloud-flink-ai-opsTwo categories of AI-powered operations work through the Alibaba Cloud Realtime Compute for Apache Flink development console (Ververica OpenAPI):
Trigger phrases: the user explicitly asks for the "AI assistant / intelligent assistant analysis", "patrol / scheduled patrol configuration", "patrol report", etc.; explicitly running scripts/flink_ai_ops_cli.py also triggers this skill. Regular job diagnosis, SQL, job or session cluster operations, and strictly read-only diagnosis are routed to alibabacloud-flink-workspace-ops; instance management is routed to alibabacloud-flink-instance-manage.
Architecture: Flink development console OpenAPI (ververica 2022-07-18) + ChatAiAgent (SSE streaming conversation + HITL approval) + intelligent patrol (5 APIs for configuration / trigger / report) + Python Common SDK (alibabacloud-ververica20220718 1.14.0) + local CLI wrapper (scripts/flink_ai_ops_cli.py)
Create a local virtual environment with Python 3.10 or later in the skill root and install the dependencies. The Python SDK handles all cloud requests independently of the Alibaba Cloud CLI and its plugins.
python3 -m venv .venv
.venv/bin/python -m pip install -r assets/requirements.txt
.venv/bin/python -m pip check
assets/requirements.txt pins the official SDK to alibabacloud-ververica20220718==1.14.0. Run scripts/flink_ai_ops_cli.py with .venv/bin/python, or run source .venv/bin/activate before using the python3 examples below. Copy the entire skill directory when installing and resolve relative paths from its root. The SDK uses its default credential chain. See Command and Auth.
| Variable | Required | Description |
|---|---|---|
ALIBABA_CLOUD_ACCESS_KEY_ID | Credential chain fallback | Alibaba Cloud AccessKey ID. Reading, echoing, or asking for the real value in the session is forbidden |
ALIBABA_CLOUD_ACCESS_KEY_SECRET | Credential chain fallback | AccessKey Secret. Same rule |
ALIBABA_CLOUD_SECURITY_TOKEN | STS only | STS temporary credential token |
SKILL_SESSION_ID | Yes | Freshly generated 32-char lowercase hexadecimal tracking ID for this session; see SDK Request Tracing |
SKILL_VERSION | Yes | Taken from the top-level version field of this skill's manifest; see SDK Request Tracing |
Credentials may also come from the local credential file, a RAM role, or OIDC (resolved automatically by the default credential chain); the environment-variable path is not mandatory.
MissingCredentials).echo $ALIBABA_CLOUD_ACCESS_KEY_ID are forbidden; never ask the user for plaintext credentials in the session or on the command line.export ALIBABA_CLOUD_ACCESS_KEY_ID='***REDACTED***'
export ALIBABA_CLOUD_ACCESS_KEY_SECRET='***REDACTED***'
export ALIBABA_CLOUD_SECURITY_TOKEN='***REDACTED***' # required only for STS temporary credentials
The executing process must inherit the new environment; exporting in another terminal does not update an already-started process. Configuration methods and official docs are in Command and Auth. Insufficient permissions or expired credentials keep their real error codes; do not relabel them as missing credentials.
The target workspace needs access to Flink AI features before using the assistant or intelligent patrol. The RAM permission reference lists the published stream: actions and identifies the patrol write operations whose actions are unpublished.
On a permission error, keep the original error code, redacted message, and request_id, and identify the API that failed. Have an administrator grant the applicable published action. For an unpublished action, ask the administrator to check the RAM console or contact Alibaba Cloud Support with the request ID. If the outcome of a write is uncertain, verify it with the corresponding read-only workflow before proceeding.
IMPORTANT: Parameter Confirmation — Before executing any command or API call, ALL user-customizable parameters (e.g., RegionId, instance names, CIDR blocks, passwords, domain names, resource specifications, etc.) MUST be confirmed with the user. Do NOT assume or use default values without explicit user approval.
Use Related Commands to identify the required inputs for the selected operation.
Reuse confirmed scope. A manual patrol on specific deployments requires a workspace ID, namespace, region, and deployment IDs. If any are missing or are placeholders, ask for all missing real values in one message and wait for the user's reply before installing dependencies or running a command. Use the confirmed deployment IDs as the patrol scope. If the user declines or asks to stop before execution, end the task and state that no patrol started and no report ID is available. Never discover, default, or guess a target in place of the requested scope. A user directly requesting a specific modification authorizes that scope; show the impact and execute without asking again.
Before the first call, read references/manifest.json from this skill's root and pass its top-level non-empty string version verbatim as SKILL_VERSION. On each invocation, the script reads the manifest from its own skill directory and checks the version before initializing credentials. Stop and report an error if the file or version is missing, invalid, or mismatched.
Generate a random 32-character lowercase hexadecimal SKILL_SESSION_ID before this skill's first call in the conversation. Reuse the ID within this conversation and skill. Use distinct IDs for other skills. Reread this skill's manifest when returning to it. Obtain the cloud sessionId, hitlId, and reportId from actual responses.
Pass both values with the command as shown below. The script constructs the SDK User-Agent product AlibabaCloud-Agent-Skills/alibabacloud-flink-ai-ops/{session-id} skill-version/{skill-version}.
For an explicitly requested offline validation, run the wrapper with the supplied arguments only when the input is known to be rejected before SDK initialization or execution is isolated from the network. Never add --confirm or substitute a live target to demonstrate a local rejection. Report the observed error code and exit status.
For an in-scope operational request, use the Agent Operating Protocol to select the first command and Related Commands to build its arguments. Run the wrapper directly once parameters and authorization are ready. Install dependencies first if needed.
For a request to view the current scheduled patrol configuration, set trace_id and skill_version from SDK Request Tracing. Set workspace_id, namespace, and region_id from the confirmed scope, then run this read-only command.
SKILL_SESSION_ID="$trace_id" SKILL_VERSION="$skill_version" \
.venv/bin/python scripts/flink_ai_ops_cli.py get_patrol_config \
-w "$workspace_id" -n "$namespace" -r "$region_id"
Run business commands against the production environment. Check the routing rules in Command and Auth when the user provides a console URL.
Read as needed before execution (detailed command semantics, error recovery, and per-scenario workflows):
The common JSON output is success/operation/data/error/request_id. Explain what is done, what is not, and the next step by combining business results, tool failures, and recheck evidence; do not claim a fix solely from HTTP 200, textual promises, or the outer success field; request_id may be empty when the API did not return one and must never be fabricated. Per-scenario verification steps are in references/verification-method.md.
This skill creates no deletable cloud resources; the cleanup scope is:
--body_file.update_patrol_config --confirm and re-read to verify..venv virtual environment can be deleted when no longer used.See Related Commands for the command table, defaults, and API mapping.
userMessage; never approve write-operation approvals on the user's behalf. For strictly read-only / permission-isolated requests, do not call Chat — use the pure-read commands of alibabacloud-flink-workspace-ops instead; if that skill is unavailable, state the limitation rather than substituting Chat.hitlId/toolName/args against the current authorization; continue directly for authorized matching items without re-asking; never approve unauthorized or out-of-scope items, and never approve all because some item was approved.completed only marks the last segment of one text message, and EOF only ends this collection; operationVerified: false does not become business completion because the stream ended — job changes need cross-skill read-only rechecks.sessionId only when the user explicitly requests a new turn.--timeout is reached, report the original reportId and the last status; never auto-extend; when the user explicitly continues waiting, start one new bounded wait with the same report ID — never re-trigger.| Document | Contents |
|---|---|
| Command and Auth | Installation, environment routing, credentials, common parameters and output |
| Agent Operating Protocol | First-command selection, identifiers and scope, completion and verification, per-error recovery |
| Assistant and HITL | Chat input, stream events, stream-interruption recovery, approval continuation |
| Patrol Workflows | Scope, config preview and modification, trigger and wait, report closure |
| Related Commands | Full command parameters, enums, and official API mapping |
| Verification Method | Per-scenario success verification steps and commands |
| RAM Policies | API-to-RAM-Action mapping and enablement prerequisites |
| Development console API overview | Official API overview |
| AI assistant | ChatAiAgent features and fees |
| Intelligent patrol | Patrol feature description |