Install
openclaw skills install glm-autorouteRoutes tasks between GLM-4.7-FlashX for simple queries and GLM-5 for coding, analysis, reasoning, and complex tasks, switching automatically as needed.
openclaw skills install glm-autorouteBinary model routing for ZAI GLM models - lightweight vs heavyweight tasks.
sessions_spawn({
task: "<the full task description>",
model: "zai/glm-5",
label: "<short task label>"
})
Use for lightweight tasks:
DO NOT:
Use for heavyweight tasks:
| Task | Model | Why |
|---|---|---|
| "Check calendar" | GLM-4.7 | Simple lookup |
| "What time is it?" | GLM-4.7 | Simple Q&A |
| "Heartbeat check" | GLM-4.7 | Routine |
| "Read this file" | GLM-4.7 | Simple lookup |
| "Summarize this" | GLM-4.7 | Basic task |
| "Write Python script" | GLM-5 | Coding |
| "Debug this error" | GLM-5 | Analysis |
| "Research market trends" | GLM-5 | Deep research |
| "Plan migration" | GLM-5 | Complex planning |
| "Analyze this issue" | GLM-5 | Analysis |
When spawning GLM-5 sub-agent sessions for ANY task (coding, research, analysis, planning, etc.), follow this pattern:
1. Code Output (Important)
2. Full Announce for Other Results
3. Two-Layer Memory Strategy
MEMORY.md (Curated Long-Term)
Detailed Reports (Task-Specific Files)
research/YYYY-MM-DD-topic.md (full findings, data, analysis)Research task:
sessions_spawn({
task: "Research X. Announce full findings to user. Write full report to research/YYYY-MM-DD-X.md, then write ONLY key insights to MEMORY.md (clean, concise).",
model: "zai/glm-5",
label: "Research X"
})
Coding task:
sessions_spawn({
task: "Write Python script for X. Save full code to file. Provide summary (what created, path, status, dependencies) in announce. Write key implementation decisions to MEMORY.md (important only).",
model: "zai/glm-5",
label: "Python script X"
})
Apply this pattern to ALL GLM-5 spawns. Code in files only, summary in announce, full disclosure on request.