$npx -y skills add agentscope-ai/QwenPaw --skill multi_agent_collaboration-enUse this skill when another agent's expertise or context is needed, or when the user explicitly asks to involve another agent. First list agents, then use qwenpaw agents chat for two-way communication with replies.
| 1 | # Multi-Agent Collaboration |
| 2 | |
| 3 | ## When to Use |
| 4 | |
| 5 | Use this skill when you **need another agent's expertise, context, workspace content, or collaborative support**. |
| 6 | If the **user explicitly asks a specific agent to participate/assist/answer**, you should also use this skill. |
| 7 | |
| 8 | ### Should Use |
| 9 | - The current task is clearly better suited for a specialized agent |
| 10 | - You need another agent's workspace / files / context |
| 11 | - You need a second opinion or expert review |
| 12 | - The user explicitly asks for a specific agent to participate or to invoke another agent |
| 13 | |
| 14 | ### Should Not Use |
| 15 | - You can complete the task on your own and the user has not explicitly asked to invoke another agent |
| 16 | - It is just a normal Q&A that does not require a specialized agent |
| 17 | - Information is insufficient -- you should ask the user for clarification first |
| 18 | - You just received a message from Agent B -- **do not call Agent B again** to avoid loops |
| 19 | |
| 20 | ## Decision Rules |
| 21 | |
| 22 | 1. **If the user explicitly requests invoking another agent, prioritize following the request** |
| 23 | 2. **Otherwise, if you can do it yourself, do not invoke another agent** |
| 24 | 3. **Check agents before invoking -- do not guess IDs** |
| 25 | 4. **When context continuation is needed, you must pass `--session-id`** |
| 26 | 5. **Do not call back the source agent** |
| 27 | |
| 28 | --- |
| 29 | |
| 30 | ## Most Common Commands |
| 31 | |
| 32 | ### 1) First Query Available Agents |
| 33 | |
| 34 | ```bash |
| 35 | qwenpaw agents list |
| 36 | ``` |
| 37 | |
| 38 | ### 2) Start a New Conversation (Real-time Mode) |
| 39 | |
| 40 | ```bash |
| 41 | qwenpaw agents chat \ |
| 42 | --from-agent <your_agent> \ |
| 43 | --to-agent <target_agent> \ |
| 44 | --text "[Agent <your_agent> requesting] ..." |
| 45 | ``` |
| 46 | |
| 47 | ### 3) Submit a Complex Task (Background Mode) |
| 48 | |
| 49 | **Complex tasks** include: data analysis, report generation, batch processing, external API calls, etc. |
| 50 | |
| 51 | ```bash |
| 52 | qwenpaw agents chat --background \ |
| 53 | --from-agent <your_agent> \ |
| 54 | --to-agent <target_agent> \ |
| 55 | --text "[Agent <your_agent> requesting] ..." |
| 56 | ``` |
| 57 | |
| 58 | **Output**: |
| 59 | ``` |
| 60 | [TASK_ID: xxx-xxx-xxx] |
| 61 | [SESSION: ...] |
| 62 | ``` |
| 63 | |
| 64 | ### 4) Query Background Task Status |
| 65 | |
| 66 | ```bash |
| 67 | qwenpaw agents chat --background --task-id <task_id> |
| 68 | ``` |
| 69 | |
| 70 | **Important**: Do not query frequently! After submitting a task: |
| 71 | 1. **Do not block** - Continue handling other tasks or work |
| 72 | 2. **Wait a reasonable time before querying** - Choose based on task complexity: |
| 73 | - Simple analysis: query after 10-20 seconds |
| 74 | - Complex analysis: query after 30-60 seconds |
| 75 | - Batch processing: query after 1-3 minutes |
| 76 | 3. **During the wait** - You can reply to the user, handle other requests, or execute other tasks |
| 77 | |
| 78 | ### 5) Continue an Existing Conversation |
| 79 | |
| 80 | ```bash |
| 81 | qwenpaw agents chat \ |
| 82 | --from-agent <your_agent> \ |
| 83 | --to-agent <target_agent> \ |
| 84 | --session-id "<session_id>" \ |
| 85 | --text "[Agent <your_agent> requesting] ..." |
| 86 | ``` |
| 87 | |
| 88 | **Key points**: |
| 89 | - Not passing `--session-id` = new conversation |
| 90 | - Passing `--session-id` = continue conversation (context preserved) |
| 91 | - Use `--background` for complex tasks; record the task_id after submission |
| 92 | |
| 93 | --- |
| 94 | |
| 95 | ## Task Mode Selection |
| 96 | |
| 97 | ### Real-time Mode vs Background Mode |
| 98 | |
| 99 | | Task Type | Mode to Use | Command | |
| 100 | |-----------|-------------|---------| |
| 101 | | Simple quick query | Real-time mode | `qwenpaw agents chat` | |
| 102 | | Complex task (data analysis, batch processing, etc.) | Background mode | `qwenpaw agents chat --background` | |
| 103 | |
| 104 | **Examples of complex tasks**: |
| 105 | - Analyzing large amounts of data or log files |
| 106 | - Generating detailed reports |
| 107 | - Batch processing files (10+ files) |
| 108 | - Calling slow external APIs |
| 109 | - Independent tasks that need parallel execution |
| 110 | |
| 111 | **Decision criteria**: If you are unsure how long a task will take, or if the task is complex, prefer background mode. |
| 112 | |
| 113 | --- |
| 114 | |
| 115 | ## Minimal Workflow |
| 116 | |
| 117 | ### Real-time Mode Workflow |
| 118 | |
| 119 | ``` |
| 120 | 1. Determine whether another agent is needed, or whether the user explicitly requested it |
| 121 | 2. qwenpaw agents list |
| 122 | 3. qwenpaw agents chat to start a conversation |
| 123 | 4. Record [SESSION: ...] from the output |
| 124 | 5. Include --session-id when context continuation is needed later |
| 125 | ``` |
| 126 | |
| 127 | ### Background Mode Workflow |
| 128 | |
| 129 | ``` |
| 130 | 1. Determine whether the task is complex (data analysis, report generation, etc.) |
| 131 | 2. qwenpaw agents list |
| 132 | 3. qwenpaw agents chat --background to submit the task |
| 133 | 4. Record [TASK_ID: ...] from the output |
| 134 | 5. Continue handling other work |
| 135 | 6. Wait a reasonable time (30-60 seconds) before querying status |
| 136 | 7. Use --background --task-id to query results |
| 137 | ``` |
| 138 | |
| 139 | --- |
| 140 | |
| 141 | ## Key Rules |
| 142 | |
| 143 | ### Required Parameters |
| 144 | |
| 145 | `qwenpaw agents chat` must include all of the following: |
| 146 | - `--from-agent` |
| 147 | - `--to-agent` |
| 148 | - `--text` |
| 149 | |
| 150 | ### Identity Prefix |
| 151 | |
| 152 | Messages should begin with the following prefix: |
| 153 | |
| 154 | ```text |
| 155 | [Agent my_agent requesting] ... |
| 156 | ``` |
| 157 | |
| 158 | ### Session Reuse |
| 159 | |
| 160 | The first call will return: |
| 161 | |
| 162 | ```text |
| 163 | [SESSION: your_agent:to:target_agent:...] |
| 164 | ``` |
| 165 | |
| 166 | For subsequent f |