Install
openclaw skills install agent-systemOpenClaw 核心 Agent 调度系统。当用户描述需要"分析"、"规划"、"拆解任务"、"多步骤处理"、"自动执行复杂任务"时激活。 基于复杂度自动选择最优执行路径。
openclaw skills install agent-system这是一个智能调度框架,包含:
| 复杂度 | 路径 |
|---|---|
| ≤ 3 | Executor → 直接输出 |
| 4-5 | Executor → Reviewer → 输出 |
| > 5 | Planner → Executor → Reviewer → [Heal] → 输出 |
高复杂度指标(满足任一即提升复杂度):
复杂度等级:
用户输入
↓
┌─────────────────┐
│ Planner │ ← 意图识别 + 复杂度评估
│ complexity? │
└────────┬────────┘
│
┌────┴────┐
≤3 >3
│ │
▼ ▼
Executor Planner
│ ↓
│ [任务拆解]
│ ↓
│ Executor
│ (多任务)
│ ↓
│ Reviewer
│ (质量评分)
│ ↓
│ score < 70?
│ │
│ ┌────┴────┐
│ │ │
│ Yes No
│ │ │
│ ▼ ▼
│ Self-Heal 输出
│ ↓
│ 重试 < 3?
│ │
│ ┌─┴────────┐
│ │ │
│ Yes No → degraded_mode
│ │
│ └──────────→ 重试
│
└──────────────→ 输出
自动识别用户意图:
| Intent | 关键词 |
|---|---|
| analysis | 分析、原因、为什么、分析一下 |
| generation | 写、生成、创建、编写 |
| coding | 代码、编程、写程序、开发 |
| decision | 选择、决定、哪个好、比较 |
| planning | 计划、安排、规划 |
{
"success": true,
"content": "执行结果内容",
"plan": {
"intent": "analysis | generation | ...",
"complexity": 1-10,
"tasks": [
{
"task_id": "t1",
"type": "analysis | generate | transform | validate",
"description": "任务描述",
"input": "输入内容",
"expected_output": "预期输出"
}
]
},
"metrics": {
"tokens": 1500,
"truncated": false,
"quality_score": 85,
"heal_triggered": false,
"degraded_mode": false
}
}
score ≥ 70 → 直接输出score < 70 → 触发 Self-Healdegraded_mode(降级模式)满足任一即触发自愈:
score < 70{xxx}| 重试次数 | 策略 | 说明 |
|---|---|---|
| 第1次 | detailed_reasoning | 增加思考链长度 |
| 第2次 | reverse_reasoning | 反向推理(从目标倒推) |
| 第3次 | degraded_mode | 降级,输出简化结果 |
不允许出现以下语句:
条件分支:
当信息不足需要推断时,必须标注置信度:
[推断结论 · 置信度: 高/中/低 · 待数据验证]
2000 tokens(约4000字符)[已截断]所有 Agent 日志输出 JSON:
{
"timestamp": "2026-04-02T11:40:00+08:00",
"level": "INFO | WARNING | ERROR",
"module": "orchestrator | planner | executor | reviewer | self_heal",
"event": "事件名称",
"details": {}
}
INFO:正常流程(开始/完成/切换)WARNING:异常但未失败(占位符已填充/置信度低)ERROR:执行失败/触发自愈每次执行记录:
error_rate - 错误率output_score - 质量评分heal_trigger_count - 自愈触发次数degraded_mode_count - 降级模式次数src/orchestrator.js 包含完整的参考实现,可作为:
用户:"今天天气怎么样"
→ complexity = 3 → Executor → 直接输出
用户:"帮我分析销售下滑的原因"
→ complexity = 6 → Planner → Executor × 3 → Reviewer → [自愈] → 输出
用户:"帮我写一封道歉邮件"
→ complexity = 4 → Executor → Reviewer → 输出
本 Skill 提供工作流指导,实际执行由 AI 基于上下文判断