[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CRXHH86TY8F46MVTB56CVR":3,"skill-same:01M6CRXHH86TY8F46MVTB56CVR":63},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":32,"linkOnly":33,"markdownContent":34,"markdownBody":35,"frontMatter":36,"refName":41,"commitSha":42,"skillDirectory":43,"forksCount":44,"repositoryHtmlUrl":45,"repositoryHomepageUrl":46,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":48,"install":49,"resources":62},"01M6CRXHH86TY8F46MVTB56CVR","multi_agent_collaboration",null,"当需要其他 agent 的专长、上下文或协作支持，或用户明确要求调用其他 agent 时，使用本 skill。先查询可用 agents，再用 qwenpaw agents chat 进行双向沟通。","agentscope-ai\u002FQwenPaw","agentscope-ai","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F211762292?v=4","01M6CRT6543BZGGVK3P85GC08Q","AgentScope-AI","01M6CRT698G78F0SPC659YEK6E",37659,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FQwenPaw\u002Fblob\u002Fmain\u002Fsrc\u002Fqwenpaw\u002Fagents\u002Fskills\u002Fmulti_agent_collaboration-zh\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31],"multi agent","multi agent collaboration","collaboration","agent collaboration","multi","协作","chat","qwenpaw","2026-11-10 10:12:30",false,"---\nname: multi_agent_collaboration\ndescription: 当需要其他 agent 的专长、上下文或协作支持，或用户明确要求调用其他 agent 时，使用本 skill。先查询可用 agents，再用 qwenpaw agents chat 进行双向沟通。\nmetadata:\n  builtin_skill_version: \"1.4\"\n  qwenpaw:\n    emoji: \"?\"\n---\n\n# 多智能体协作\n\n## 什么时候用\n\n当你**需要其他 agent 的专业能力、上下文、workspace 内容或协作支持**时，使用本 skill。  \n如果**用户明确要求某个 agent 参与\u002F协助\u002F回答**，也应使用本 skill。\n\n### 应该使用\n- 当前任务明显更适合某个专用 agent\n- 需要另一个 agent 的 workspace \u002F 文件 \u002F 上下文\n- 需要第二意见或专业复核\n- 用户明确要求某个 agent 参与或调用其他 agent\n\n### 不应使用\n- 你自己可以直接完成，且用户没有明确要求调用其他 agent\n- 只是普通问答，不需要专门 agent\n- 信息不足，应先追问用户\n- 刚收到 Agent B 的消息，**不要再调用 Agent B**，避免循环\n\n## 决策规则\n\n1. **如果用户明确要求调用其他 agent，优先按要求执行**\n2. **否则，能自己做，就不要调用**\n3. **调用前先查 agent，不要猜 ID**\n4. **需要上下文续聊时，必须传 `--session-id`**\n5. **不要回调消息来源 agent**\n\n---\n\n## 最常用命令\n\n### 1) 先查询可用 agents\n\n```bash\nqwenpaw agents list\n```\n\n### 2) 发起新对话（实时模式）\n\n```bash\nqwenpaw agents chat \\\n  --from-agent \u003Cyour_agent> \\\n  --to-agent \u003Ctarget_agent> \\\n  --text \"[Agent \u003Cyour_agent> requesting] ...\"\n```\n\n### 3) 发起复杂任务（后台模式）\n\n**复杂任务**包括：数据分析、报告生成、批量处理、外部API调用等。\n\n```bash\nqwenpaw agents chat --background \\\n  --from-agent \u003Cyour_agent> \\\n  --to-agent \u003Ctarget_agent> \\\n  --text \"[Agent \u003Cyour_agent> requesting] ...\"\n```\n\n**输出**：\n```\n[TASK_ID: xxx-xxx-xxx]\n[SESSION: ...]\n```\n\n### 4) 查询后台任务状态\n\n```bash\nqwenpaw agents chat --background --task-id \u003Ctask_id>\n```\n\n**重要**：不要频繁查询！提交任务后：\n1. **不要硬等** - 继续处理其他任务或工作\n2. **等待合理时间后再查** - 根据任务复杂度选择：\n   - 简单分析：10-20 秒后查询\n   - 复杂分析：30-60 秒后查询\n   - 批量处理：1-3 分钟后查询\n3. **在等待期间** - 可以回复用户、处理其他请求、或执行其他任务\n\n### 5) 继续已有对话\n\n```bash\nqwenpaw agents chat \\\n  --from-agent \u003Cyour_agent> \\\n  --to-agent \u003Ctarget_agent> \\\n  --session-id \"\u003Csession_id>\" \\\n  --text \"[Agent \u003Cyour_agent> requesting] ...\"\n```\n\n**重点**:\n- 不传 `--session-id` = 新对话\n- 传 `--session-id` = 续聊（保留上下文）\n- 复杂任务用 `--background`，提交后记录 task_id\n\n---\n\n## 任务模式选择\n\n### 实时模式 vs 后台模式\n\n| 任务类型 | 使用模式 | 命令 |\n|---------|---------|------|\n| 简单快速查询 | 实时模式 | `qwenpaw agents chat` |\n| 复杂任务（数据分析、批量处理等） | 后台模式 | `qwenpaw agents chat --background` |\n\n**复杂任务示例**：\n- 分析大量数据或日志文件\n- 生成详细报告\n- 批量处理文件（10+ 个文件）\n- 调用慢速外部 API\n- 需要并行执行的独立任务\n\n**判断标准**：如果不确定任务会花多长时间，或者任务很复杂，优先使用后台模式。\n\n---\n\n## 最小工作流\n\n### 实时模式工作流\n\n```\n1. 判断是否需要其他 agent，或用户是否明确要求调用\n2. qwenpaw agents list\n3. qwenpaw agents chat 发起对话\n4. 从输出中记录 [SESSION: ...]\n5. 后续需要上下文时带上 --session-id\n```\n\n### 后台模式工作流\n\n```\n1. 判断任务是否复杂（数据分析、报告生成等）\n2. qwenpaw agents list\n3. qwenpaw agents chat --background 提交任务\n4. 从输出中记录 [TASK_ID: ...]\n5. 继续处理其他工作\n6. 等待合理时间（30-60秒）后查询状态\n7. 使用 --background --task-id 查询结果\n```\n\n---\n\n## 关键规则\n\n### 必填参数\n\n`qwenpaw agents chat` 必须同时提供：\n- `--from-agent`\n- `--to-agent`\n- `--text`\n\n### 身份前缀\n\n消息建议以以下前缀开头：\n\n```text\n[Agent my_agent requesting] ...\n```\n\n### 会话复用\n\n首次调用会返回：\n\n```text\n[SESSION: your_agent:to:target_agent:...]\n```\n\n后续续聊必须复制这个 session_id 传入 `--session-id`。\n\n---\n\n## 简短示例\n\n### 用户明确要求调用其他 agent\n\n```bash\nqwenpaw agents list\n\nqwenpaw agents chat \\\n  --from-agent scheduler_bot \\\n  --to-agent finance_bot \\\n  --text \"[Agent scheduler_bot requesting] User explicitly asked to consult finance_bot. 请回答当前待处理的财务任务。\"\n```\n\n### 新对话\n\n```bash\nqwenpaw agents chat \\\n  --from-agent scheduler_bot \\\n  --to-agent finance_bot \\\n  --text \"[Agent scheduler_bot requesting] 今天有哪些待处理的财务任务？\"\n```\n\n### 续聊\n\n```bash\nqwenpaw agents chat \\\n  --from-agent scheduler_bot \\\n  --to-agent finance_bot \\\n  --session-id \"scheduler_bot:to:finance_bot:1710912345:a1b2c3d4\" \\\n  --text \"[Agent scheduler_bot requesting] 展开第2项\"\n```\n\n---\n\n## 常见错误\n\n### 错误 1：没先查 agent\n\n不要猜 agent ID，先执行：\n\n```bash\nqwenpaw agents list\n```\n\n### 错误 2：想续聊但没传 session-id\n\n这会创建新对话，丢失上下文。\n\n### 错误 3：回调来源 agent\n\n如果你刚收到 Agent B 的消息，不要再调用 Agent B。\n\n---\n\n## 可选命令\n\n### 查看已有会话\n\n```bash\nqwenpaw chats list --agent-id \u003Cyour_agent>\n```\n\n### 流式输出\n\n```bash\nqwenpaw agents chat \\\n  --from-agent \u003Cyour_agent> \\\n  --to-agent \u003Ctarget_agent> \\\n  --mode stream \\\n  --text \"[Agent \u003Cyour_agent> requesting] ...\"\n```\n\n### JSON 输出\n\n```bash\nqwenpaw agents chat \\\n  --from-agent \u003Cyour_agent> \\\n  --to-agent \u003Ctarget_agent> \\\n  --json-output \\\n  --text \"[Agent \u003Cyour_agent> requesting] ...\"\n```\n\n---\n\n## 完整参数说明\n\n### qwenpaw agents list\n\n**参数**：\n- `--base-url`（可选）：覆盖API地址\n\n**无必填参数**，直接运行即可。\n\n### qwenpaw agents chat\n\n**必填参数**（实时模式）：\n- `--from-agent`：发起方agent ID\n- `--to-agent`：目标agent ID\n- `--text`：消息内容\n\n**后台任务参数**（新增）：\n- `--background`：后台任务模式\n- `--task-id`：查询任务状态（与 --background 一起使用）\n\n**可选参数**：\n- `--session-id`：复用会话上下文（从之前的输出中复制）\n- `--new-session`：强制创建新会话（即使传了session-id）\n- `--mode`：stream（流式）或 final（完整，默认）\n- `--timeout`：超时时间（秒，默认300）\n- `--json-output`：输出完整JSON而非纯文本\n- `--base-url`：覆盖API地址\n\n---\n\n## 后台任务模式详解（Background Task）\n\n### 什么时候用后台模式？\n\n当任务是**复杂任务**时，使用 `--background` 提交到后台：\n\n✅ **应该使用后台模式**：\n- 数据分析（分析日志、统计数据）\n- 报告生成（生成长篇报告、文档）\n- 批量处理（处理多个文件）\n- 外部 API 调用（调用慢速服务）\n- 不确定任务时长的复杂任务\n\n❌ **不需要后台模式**：\n- 简单快速查询\n- 明确知道很快完成的任务\n\n### 后台任务示例\n\n#### 提交复杂任务\n\n```bash\nqwenpaw agents chat --background \\\n  --from-agent scheduler \\\n  --to-agent data_analyst \\\n  --text \"[Agent scheduler requesting] 分析 \u002Fdata\u002Flogs\u002F2026-03-26.log 中的用户行为，生成详细报告\"\n```\n\n**输出**：\n```\n[TASK_ID: 20802ea3-832d-4fb4-86f0-666ad79fcc80]\n[SESSION: scheduler:to:data_analyst:1774516703206:ec02e542]\n\n✅ Task submitted successfully\n\nCheck status with:\n  qwenpaw agents chat --background --task-id 20802ea3-...\n```\n\n#### 查询任务状态\n\n**重要**：提交后不要硬等！\n\n1. **继续处理其他工作** - 回复用户其他问题、执行其他任务\n2. **在合适时机查询** - 处理完其他工作后，或用户询问进度时\n3. **如果必须等待** - 使用合理间隔（10-60秒），不要立即查询\n\n```bash\n# 方式 1：处理其他任务后再查（推荐）\n# 提交任务后，继续完成用户的其他请求\n# 在适当时机查询：\nqwenpaw agents chat --background \\\n  --task-id 20802ea3-832d-4fb4-86f0-666ad79fcc80\n\n# 方式 2：如果必须等待，使用合理间隔\nsleep 30 && qwenpaw agents chat --background \\\n  --task-id 20802ea3-832d-4fb4-86f0-666ad79fcc80\n```\n\n**状态说明**：\n\n任务状态分为两层：\n- **外层状态**（API 返回）：`submitted` → `pending` → `running` → `finished`\n- **内层状态**（仅当外层是 `finished` 时）：`completed`（成功）或 `failed`（失败）\n\n**可能的输出**：\n\n1. **已提交**（刚提交后立即查询可能看到）：\n```\n[TASK_ID: 20802ea3-832d-4fb4-86f0-666ad79fcc80]\n[STATUS: submitted]\n\n? Task submitted, waiting to start...\n\n? Don't wait - continue with other work!\n   Check again in a few seconds:\n  qwenpaw agents chat --background --task-id 20802ea3-...\n```\n\n2. **等待执行**：\n```\n[TASK_ID: 20802ea3-832d-4fb4-86f0-666ad79fcc80]\n[STATUS: pending]\n\n⏸️  Task is pending in queue...\n\n? Don't wait - handle other work first!\n   Check again in a few seconds:\n  qwenpaw agents chat --background --task-id 20802ea3-...\n```\n\n4. **正在执行**：\n```\n[TASK_ID: 20802ea3-832d-4fb4-86f0-666ad79fcc80]\n[STATUS: running]\n\n⏳ Task is still running...\n   Started at: 1774516703\n\n? Don't wait - continue with other tasks first!\n   Check again later (10-30s):\n  qwenpaw agents chat --background --task-id 20802ea3-...\n```\n\n5. **成功完成**：\n```\n[TASK_ID: 20802ea3-832d-4fb4-86f0-666ad79fcc80]\n[STATUS: finished]\n\n✅ Task completed\n\n（任务结果内容...）\n```\n\n6. **执行失败**：\n```\n[TASK_ID: 20802ea3-832d-4fb4-86f0-666ad79fcc80]\n[STATUS: finished]\n\n❌ Task failed\n\nError: （错误信息...）\n```\n\n### 查询间隔策略\n\n**不要频繁查询！** 提交任务后应该：\n\n1. **继续处理其他工作** - 不要硬等，去完成其他任务\n2. **等待合理时间后再查** - 根据任务复杂度选择间隔\n3. **避免阻塞当前流程** - 这是后台任务的核心价值\n\n| 任务类型 | 建议首次查询 | 后续间隔 | 等待期间做什么 |\n|---------|------------|---------|--------------|\n| 简单分析 | 10 秒后 | 5-10 秒 | 处理其他用户请求 |\n| 复杂分析 | 30 秒后 | 10-20 秒 | 完成当前对话其他部分 |\n| 批量处理 | 1 分钟后 | 20-30 秒 | 执行其他独立任务 |\n| 超大任务 | 2 分钟后 | 30-60 秒 | 继续用户的其他工作 |\n\n#### ✅ 推荐做法\n\n**方式 1：处理其他任务后再查**（推荐）\n```bash\n# 1. 提交任务，记录 task_id\nqwenpaw agents chat --background ... \n# 返回 task_id\n\n# 2. 继续处理用户的其他请求或任务\n# （比如回答其他问题、执行其他操作）\n\n# 3. 在适当时机查询结果\n# （比如处理完当前任务后，或用户询问进度时）\nqwenpaw agents chat --background --task-id \u003Cid>\n```\n\n**方式 2：定时轮询**（如果必须等待）\n```bash\n# 递增间隔，先快后慢\nsleep 10 && qwenpaw agents chat --background --task-id \u003Cid>\nsleep 20 && qwenpaw agents chat --background --task-id \u003Cid>\nsleep 30 && qwenpaw agents chat --background --task-id \u003Cid>\n```\n\n#### ❌ 不要这样做\n\n```bash\n# 错误：查询太频繁\nwhile true; do\n    qwenpaw agents chat --background --task-id \u003Cid>\n    sleep 1  # 太频繁了！\ndone\n```\n\n---\n\n## 帮助信息\n\n随时使用 `-h` 查看详细帮助：\n\n```bash\nqwenpaw agents -h\nqwenpaw agents list -h\nqwenpaw agents chat -h\n```\n","# 多智能体协作\n\n## 什么时候用\n\n当你**需要其他 agent 的专业能力、上下文、workspace 内容或协作支持**时，使用本 skill。  \n如果**用户明确要求某个 agent 参与\u002F协助\u002F回答**，也应使用本 skill。\n\n### 应该使用\n- 当前任务明显更适合某个专用 agent\n- 需要另一个 agent 的 workspace \u002F 文件 \u002F 上下文\n- 需要第二意见或专业复核\n- 用户明确要求某个 agent 参与或调用其他 agent\n\n### 不应使用\n- 你自己可以直接完成，且用户没有明确要求调用其他 agent\n- 只是普通问答，不需要专门 agent\n- 信息不足，应先追问用户\n- 刚收到 Agent B 的消息，**不要再调用 Agent B**，避免循环\n\n## 决策规则\n\n1. **如果用户明确要求调用其他 agent，优先按要求执行**\n2. **否则，能自己做，就不要调用**\n3. **调用前先查 agent，不要猜 ID**\n4. **需要上下文续聊时，必须传 `--session-id`**\n5. **不要回调消息来源 agent**\n\n---\n\n## 最常用命令\n\n### 1) 先查询可用 agents\n\n```bash\nqwenpaw agents list\n```\n\n### 2) 发起新对话（实时模式）\n\n```bash\nqwenpaw agents chat \\\n  --from-agent \u003Cyour_agent> \\\n  --to-agent \u003Ctarget_agent> \\\n  --text \"[Agent \u003Cyour_agent> requesting] ...\"\n```\n\n### 3) 发起复杂任务（后台模式）\n\n**复杂任务**包括：数据分析、报告生成、批量处理、外部API调用等。\n\n```bash\nqwenpaw agents chat --background \\\n  --from-agent \u003Cyour_agent> \\\n  --to-agent \u003Ctarget_agent> \\\n  --text \"[Agent \u003Cyour_agent> requesting] ...\"\n```\n\n**输出**：\n```\n[TASK_ID: xxx-xxx-xxx]\n[SESSION: ...]\n```\n\n### 4) 查询后台任务状态\n\n```bash\nqwenpaw agents chat --background --task-id \u003Ctask_id>\n```\n\n**重要**：不要频繁查询！提交任务后：\n1. **不要硬等** - 继续处理其他任务或工作\n2. **等待合理时间后再查** - 根据任务复杂度选择：\n   - 简单分析：10-20 秒后查询\n   - 复杂分析：30-60 秒后查询\n   - 批量处理：1-3 分钟后查询\n3. **在等待期间** - 可以回复用户、处理其他请求、或执行其他任务\n\n### 5) 继续已有对话\n\n```bash\nqwenpaw agents chat \\\n  --from-agent \u003Cyour_agent> \\\n  --to-agent \u003Ctarget_agent> \\\n  --session-id \"\u003Csession_id>\" \\\n  --text \"[Agent \u003Cyour_agent> requesting] ...\"\n```\n\n**重点**:\n- 不传 `--session-id` = 新对话\n- 传 `--session-id` = 续聊（保留上下文）\n- 复杂任务用 `--background`，提交后记录 task_id\n\n---\n\n## 任务模式选择\n\n### 实时模式 vs 后台模式\n\n| 任务类型 | 使用模式 | 命令 |\n|---------|---------|------|\n| 简单快速查询 | 实时模式 | `qwenpaw agents chat` |\n| 复杂任务（数据分析、批量处理等） | 后台模式 | `qwenpaw agents chat --background` |\n\n**复杂任务示例**：\n- 分析大量数据或日志文件\n- 生成详细报告\n- 批量处理文件（10+ 个文件）\n- 调用慢速外部 API\n- 需要并行执行的独立任务\n\n**判断标准**：如果不确定任务会花多长时间，或者任务很复杂，优先使用后台模式。\n\n---\n\n## 最小工作流\n\n### 实时模式工作流\n\n```\n1. 判断是否需要其他 agent，或用户是否明确要求调用\n2. qwenpaw agents list\n3. qwenpaw agents chat 发起对话\n4. 从输出中记录 [SESSION: ...]\n5. 后续需要上下文时带上 --session-id\n```\n\n### 后台模式工作流\n\n```\n1. 判断任务是否复杂（数据分析、报告生成等）\n2. qwenpaw agents list\n3. qwenpaw agents chat --background 提交任务\n4. 从输出中记录 [TASK_ID: ...]\n5. 继续处理其他工作\n6. 等待合理时间（30-60秒）后查询状态\n7. 使用 --background --task-id 查询结果\n```\n\n---\n\n## 关键规则\n\n### 必填参数\n\n`qwenpaw agents chat` 必须同时提供：\n- `--from-agent`\n- `--to-agent`\n- `--text`\n\n### 身份前缀\n\n消息建议以以下前缀开头：\n\n```text\n[Agent my_agent requesting] ...\n```\n\n### 会话复用\n\n首次调用会返回：\n\n```text\n[SESSION: your_agent:to:target_agent:...]\n```\n\n后续续聊必须复制这个 session_id 传入 `--session-id`。\n\n---\n\n## 简短示例\n\n### 用户明确要求调用其他 agent\n\n```bash\nqwenpaw agents list\n\nqwenpaw agents chat \\\n  --from-agent scheduler_bot \\\n  --to-agent finance_bot \\\n  --text \"[Agent scheduler_bot requesting] User explicitly asked to consult finance_bot. 请回答当前待处理的财务任务。\"\n```\n\n### 新对话\n\n```bash\nqwenpaw agents chat \\\n  --from-agent scheduler_bot \\\n  --to-agent finance_bot \\\n  --text \"[Agent scheduler_bot requesting] 今天有哪些待处理的财务任务？\"\n```\n\n### 续聊\n\n```bash\nqwenpaw agents chat \\\n  --from-agent scheduler_bot \\\n  --to-agent finance_bot \\\n  --session-id \"scheduler_bot:to:finance_bot:1710912345:a1b2c3d4\" \\\n  --text \"[Agent scheduler_bot requesting] 展开第2项\"\n```\n\n---\n\n## 常见错误\n\n### 错误 1：没先查 agent\n\n不要猜 agent ID，先执行：\n\n```bash\nqwenpaw agents list\n```\n\n### 错误 2：想续聊但没传 session-id\n\n这会创建新对话，丢失上下文。\n\n### 错误 3：回调来源 agent\n\n如果你刚收到 Agent B 的消息，不要再调用 Agent B。\n\n---\n\n## 可选命令\n\n### 查看已有会话\n\n```bash\nqwenpaw chats list --agent-id \u003Cyour_agent>\n```\n\n### 流式输出\n\n```bash\nqwenpaw agents chat \\\n  --from-agent \u003Cyour_agent> \\\n  --to-agent \u003Ctarget_agent> \\\n  --mode stream \\\n  --text \"[Agent \u003Cyour_agent> requesting] ...\"\n```\n\n### JSON 输出\n\n```bash\nqwenpaw agents chat \\\n  --from-agent \u003Cyour_agent> \\\n  --to-agent \u003Ctarget_agent> \\\n  --json-output \\\n  --text \"[Agent \u003Cyour_agent> requesting] ...\"\n```\n\n---\n\n## 完整参数说明\n\n### qwenpaw agents list\n\n**参数**：\n- `--base-url`（可选）：覆盖API地址\n\n**无必填参数**，直接运行即可。\n\n### qwenpaw agents chat\n\n**必填参数**（实时模式）：\n- `--from-agent`：发起方agent ID\n- `--to-agent`：目标agent ID\n- `--text`：消息内容\n\n**后台任务参数**（新增）：\n- `--background`：后台任务模式\n- `--task-id`：查询任务状态（与 --background 一起使用）\n\n**可选参数**：\n- `--session-id`：复用会话上下文（从之前的输出中复制）\n- `--new-session`：强制创建新会话（即使传了session-id）\n- `--mode`：stream（流式）或 final（完整，默认）\n- `--timeout`：超时时间（秒，默认300）\n- `--json-output`：输出完整JSON而非纯文本\n- `--base-url`：覆盖API地址\n\n---\n\n## 后台任务模式详解（Background Task）\n\n### 什么时候用后台模式？\n\n当任务是**复杂任务**时，使用 `--background` 提交到后台：\n\n✅ **应该使用后台模式**：\n- 数据分析（分析日志、统计数据）\n- 报告生成（生成长篇报告、文档）\n- 批量处理（处理多个文件）\n- 外部 API 调用（调用慢速服务）\n- 不确定任务时长的复杂任务\n\n❌ **不需要后台模式**：\n- 简单快速查询\n- 明确知道很快完成的任务\n\n### 后台任务示例\n\n#### 提交复杂任务\n\n```bash\nqwenpaw agents chat --background \\\n  --from-agent scheduler \\\n  --to-agent data_analyst \\\n  --text \"[Agent scheduler requesting] 分析 \u002Fdata\u002Flogs\u002F2026-03-26.log 中的用户行为，生成详细报告\"\n```\n\n**输出**：\n```\n[TASK_ID: 20802ea3-832d-4fb4-86f0-666ad79fcc80]\n[SESSION: scheduler:to:data_analyst:1774516703206:ec02e542]\n\n✅ Task submitted successfully\n\nCheck status with:\n  qwenpaw agents chat --background --task-id 20802ea3-...\n```\n\n#### 查询任务状态\n\n**重要**：提交后不要硬等！\n\n1. **继续处理其他工作** - 回复用户其他问题、执行其他任务\n2. **在合适时机查询** - 处理完其他工作后，或用户询问进度时\n3. **如果必须等待** - 使用合理间隔（10-60秒），不要立即查询\n\n```bash\n# 方式 1：处理其他任务后再查（推荐）\n# 提交任务后，继续完成用户的其他请求\n# 在适当时机查询：\nqwenpaw agents chat --background \\\n  --task-id 20802ea3-832d-4fb4-86f0-666ad79fcc80\n\n# 方式 2：如果必须等待，使用合理间隔\nsleep 30 && qwenpaw agents chat --background \\\n  --task-id 20802ea3-832d-4fb4-86f0-666ad79fcc80\n```\n\n**状态说明**：\n\n任务状态分为两层：\n- **外层状态**（API 返回）：`submitted` → `pending` → `running` → `finished`\n- **内层状态**（仅当外层是 `finished` 时）：`completed`（成功）或 `failed`（失败）\n\n**可能的输出**：\n\n1. **已提交**（刚提交后立即查询可能看到）：\n```\n[TASK_ID: 20802ea3-832d-4fb4-86f0-666ad79fcc80]\n[STATUS: submitted]\n\n? Task submitted, waiting to start...\n\n? Don't wait - continue with other work!\n   Check again in a few seconds:\n  qwenpaw agents chat --background --task-id 20802ea3-...\n```\n\n2. **等待执行**：\n```\n[TASK_ID: 20802ea3-832d-4fb4-86f0-666ad79fcc80]\n[STATUS: pending]\n\n⏸️  Task is pending in queue...\n\n? Don't wait - handle other work first!\n   Check again in a few seconds:\n  qwenpaw agents chat --background --task-id 20802ea3-...\n```\n\n4. **正在执行**：\n```\n[TASK_ID: 20802ea3-832d-4fb4-86f0-666ad79fcc80]\n[STATUS: running]\n\n⏳ Task is still running...\n   Started at: 1774516703\n\n? Don't wait - continue with other tasks first!\n   Check again later (10-30s):\n  qwenpaw agents chat --background --task-id 20802ea3-...\n```\n\n5. **成功完成**：\n```\n[TASK_ID: 20802ea3-832d-4fb4-86f0-666ad79fcc80]\n[STATUS: finished]\n\n✅ Task completed\n\n（任务结果内容...）\n```\n\n6. **执行失败**：\n```\n[TASK_ID: 20802ea3-832d-4fb4-86f0-666ad79fcc80]\n[STATUS: finished]\n\n❌ Task failed\n\nError: （错误信息...）\n```\n\n### 查询间隔策略\n\n**不要频繁查询！** 提交任务后应该：\n\n1. **继续处理其他工作** - 不要硬等，去完成其他任务\n2. **等待合理时间后再查** - 根据任务复杂度选择间隔\n3. **避免阻塞当前流程** - 这是后台任务的核心价值\n\n| 任务类型 | 建议首次查询 | 后续间隔 | 等待期间做什么 |\n|---------|------------|---------|--------------|\n| 简单分析 | 10 秒后 | 5-10 秒 | 处理其他用户请求 |\n| 复杂分析 | 30 秒后 | 10-20 秒 | 完成当前对话其他部分 |\n| 批量处理 | 1 分钟后 | 20-30 秒 | 执行其他独立任务 |\n| 超大任务 | 2 分钟后 | 30-60 秒 | 继续用户的其他工作 |\n\n#### ✅ 推荐做法\n\n**方式 1：处理其他任务后再查**（推荐）\n```bash\n# 1. 提交任务，记录 task_id\nqwenpaw agents chat --background ... \n# 返回 task_id\n\n# 2. 继续处理用户的其他请求或任务\n# （比如回答其他问题、执行其他操作）\n\n# 3. 在适当时机查询结果\n# （比如处理完当前任务后，或用户询问进度时）\nqwenpaw agents chat --background --task-id \u003Cid>\n```\n\n**方式 2：定时轮询**（如果必须等待）\n```bash\n# 递增间隔，先快后慢\nsleep 10 && qwenpaw agents chat --background --task-id \u003Cid>\nsleep 20 && qwenpaw agents chat --background --task-id \u003Cid>\nsleep 30 && qwenpaw agents chat --background --task-id \u003Cid>\n```\n\n#### ❌ 不要这样做\n\n```bash\n# 错误：查询太频繁\nwhile true; do\n    qwenpaw agents chat --background --task-id \u003Cid>\n    sleep 1  # 太频繁了！\ndone\n```\n\n---\n\n## 帮助信息\n\n随时使用 `-h` 查看详细帮助：\n\n```bash\nqwenpaw agents -h\nqwenpaw agents list -h\nqwenpaw agents chat -h\n```\n",{"name":5,"metadata":37,"description":7},{"qwenpaw":38,"builtin_skill_version":40},{"emoji":39},"?","1.4","main","c26d31c0688aa9cce9bc1aef688177d2e14e25df","src\u002Fqwenpaw\u002Fagents\u002Fskills\u002Fmulti_agent_collaboration-zh",3282,"https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FQwenPaw","http:\u002F\u002Fqwenpaw.agentscope.io\u002F","https:\u002F\u002Fgithub.com\u002Fagentscope-ai","2026-11-12 17:02:12",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add agentscope-ai\u002FQwenPaw --skill multi_agent_collaboration",{"tool":55,"command":56},"bunx","bunx skills add agentscope-ai\u002FQwenPaw --skill multi_agent_collaboration",{"tool":58,"command":59},"pnpm","pnpm dlx skills add agentscope-ai\u002FQwenPaw --skill multi_agent_collaboration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FQwenPaw\u002Fblob\u002Fmain\u002Fsrc\u002Fqwenpaw\u002Fagents\u002Fskills\u002Fmulti_agent_collaboration-zh\u002FSKILL.md",true,[],[64,78,91,101,113,131],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":71,"publishedAt":32},"01M6CRZ8QQ6RWS9P0PBDZDZSY8","portable-qoder","A stable standalone Qoder fixture Skill.","https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FQwenPaw\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fportability\u002Fqoder-mini\u002Fskills\u002Fportable-qoder\u002FSKILL.md",[70],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[72,73,74,75,76,77],"portable","qoder","portable qoder","fixture skill","fixture","standalone",{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":89,"publishedAt":32},"01M6CRZ61PNG319SVCYZZVC7HA","report","Report fixture status.","https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FQwenPaw\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fportability\u002Fqoder-mini\u002Fplugins\u002Fcustom\u002Fmini-plugin-0.1.0\u002Fskills\u002Freport\u002FSKILL.md",[84],{"categoryNo":85,"categoryName":86,"taxonomyType":87,"taxonomyTypeDesc":88},"01JBSEEDCAT000000000000034","行政与办公人员","PROFESSION","适用职业",[80,90,76],"status",{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":98,"publishedAt":32},"01M6CRZ3PTN8ZGW30RHF081Z00","portable-skill","A stable standalone Codex fixture Skill.","https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FQwenPaw\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fportability\u002Fcodex-mini\u002Fskills\u002Fportable-skill\u002FSKILL.md",[97],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[72,99,100,75,76,77],"portable skill","codex",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":32},"01M6CRZ1DNK71D5M63SQ3SPTMH","building-native-ui","Build a small native interface.","https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FQwenPaw\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fportability\u002Fcodex-mini\u002Fplugins\u002Fcache\u002Fmini-market\u002Fexpo\u002F1.0.0\u002Fskills\u002Fbuilding-native-ui\u002FSKILL.md",[],[108,109,110,111,112],"native","ui","building native ui","build","interface",{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":120,"publishedAt":32},"01M6CRYYTRG56E165X66FRWZC8","browser_visible","当用户需要控制 browser 的浏览器启动方式时，使用本 skill。browser 默认由 Playwright 直接管理、不开放调试端口（需让其他本地工具附加时显式传 `cdp_port`）；`headed` 控制是否显示窗口，`private_mode` 保留用于兼容、不再改变默认行为，`browser_args` 传入额外的 Chromium 启动参数，`executable_path` 指定自定义浏览器可执行文件路径。","https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FQwenPaw\u002Fblob\u002Fmain\u002Fsrc\u002Fqwenpaw\u002Fagents\u002Ftools\u002Fdeprecated_browser\u002Fskills\u002Fbrowser_visible-zh\u002FSKILL.md",[119],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[121,122,123,124,125,126,127,128,129,130],"browser visible","browser","path","chromium","playwright","cdp","port","文件","工具","mode",{"skillNo":132,"name":115,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":137,"publishedAt":32},"01M6CRYVQ9DMBB2EN4JFWC4R7F","Use this skill when the user needs to control the browser launch mode for browser. By default browser is managed by Playwright and opens no debugging port (pass an explicit `cdp_port` to let another local tool attach); `headed` controls whether the window is visible, and `private_mode` is kept for backward compatibility and no longer changes the default.","https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FQwenPaw\u002Fblob\u002Fmain\u002Fsrc\u002Fqwenpaw\u002Fagents\u002Ftools\u002Fdeprecated_browser\u002Fskills\u002Fbrowser_visible-en\u002FSKILL.md",[136],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[121,122,138,139,140,141,142,143,144,145,146,147,148,127,130,149,150,151,152,126,153,125],"user","compatibility","default","use","tool","debugging","launch","when","local","control","controls","for","changes","window","managed","attach"]