agent_crew
agent_crew copied to clipboard
feat: Add subagents to running teams from the UI
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 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 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
createdorrunningstate) - 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
.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.)- 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
createdstate (pre-deploy) - [ ] Works for teams in
runningstate (hot-reload of agent files) - [ ] Proper error handling and feedback
Implemented in 2e168f0. SubAgentManager integrated as 'Sub-Agents' tab in Settings modal. Full CRUD: create with MarkdownEditor/model/skills, edit, delete with confirmation. Works for stopped and running teams.