← 返回
未分类 Key

Bailian Subagent Skill

Delegate heavy workloads to Bailian (DashScope) subagent to save main session tokens. Use when tasks involve: PDF parsing, article/web reading, large skill c...
将繁重的工作负载委托给 Bailian(DashScope)子代理,以节省主会话令牌。适用于涉及 PDF 解析、文章/网页阅读、大型技能计算等任务。
samuelhsin samuelhsin 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 155
下载
💾 0
安装
1
版本
#latest

概述

Bailian Subagent Skill

Delegate token-intensive tasks to Bailian (DashScope) subagent and manage MaxCompute agent_memory table.

1. When to Delegate to Bailian Subagent

Spawn a Bailian subagent when tasks involve:

  • PDF parsing - Extract text, tables, or structure from PDFs
  • Article/Web reading & summarization - Long articles, documentation pages
  • Large skill content processing - When skill files exceed normal context
  • Video/Audio/Image analysis - Multimodal content processing
  • DataWorks / MaxCompute operations - SQL execution, table management
  • agent_memory table CRUD - Read/write long-term memory
  • Any task estimated >2000 tokens - Offload to save main session

2. How to Spawn Bailian Subagent

Use these parameters when spawning:

model: bailian/glm-5
runtime: subagent

Critical: AK/SK Security

NEVER hardcode credentials in task text. Always read from environment variables:

  • ALICLOUD_ACCESS_KEY_ID
  • ALICLOUD_ACCESS_KEY_SECRET

Spawn Task Template

你是資料工程 subagent。

AK/SK 從環境變量讀取:
- os.environ['ALICLOUD_ACCESS_KEY_ID']
- os.environ['ALICLOUD_ACCESS_KEY_SECRET']

任務:[具體任務描述]

3. agent_memory Table

Long-term memory table on MaxCompute:

PropertyValue
-----------------
Projectsamuelhsin
Endpointhttp://service.cn-hangzhou.maxcompute.aliyun.com/api
Tableagent_memory
Lifecycle3650 days

Schema

category STRING,
title STRING,
summary STRING,
tags STRING,
created_at STRING
PARTITIONED BY (dt STRING)

Read Memory (PyODPS)

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)

Write Memory

# 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)

Important Notes

  • Prefer PyODPS direct connection over DataWorks API (avoids rate limiting)
  • Install: pip install pyodps

4. References

For advanced patterns and detailed examples, see:

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-20 06:16 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,164 📥 936,512
dev-programming

DataWorks Open API

samuelhsin
通过动态 API 发现和官方 SDK(Node.js、Python、Java)操作阿里云 DataWorks,涵盖数据开发、工作流运维、数据摄入等。
★ 1 📥 565
ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 865 📥 345,109