Agent Team Organization
by @maverick-software
Create and maintain a Teams management page for OpenClaw Control UI, including named agent teams, parent/child nesting, indented tree rendering, collapsible...
clawhub install agent-team-organizationπ About This Skill
name: agent-team-organization description: "Create and maintain a Teams management page for OpenClaw Control UI, including named agent teams, parent/child nesting, indented tree rendering, collapsible team groups, parent selectors, and file-backed team registry persistence. Use when building, extending, fixing, or documenting the OpenClaw Teams page, team hierarchy UX, or gateway/UI plumbing for team organization features."
Agent Team Organization
Build and maintain the OpenClaw Teams page as a lightweight team registry plus Control UI tree view.
Scope
Use this skill for:
Core design
Keep the feature simple:
agents.listagentIds[]parentId for hierarchyData model
Use this shape for each team:
type TeamRecord = {
id: string;
name: string;
description?: string;
parentId?: string;
agentIds: string[];
createdAt: string;
updatedAt: string;
};
Registry file:
~/.openclaw/workspace/teams/teams.json
UI pattern
Default page layout:
Expected behavior:
Gateway pattern
Expose dedicated methods:
teams.listteams.getteams.createteams.updateteams.deleteKeep validation inside the teams handler:
agentIds must exist in current agent listparentId must exist when setImplementation checklist
1. Add/update src/gateway/team-registry.ts
2. Add/update src/gateway/server-methods/teams.ts
3. Register methods in gateway method lists/scopes
4. Add UI types for TeamRecord / TeamsListResult
5. Add teams state to app.ts and app-view-state.ts
6. Add teams controller for load/select behavior
7. Add views/teams.ts renderer
8. Add navigation/i18n wiring for the Teams tab
9. Build the UI after changes
10. If save behavior is wrong, verify the live runtime bundle is actually carrying the new handler logic
Debugging rule
If the UI seems correct but saved team hierarchy disappears after clicking Save:
1. inspect ~/.openclaw/workspace/teams/teams.json
2. confirm whether parentId is written to disk
3. inspect the compiled gateway/runtime bundle, not just source files
4. restart the gateway after updating runtime artifacts
References
For the page structure and file map, read:
references/ui-structure.mdFor live gateway/runtime mismatches where the UI looks right but parentId or other team fields disappear on save, read:
references/runtime-troubleshooting.md