Install
openclaw skills install alibabacloud-data-agent-skillInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
openclaw skills install alibabacloud-data-agent-skillls command API response parsing (support case-insensitive field names), optimize SKILL documentation structure, separate ANALYSIS mode specification documentThis Skill uses Alibaba Cloud default credential chain (recommended) or API_KEY authentication.
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
export DATA_AGENT_API_KEY=your-api-key
export DATA_AGENT_REGION=cn-hangzhou
Get API_KEY: Data Agent Console
RAM users need AliyunDMSFullAccess or AliyunDMSDataAgentFullAccess permissions.
See RAM-POLICIES.md for detailed permission information.
DATA_AGENT_DEBUG_API=1 python3 scripts/data_agent_cli.py file example.csv -q "analyze"
internal_data_employees (DataAgent's built-in test database containing employee, department, and salary data) for first-time experienceassets/example_game_data.csv for file analysis experiencescripts/data_agent_cli.py helps users complete the full workflow from discover data → initiate analysis → track progress → get results.
⚠️ 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
See ANALYSIS_MODE.md for details
Use db/file to create a session for initial analysis, then use attach --session-id <ID> to reuse the session for follow-up questions.
See COMMANDS.md and WORKFLOWS.md for details
# 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 <ID> --dms-db-id <ID> \
--instance-name <NAME> --db-name <DB> \
--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 <ID> -q "Break down by month"
📖 See WORKFLOWS.md and COMMANDS.md for complete workflows, command reference, and best practices
# 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