Summary
Allow users to add, edit, and remove subagents on teams that are already created or running, directly from the team monitor/detail view.
Current State
- Backend already supports full CRUD for agents on existing teams:
POST /api/teams/:id/agents — Create agent
PUT /api/teams/:id/agents/:agentId — Update agent
DELETE /api/teams/:id/agents/:agentId — Delete agent
POST /api/teams/:id/agents/:agentId/skills/install — Install skills at runtime
- Frontend only allows defining subagents during team creation (TeamBuilderPage.tsx, Step 2)
- There is no UI to add/edit/remove subagents after the team is created
- The SkillStatusPanel allows installing skills at runtime but not adding new agents
Proposed Solution
- Add an "Add Subagent" button in the team monitor or team detail view (visible when team is in
created or running state)
- Subagent creation modal/panel with fields:
- Name (required)
- Description (required)
- Model (dropdown: inherit, sonnet, opus, haiku)
- Skills (optional, same UI as TeamBuilder step 2)
- Edit existing subagents — allow modifying description, model, and skills of existing workers
- Delete subagents — with confirmation dialog
- When team is running: After adding a subagent, the system should regenerate the
.md file in the leader container (the backend UpdateAgent endpoint already handles this)
Affected Files
src/pages/TeamMonitorPage.tsx — Add subagent management UI
src/services/api.ts — Already has agentApi with CRUD methods
src/types/index.ts — Types already defined (CreateAgentInput, etc.)
- Potentially new component:
SubAgentManager.tsx
Acceptance Criteria
Summary
Allow users to add, edit, and remove subagents on teams that are already created or running, directly from the team monitor/detail view.
Current State
POST /api/teams/:id/agents— Create agentPUT /api/teams/:id/agents/:agentId— Update agentDELETE /api/teams/:id/agents/:agentId— Delete agentPOST /api/teams/:id/agents/:agentId/skills/install— Install skills at runtimeProposed Solution
createdorrunningstate).mdfile in the leader container (the backend UpdateAgent endpoint already handles this)Affected Files
src/pages/TeamMonitorPage.tsx— Add subagent management UIsrc/services/api.ts— Already hasagentApiwith CRUD methodssrc/types/index.ts— Types already defined (CreateAgentInput, etc.)SubAgentManager.tsxAcceptance Criteria
createdstate (pre-deploy)runningstate (hot-reload of agent files)