用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ag2ai/resource-hub --skill explain-flow命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
REST and WebSocket endpoint patterns, error handling, and Pydantic schema conventions for the backend
Architecture, directory layout, communication protocol, and conventions for the full-stack multi-agent application
Step-by-step guide to add a new REST or WebSocket endpoint to the backend
正在显示 SKILL.md
基于 SOC 职业分类
| name | explain-flow |
| description | Trace and explain message flow in a multi-agent AG2 conversation |
| license | Apache-2.0 |
Trace the message flow in an AG2 multi-agent conversation. Use this command when you need to understand how messages move between agents, debug unexpected routing, or document a conversation pattern.
Find where the conversation starts. Look for:
run_group_chat(pattern=..., messages="...") -- group chat entryagent.initiate_chat(recipient, message="...") -- two-agent entryCheck the pattern type to understand routing:
Handoff list to see allowed transitions. The LLM picks from allowed targets based on the conversation.group_manager_args for the model used.For each message in the conversation:
Turn 1: [initial_agent] receives the user message
Turn 2: [initial_agent] replies -> routed to [next_agent] via handoff/pattern
Turn 3: [next_agent] replies -> ...
...
Turn N: [final_agent] replies with TERMINATE -> conversation ends
When an agent makes a tool call, the flow is:
caller_agent -> [tool call: function_name(args)] -> executor_agent
executor_agent -> [tool result: return_value] -> caller_agent
caller_agent -> continues conversation
Tool calls add two extra turns (call + result) before the conversation resumes.
The conversation ends when:
TERMINATEmax_rounds is reached (if configured)When explaining a flow, cover each of these:
Flow: Research and Summarize
1. User message -> researcher (initial_agent)
2. researcher -> [tool: web_search("quantum error correction")] -> executor
3. executor -> [result: "...search results..."] -> researcher
4. researcher -> [handoff] -> writer
5. writer -> [summary text + TERMINATE] -> END
Pattern: DefaultPattern
Handoffs: researcher -> writer
Tools: web_search (caller=researcher, executor=executor)
Termination: writer replies with TERMINATE