Alibabacloud Data Agent Skill
/install alibabacloud-data-agent-skill
metadata: author: DataAgent Team version: "1.7.2"
Changelog
- v1.7.2: Use Alibaba Cloud default credential chain instead of explicit AK/SK, add User-Agent header, fix RAM policy wildcard issues
- v1.7.1: Fix CLI
lscommand API response parsing (support case-insensitive field names), optimize SKILL documentation structure, separate ANALYSIS mode specification document - v1.7.0: API_KEY authentication support, native async execution mode, session isolation, enhanced attach mode, optimized log output
Installation
Configure Credentials
This Skill uses Alibaba Cloud default credential chain (recommended) or API_KEY authentication.
Option 1: Default Credential Chain (Recommended)
The Skill uses Alibaba Cloud SDK's default credential chain to automatically obtain credentials, supporting environment variables, configuration files, instance roles, etc.
See Alibaba Cloud Credential Chain Documentation
Option 2: API_KEY Authentication (File Analysis Only)
export DATA_AGENT_API_KEY=your-api-key
export DATA_AGENT_REGION=cn-hangzhou
Get API_KEY: Data Agent Console
Permission Requirements
RAM users need AliyunDMSFullAccess or AliyunDMSDataAgentFullAccess permissions.
See RAM-POLICIES.md for detailed permission information.
Debug Mode
DATA_AGENT_DEBUG_API=1 python3 scripts/data_agent_cli.py file example.csv -q "analyze"
💡 Getting Started Tips
- Use the built-in demo database
internal_data_employees(DataAgent's built-in test database containing employee, department, and salary data) for first-time experience - Or use local file
assets/example_game_data.csvfor file analysis experience
Data Agent CLI — Unified Command-Line Data Analysis Tool
Overview
scripts/data_agent_cli.py helps users complete the full workflow from discover data → initiate analysis → track progress → get results.
Core Concepts
⚠️ Key Prerequisite: Data Agent can only analyze databases that have been imported into Data Agent Data Center.
- Data Center: Data Agent's data center, only databases here can be analyzed
- DMS: Alibaba Cloud Data Management Service, stores metadata of all databases
- Relationship: Databases registered in DMS ≠ Databases in Data Center
Usage Flow:
- First use
lsto check if the target database exists in Data Center- If not found, use
dmssubcommand to search for database info, then useimportsubcommand to import it- After successful import, you can use
dbsubcommand for analysis
Analysis Modes
- ASK_DATA (default): Synchronous execution, sub-second response, suitable for quick Q&A
- ANALYSIS: Deep analysis, takes 5-40 minutes, requires spawning a sub-agent for async execution or using --async-run parameter
See ANALYSIS_MODE.md for details
Session Reuse
Use db/file to create a session for initial analysis, then use attach --session-id \x3CID> to reuse the session for follow-up questions.
See COMMANDS.md and WORKFLOWS.md for details
Quick Start
# 1. List available databases
python3 scripts/data_agent_cli.py ls
# 2. Query analysis (synchronous response)
python3 scripts/data_agent_cli.py db \
--dms-instance-id \x3CID> --dms-db-id \x3CID> \
--instance-name \x3CNAME> --db-name \x3CDB> \
--tables "employees,departments" -q "Which department has the highest average salary"
# 3. Follow-up question (reuse session)
python3 scripts/data_agent_cli.py attach --session-id \x3CID> -q "Break down by month"
📖 See WORKFLOWS.md and COMMANDS.md for complete workflows, command reference, and best practices
Project Structure
# Skill root directory
├── SKILL.md # This document
├── scripts/ # Source code
│ ├── data_agent/ # SDK module
│ ├── cli/ # CLI module
│ ├── data_agent_cli.py # CLI entry point
│ └── requirements.txt # Dependencies
├── sessions/ # Session data
└── references/ # Reference documents
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install alibabacloud-data-agent-skill - 安装完成后,直接呼叫该 Skill 的名称或使用
/alibabacloud-data-agent-skill触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Alibabacloud Data Agent Skill 是什么?
Invoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analyti... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 99 次。
如何安装 Alibabacloud Data Agent Skill?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install alibabacloud-data-agent-skill」即可一键安装,无需额外配置。
Alibabacloud Data Agent Skill 是免费的吗?
是的,Alibabacloud Data Agent Skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Alibabacloud Data Agent Skill 支持哪些平台?
Alibabacloud Data Agent Skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Alibabacloud Data Agent Skill?
由 alibabacloud-skills-team(@sdk-team)开发并维护,当前版本 v0.0.1。