agentscope-ai / agentscope-ai/QwenPaw

[Feature] Agent Grouping in Console UI

Open
#4,222 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
34.9k
Forks
3.1k
Avg merge
1d 15h
Merged PRs (30d)
225

Description

# [Feature] Agent Grouping in Console UI β€”

## πŸ“‹ Summary /

**EN:** Add the ability to organize agents into groups/folders in the QwenPaw Console UI. Currently, agents are displayed as a flat list regardless of count. When users have 10+ agents (e.g., multi-agent coding teams), a flat list becomes hard to navigate. A collapsible group/folder structure would allow users to logically organize agents by team, role, or project.

---

## πŸš€ Feature Description /
### UI Mockup /
```
πŸ§‘β€πŸ’Ό Coding Brothers (4) ← group, expandable
β”œβ”€β”€ πŸ§‘β€πŸ’Ό Supervisor Brother ← agent in group
β”œβ”€β”€ 🧠 Big Brother
β”œβ”€β”€ πŸ’» Code Brother
└── πŸ” Review Brother

🎨 Design Team (2) ← another group
β”œβ”€β”€ 🎨 Design Brother
└── πŸ–ΌοΈ Visualization Expert

πŸ“‹ Unassigned (3) ← default group for ungrouped
β”œβ”€β”€ πŸ€– QA Agent
β”œβ”€β”€ πŸ“Š Data Analyst
└── πŸ“§ Email Agent
```

### Proposed API Changes /

1. **New field in agent config:** `group` (optional string) for group/category name
```json
{
"profiles": {
"CodingAgent": {
"name": "πŸ’» Code Brother",
"group": "Coding Brothers", // ← NEW
"description": "..."
}
}
}
```

2. **New API endpoint** or modification to `GET /api/agents`:
```json
{
"agents": [...], // flat list (backward compatible)
"groups": { // ← NEW
"Coding Brothers": ["Supervisor", "Orchestrator", "CodingAgent", "ReviewAgent"],
"Design Team": ["DesignAgent"],
"__ungrouped__": ["QA", "DevOps"]
}
}
```

3. **UI enhancement /
- Groups displayed as collapsible sections
- Default group (`__ungrouped__`) for agents without a group
- Drag-and-drop to reorganize between groups (optional, future)
- Group headers remain visible when collapsed

---

## 🎯 Problem /

**EN:** We have a multi-agent coding team of 9 specialized agents (Supervisor, Planner, Coder, Reviewer, Designer, DevOps, Security, QA, Doc). The flat list UI makes it hard to:
- Find a specific agent quickly
- Understand which agents belong to which functional area
- Navigate when the list grows beyond 10-15 agents

The `agent_order` in `config.json` helps with ordering but not with categorization.

## πŸ’‘ Proposed Solution /

### Phase 1 β€” Backend (config + API):
- Add optional `group` field to `AgentProfileRef` in `config.py`
- Add `groups` field to `AgentListResponse`
- Update config watcher to include group changes
- Auto-create `__ungrouped__` for agents without a group

### Phase 2 β€” Frontend (Console UI):
- Add collapsible group sections
- Group header with agent count badge
- Persist expanded/collapsed state
- Drag-and-drop between groups (future enhancement)

### Complexity Estimate /
- Backend: ~50-100 lines of Python (config + router changes)
- Frontend: ~100-200 lines of Vue/React (depends on console framework)
- **Good first issue for contributors** β€” self-contained, clear scope

---

## πŸ”„ Alternatives Considered /
| Approach | Pros | Cons |
|----------|------|------|
| **Naming convention** (e.g., `Team/Name`) | Zero code change | No real collapsible UI |
| **Agent tags** | Flexible | More complex API change |
| **Third-party UI** (custom frontend) | Full control | Loses QwenPaw integration |
| **Proposed: group field** | Minimal change, backward compatible, clean API | Requires both backend + frontend work |

---

## πŸ“Έ Use Case /

I manage a multi-agent coding team with this setup:
```
User β†’ default (Noah) β†’ Supervisor Brother β†’ Big Brother β†’ Coding Brothers pipeline
```

With 9 agents + default = 10 agents in the list. Grouping them would look like:

```
πŸ€– Coding Brothers (4)
β”œβ”€β”€ πŸ§‘β€πŸ’Ό Supervisor
β”œβ”€β”€ 🧠 Big Brother
β”œβ”€β”€ πŸ’» Code Brother
└── πŸ” Review Brother

🎨 Creative Team (2)
β”œβ”€β”€ 🎨 Design Brother
└── πŸ–ΌοΈ Visualization Expert

πŸ›‘οΈ Quality Team (3)
β”œβ”€β”€ πŸ” Security Brother
β”œβ”€β”€ πŸ“Š QA Brother
└── πŸ› οΈ DevOps Brother

πŸ“– Documentation (1)
└── πŸ“– Doc Brother
```

This would make the UI drastically more usable for multi-agent workflows.

---

## πŸ”— Related /

- Issue #929: Session grouping feature request (similar concept, different entity)
- [QwenPaw Multi-Agent Docs](https://github.com/agentscope-ai/QwenPaw#multi-agent)
- Agent config structure: `config.py` β†’ `AgentProfileRef`, `MultiAgentManager`

---

## βœ… Willing to Contribute /

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.