360 Secure SkillHub
360 安全技能中心

Bailian Subagent

通过 sessions_spawn 把数据处理、批量操作、DataWorks/MaxCompute SQL、新闻抓取、代码编写、长文档分析等重任务交给百炼(DashScope)子代理执行,并附一份 DataWorks SDK 调用示例;任务指令需自带全部上下文与输出格式要求。

samuelhsin
samuelhsin
热度 21.69
最近更新 2026-05-20 03:31:01
分类:自动化依赖:代码执行 / 内部调用大模型 / 第三方 API / MCP 服务应用场景:工作流 / 数据处理 / 代码生成 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add bailian-subagent
Metadata
name
bailian-subagent
description
Spawn a bailian (百炼 DashScope) subagent to handle token-heavy or compute-intensive tasks. Use when the main agent needs to delegate data processing, batch operations, DataWorks/MaxCompute SQL execution, news fetching, or any task where saving Claude tokens matters. Triggers on phrases like "讓百炼做", "丟給百炼", "省token", "subagent去做", "delegate to bailian", or when a task is large/repetitive enough to warrant offloading.

Bailian Subagent

Delegate heavy tasks to a cheaper bailian model to save Claude tokens.

Available Models

Model Use case
bailian/qwen3.5-plus General tasks, data processing, writing
bailian/qwen3-coder-plus Code generation, debugging, scripts
bailian/kimi-k2.5 Long context, document analysis
bailian/glm-5 Alternative general model

Default recommendation: bailian/qwen3.5-plus for most tasks.

How to Spawn

sessions_spawn(
    task="<detailed instructions>",
    model="bailian/qwen3.5-plus",
    runtime="subagent",
    mode="run",
    runTimeoutSeconds=600
)

What to Delegate

Good candidates:

  • DataWorks / MaxCompute SQL execution (DROP/CREATE/INSERT/SELECT)
  • Batch data processing or transformation
  • Fetching and summarizing news / RSS feeds
  • Writing boilerplate code or scripts
  • Long document analysis or summarization
  • Any task with large context or repetitive steps

Keep with Claude (main agent):

  • Final decisions and trading advice
  • Conversation with Samuel
  • Tasks requiring memory/context of prior sessions
  • Sensitive judgment calls

Writing Good Task Instructions

Include all required context in the task string — subagent starts fresh with no memory:

  • Credentials / endpoints (if needed)
  • Exact steps to follow
  • Expected output format
  • Error handling instructions

DataWorks Pattern (verified)

When delegating MC/DW SQL tasks, provide this pattern in the task:

from alibabacloud_dataworks_public20240518.client import Client
from alibabacloud_dataworks_public20240518 import models as dw_models
from alibabacloud_tea_openapi.models import Config
import uuid, time

config = Config(
    access_key_id='${ALICLOUD_ACCESS_KEY_ID}',
    access_key_secret='${ALICLOUD_ACCESS_KEY_SECRET}',
    endpoint='dataworks.cn-hangzhou.aliyuncs.com',
    region_id='cn-hangzhou'
)
client = Client(config)
# ... run_sql() helper pattern

Key params: project_id=579810, owner=1206989323863181, resource_group_id=Serverless_res_group_421503158374466_777119112505568, datasource=samuelhsin

Sleep 15s between SQL calls to avoid throttling.