Install
openclaw skills install bailian-subagent-skillDelegate heavy workloads to Bailian (DashScope) subagent to save main session tokens. Use when tasks involve: PDF parsing, article/web reading, large skill content processing, video/audio/image analysis, DataWorks/MaxCompute operations, agent_memory table CRUD, or any token-intensive task. Preferred model: bailian/glm-5. Also covers how to read/write the agent_memory MaxCompute table for long-term memory persistence.
openclaw skills install bailian-subagent-skillDelegate token-intensive tasks to Bailian (DashScope) subagent and manage MaxCompute agent_memory table.
Spawn a Bailian subagent when tasks involve:
Use these parameters when spawning:
model: bailian/glm-5
runtime: subagent
NEVER hardcode credentials in task text. Always read from environment variables:
ALICLOUD_ACCESS_KEY_IDALICLOUD_ACCESS_KEY_SECRET你是資料工程 subagent。
AK/SK 從環境變量讀取:
- os.environ['ALICLOUD_ACCESS_KEY_ID']
- os.environ['ALICLOUD_ACCESS_KEY_SECRET']
任務:[具體任務描述]
Long-term memory table on MaxCompute:
| Property | Value |
|---|---|
| Project | samuelhsin |
| Endpoint | http://service.cn-hangzhou.maxcompute.aliyun.com/api |
| Table | agent_memory |
| Lifecycle | 3650 days |
category STRING,
title STRING,
summary STRING,
tags STRING,
created_at STRING
PARTITIONED BY (dt STRING)
import os
import odps
o = odps.ODPS(
access_id=os.environ['ALICLOUD_ACCESS_KEY_ID'],
secret_access_key=os.environ['ALICLOUD_ACCESS_KEY_SECRET'],
project='samuelhsin',
endpoint='http://service.cn-hangzhou.maxcompute.aliyun.com/api'
)
# 查詢今日記憶
sql = "SELECT dt, category, title, summary, tags, created_at FROM agent_memory WHERE dt='2026-03-18' ORDER BY category"
with o.execute_sql(sql).open_reader() as reader:
for row in reader:
print(row)
# INSERT 單筆
sql = """
INSERT INTO agent_memory PARTITION (dt='2026-03-18')
(category, title, summary, tags, created_at)
VALUES ('config', 'my title', 'summary text', 'tag1,tag2', '2026-03-18T18:00:00+08:00')
"""
o.execute_sql(sql)
pip install pyodpsFor advanced patterns and detailed examples, see: