Agent Skillsagentscope-ai/QwenPaw › chat_with_agent

chat_with_agent

GitHub

用于协调多智能体协作的 Skill,支持查询可用代理、发起前台对话或提交后台任务,确保上下文连贯并避免循环调用。

src/qwenpaw/agents/skills/chat_with_agent-en/SKILL.md agentscope-ai/QwenPaw

触发场景

用户明确要求与特定智能体交流 需要其他智能体的专业知识或决策支持 请求智能体进行计划制定、代码审查或建议

安装

npx skills add agentscope-ai/QwenPaw --skill chat_with_agent -g -y
更多选项

非标准路径

npx skills add https://github.com/agentscope-ai/QwenPaw/tree/main/src/qwenpaw/agents/skills/chat_with_agent-en -g -y

不安装直接使用

npx skills use agentscope-ai/QwenPaw@chat_with_agent

指定 Agent (Claude Code)

npx skills add agentscope-ai/QwenPaw --skill chat_with_agent -a claude-code -g -y

安装 repo 全部 skill

npx skills add agentscope-ai/QwenPaw --all -g -y

预览 repo 内 skill

npx skills add agentscope-ai/QwenPaw --list

SKILL.md

Frontmatter
{
    "name": "chat_with_agent",
    "metadata": {
        "qwenpaw": {
            "emoji": "💬"
        },
        "builtin_skill_version": "1.2"
    },
    "description": "Use this skill when you need to consult another agent, ask for help, or involve a specific agent the user asked for."
}

Chat with Agent

When to Use

Use this skill when you need to ask another agent a question, seek help, request a plan, request a review, request decision support, or engage in any form of communication. If the user explicitly asks to talk to a specific agent, you should also use this skill.

Should Use

  • You need another agent's expertise, judgment, or second opinion
  • You need to request a plan, review, or recommendation from an agent
  • The user explicitly asks a specific agent to participate, assist, or answer
  • You need to continue an existing agent session while preserving context

Should Not Use

  • You can complete the task yourself and the user has not explicitly asked to involve another agent
  • It is a simple Q&A that does not require a specialized agent
  • The target agent is unclear — you should ask for clarification or list available agents first
  • You just received a message from an agent and are about to immediately call back the same agent, which may cause a loop

Decision Rules

  1. If the user explicitly requests a specific agent, follow that request — but still look up the agent first; do not guess the ID
  2. If you can complete the task yourself, do not call another agent
  3. When continuing a conversation, you must pass session_id
  4. By default, prefer using list_agents() and chat_with_agent(...) for foreground conversations — do not resort to other methods
  5. If the task should run in the background, use submit_to_agent(...) to submit it, then check_agent_task(...) to check the status

Usage Flow

Follow this flow strictly when using this skill:

  1. Ensure your tool list includes both list_agents() and chat_with_agent(...) built-in tools
  • These two tools are the foundation for communicating with other agents — do not remove or disable them
  • If you do not have these tools, inform the user that you need them to talk to other agents, and ask the user to add them
  1. Use list_agents() to view the currently available agents, and select one by extracting its ID
  • Choose the most appropriate agent based on the user's needs and each agent's description
  • If no suitable agent is found and you are not the Default Agent, use the Default Agent
  • Otherwise, inform the user that no suitable agent is available, and suggest they create a new agent or adjust existing agent descriptions for better matching
  1. Call chat_with_agent(...) to initiate a foreground conversation. Key parameters include:
  • to_agent: the target agent's ID (note: this is the ID, not the name)
  • text: what you want to say to the target agent
  • session_id: (optional) if you need multiple rounds of conversation with the same agent, pass the same session_id starting from the second round to maintain context continuity
  • timeout: (optional) estimated time needed for the foreground wait, to avoid premature timeouts
  1. If the task is better suited for background execution, use the background tool path:
  • submit_to_agent(...): submit a background task — requires to_agent, text, and optionally session_id / task_timeout
    • Default execution budget is 3600 seconds (1 hour) when task_timeout is omitted
    • For work that may exceed 1 hour, pass an explicit positive task_timeout in seconds
    • Numeric strings such as "7200" are accepted
  • check_agent_task(...): check task status by task_id; returns the final result when complete
    • On timeout the task finishes as failed with an error like Task timed out after Ns (and code=timeout in the API payload)

Minimal Call Examples

New Conversation

list_agents()

chat_with_agent(
  to_agent="<target_agent_id>",
  text="[Agent <your_agent_id> requesting] I need your help determining the approach for this issue.",
)

Continuing an Existing Conversation

chat_with_agent(
  to_agent="<target_agent_id>",
  text="[Agent <your_agent_id> requesting] Please continue expanding on point 2 based on the previous conclusion.",
  session_id="<previous_session_id>",
)

Background Submission and Status Check

submit_to_agent(
  to_agent="<target_agent_id>",
  text="[Agent <your_agent_id> requesting] Please complete this longer task in the background.",
  task_timeout=7200,
)

check_agent_task(
  task_id="<task_id>",
)

Important Notes

  • Add a conversation identifier: it is recommended to start your message with:
[Agent <your_agent_id> requesting]

This helps the other agent clearly identify who is speaking, improving communication efficiency and accuracy.

  • Reuse sessions wisely: if you need multiple rounds of conversation with the same agent, be sure to pass the same session_id to maintain context continuity. Otherwise, each call is treated as a new conversation, and the other agent may not correctly understand your needs. You can obtain the session_id from the first round's response, for example:

    [SESSION: xxx]
    

    where xxx is the session_id value. This value is typically system-generated and has a long, unique format. Save this session_id and continue using it in subsequent conversations with the same agent.

版本历史

  • d744922 当前 2026-08-20 07:41

同 Skill 集合

plugins/bundle/cloudpaw/skills/alicloud_cli/SKILL.md
plugins/bundle/cloudpaw/skills/terraform-cli-setup/SKILL.md
plugins/bundle/cloudpaw/skills/terraform-skill/SKILL.md
plugins/bundle/computer-use/skills/computer_use/SKILL.md
src/qwenpaw/agents/skills/browser-en/SKILL.md
src/qwenpaw/agents/skills/browser-zh/SKILL.md
src/qwenpaw/agents/skills/channel_message-en/SKILL.md
src/qwenpaw/agents/skills/channel_message-zh/SKILL.md
src/qwenpaw/agents/skills/chat_with_agent-zh/SKILL.md
src/qwenpaw/agents/skills/cron-en/SKILL.md
src/qwenpaw/agents/skills/cron-zh/SKILL.md
src/qwenpaw/agents/skills/dingtalk_channel-en/SKILL.md
src/qwenpaw/agents/skills/dingtalk_channel-zh/SKILL.md
src/qwenpaw/agents/skills/docx-zh/SKILL.md
src/qwenpaw/agents/skills/file_reader-en/SKILL.md
src/qwenpaw/agents/skills/file_reader-zh/SKILL.md
src/qwenpaw/agents/skills/guidance-en/SKILL.md
src/qwenpaw/agents/skills/guidance-zh/SKILL.md
src/qwenpaw/agents/skills/mailbox-en/SKILL.md
src/qwenpaw/agents/skills/mailbox-zh/SKILL.md
src/qwenpaw/agents/skills/make_plan-en/SKILL.md
src/qwenpaw/agents/skills/make_plan-zh/SKILL.md
src/qwenpaw/agents/skills/make-skill-en/SKILL.md
src/qwenpaw/agents/skills/make-skill-zh/SKILL.md
src/qwenpaw/agents/skills/multi_agent_collaboration-en/SKILL.md
src/qwenpaw/agents/skills/multi_agent_collaboration-zh/SKILL.md
src/qwenpaw/agents/skills/pdf-en/SKILL.md
src/qwenpaw/agents/skills/pdf-zh/SKILL.md
src/qwenpaw/agents/skills/pptx-zh/SKILL.md
src/qwenpaw/agents/skills/QA_source_index-en/SKILL.md
src/qwenpaw/agents/skills/QA_source_index-zh/SKILL.md
src/qwenpaw/agents/skills/xlsx-zh/SKILL.md
src/qwenpaw/agents/skills/docx-en/SKILL.md
src/qwenpaw/agents/skills/pptx-en/SKILL.md
src/qwenpaw/agents/skills/xlsx-en/SKILL.md

元信息

文件数
0
版本
5072269
Hash
4919a660
收录时间
2026-08-20 07:41

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-04 08:18
浙ICP备14020137号-1 $访客地图$