Skip to content

feat: Add subagents to running teams from the UI #50

@sre-helmcode

Description

@sre-helmcode

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

  1. Add an "Add Subagent" button in the team monitor or team detail view (visible when team is in created or running state)
  2. Subagent creation modal/panel with fields:
    • Name (required)
    • Description (required)
    • Model (dropdown: inherit, sonnet, opus, haiku)
    • Skills (optional, same UI as TeamBuilder step 2)
  3. Edit existing subagents — allow modifying description, model, and skills of existing workers
  4. Delete subagents — with confirmation dialog
  5. 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

  • "Add Subagent" button visible in team detail/monitor view
  • Modal/panel to create new subagent with all required fields
  • Edit existing subagent configuration
  • Delete subagent with confirmation
  • Changes reflected immediately in the UI
  • Works for teams in created state (pre-deploy)
  • Works for teams in running state (hot-reload of agent files)
  • Proper error handling and feedback

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions