在OpenClaw控制界面的Agents页面中,添加、扩展、修复或完善子代理(Subagents)面板,适用于实现Agents页面的Subagents标签页、连接编辑等功能。
Build and maintain the Subagents tab inside the OpenClaw Agents page.
Use this skill for:
Keep the feature aligned with the real runtime behavior.
Subagent model precedence is:
agent.subagents.modelagents.defaults.subagents.modelDo not invent backend schema that does not exist.
If the current schema only supports a single subagents.model selection and shared concurrency limits, surface that clearly in the UI.
Add Subagents as an Agents-page panel beside:
Recommended panel layout:
maxConcurrentmaxSpawnDepthmaxChildrenPerAgentPrefer the existing config editing path. Do not create a disconnected store.
Edit through the same config-form/save flow already used by the Agents UI:
agents.list[i].subagents.modelagents.list[i].subagents.thinkingagents.defaults.subagents.modelagents.defaults.subagents.thinkingagents.defaults.subagents.maxConcurrentagents.defaults.subagents.maxSpawnDepthagents.defaults.subagents.maxChildrenPerAgentIf fallback models are represented as part of the existing model object shape, reuse that shape instead of inventing a new field.
ui/src/ui/views/agents-panel-subagents.ts"subagents" through ui/src/ui/views/agents.tsui/src/ui/app.ts and ui/src/ui/app-view-state.tsui/src/ui/app-render.tsPrefer these checks after changes:
bash
cd ~/openclaw
pnpm --dir ui exec vitest run --config vitest.config.ts src/ui/views/agents.test.ts
pnpm --dir ui build
If repo-wide typecheck is already noisy, do not claim unrelated errors belong to this feature.
Read these before editing:
references/file-map.mdreferences/runtime-precedence.mdFor the concrete implementation that originally shipped this feature, read:
references/implementation-notes.txtreferences/agents-panel-subagents.ts.txtreferences/agents.ts.txtreferences/app.ts.txtreferences/app-view-state.ts.txtreferences/app-render.subagents.txtreferences/agents.test.ts.txtUse those files as the exact reference implementation when recreating or porting the feature to another OpenClaw tree.