<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Multi-Agent on Tarragon</title><link>https://tarrragon.github.io/blog/tags/multi-agent/</link><description>Recent content in Multi-Agent on Tarragon</description><generator>Hugo -- gohugo.io</generator><language>zh-TW</language><copyright>Tarragon (CC BY 4.0)</copyright><lastBuildDate>Thu, 14 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://tarrragon.github.io/blog/tags/multi-agent/index.xml" rel="self" type="application/rss+xml"/><item><title>Agent-as-Tool</title><link>https://tarrragon.github.io/blog/llm/knowledge-cards/agent-as-tool/</link><pubDate>Thu, 14 May 2026 00:00:00 +0000</pubDate><guid>https://tarrragon.github.io/blog/llm/knowledge-cards/agent-as-tool/</guid><description>&lt;p>Agent-as-tool 的核心概念是「&lt;strong>把一個 &lt;a href="https://tarrragon.github.io/blog/llm/knowledge-cards/agent/" data-link-title="LLM Agent" data-link-desc="把控制流交給 LLM 的應用模式：自主決策、跨多步呼叫工具、人類角色從主導變監督">agent&lt;/a> 封裝成另一個 agent 可呼叫的工具&lt;/strong>」。被封裝的 agent 有自己的 prompt、工具、上下文與完成條件；呼叫方只看到一個較高階的 tool interface。&lt;/p>
&lt;h2 id="概念位置">概念位置&lt;/h2>
&lt;p>它是 &lt;a href="https://tarrragon.github.io/blog/llm/knowledge-cards/multi-agent-system/" data-link-title="Multi-agent system" data-link-desc="多個 LLM agent 協作的系統、跟 multi-call workflow 的差異在控制流跟責任邊界、三種拓樸 flat / hierarchical / agent-as-tool">multi-agent system&lt;/a> 的一種拓樸，也可透過 &lt;a href="https://tarrragon.github.io/blog/llm/knowledge-cards/mcp/" data-link-title="MCP（Model Context Protocol）" data-link-desc="LLM application ↔ 外部 tool server 之間的標準化協議、複用 OpenAI 相容 API 的成功模式">MCP&lt;/a> 暴露成 tool server。它跟 &lt;a href="https://tarrragon.github.io/blog/llm/knowledge-cards/subagent/" data-link-title="Subagent" data-link-desc="Coding agent 中把特定責任拆給專門子 agent 的設計模式、各 subagent 有獨立 context、由 main agent 透過 handoff 調度">subagent&lt;/a> 的差異是：subagent 常是同一 runtime 內的任務分派，agent-as-tool 強調對外介面與重用邊界。&lt;/p>
&lt;h2 id="可觀察訊號與例子">可觀察訊號與例子&lt;/h2>
&lt;p>主 agent 呼叫 &lt;code>run_security_review()&lt;/code>，背後其實是一個安全 reviewer agent 讀檔、查規則、輸出 findings。主 agent 不需要知道內部步驟，只需要 consume 結果。&lt;/p>
&lt;h2 id="設計責任">設計責任&lt;/h2>
&lt;p>Agent-as-tool 要把輸入、輸出、權限、副作用與 timeout 定清楚。否則呼叫方會把它當 deterministic tool，但內部其實是 fuzzy agent，失敗模式會被隱藏。&lt;/p></description><content:encoded><![CDATA[<p>Agent-as-tool 的核心概念是「<strong>把一個 <a href="/blog/llm/knowledge-cards/agent/" data-link-title="LLM Agent" data-link-desc="把控制流交給 LLM 的應用模式：自主決策、跨多步呼叫工具、人類角色從主導變監督">agent</a> 封裝成另一個 agent 可呼叫的工具</strong>」。被封裝的 agent 有自己的 prompt、工具、上下文與完成條件；呼叫方只看到一個較高階的 tool interface。</p>
<h2 id="概念位置">概念位置</h2>
<p>它是 <a href="/blog/llm/knowledge-cards/multi-agent-system/" data-link-title="Multi-agent system" data-link-desc="多個 LLM agent 協作的系統、跟 multi-call workflow 的差異在控制流跟責任邊界、三種拓樸 flat / hierarchical / agent-as-tool">multi-agent system</a> 的一種拓樸，也可透過 <a href="/blog/llm/knowledge-cards/mcp/" data-link-title="MCP（Model Context Protocol）" data-link-desc="LLM application ↔ 外部 tool server 之間的標準化協議、複用 OpenAI 相容 API 的成功模式">MCP</a> 暴露成 tool server。它跟 <a href="/blog/llm/knowledge-cards/subagent/" data-link-title="Subagent" data-link-desc="Coding agent 中把特定責任拆給專門子 agent 的設計模式、各 subagent 有獨立 context、由 main agent 透過 handoff 調度">subagent</a> 的差異是：subagent 常是同一 runtime 內的任務分派，agent-as-tool 強調對外介面與重用邊界。</p>
<h2 id="可觀察訊號與例子">可觀察訊號與例子</h2>
<p>主 agent 呼叫 <code>run_security_review()</code>，背後其實是一個安全 reviewer agent 讀檔、查規則、輸出 findings。主 agent 不需要知道內部步驟，只需要 consume 結果。</p>
<h2 id="設計責任">設計責任</h2>
<p>Agent-as-tool 要把輸入、輸出、權限、副作用與 timeout 定清楚。否則呼叫方會把它當 deterministic tool，但內部其實是 fuzzy agent，失敗模式會被隱藏。</p>
]]></content:encoded></item><item><title>Multi-agent system</title><link>https://tarrragon.github.io/blog/llm/knowledge-cards/multi-agent-system/</link><pubDate>Thu, 14 May 2026 00:00:00 +0000</pubDate><guid>https://tarrragon.github.io/blog/llm/knowledge-cards/multi-agent-system/</guid><description>&lt;p>Multi-agent system 的核心概念是「&lt;strong>多個 LLM &lt;a href="https://tarrragon.github.io/blog/llm/knowledge-cards/agent/" data-link-title="LLM Agent" data-link-desc="把控制流交給 LLM 的應用模式：自主決策、跨多步呼叫工具、人類角色從主導變監督">agent&lt;/a> 協作完成任務&lt;/strong>」。跟 multi-call workflow 的差異&lt;strong>不在 agent 數量多寡、在控制流跟責任邊界&lt;/strong>——multi-call 是主程式編排每 step、multi-agent 是 agent 自決下一步並可呼叫其他 agent。屬於 &lt;a href="https://tarrragon.github.io/blog/llm/knowledge-cards/agent/" data-link-title="LLM Agent" data-link-desc="把控制流交給 LLM 的應用模式：自主決策、跨多步呼叫工具、人類角色從主導變監督">agent&lt;/a> 概念的進一步擴展。&lt;/p>
&lt;h2 id="概念位置">概念位置&lt;/h2>
&lt;p>跟 multi-call 對照：&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>維度&lt;/th>
 &lt;th>Multi-call workflow&lt;/th>
 &lt;th>Multi-agent system&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>控制流&lt;/td>
 &lt;td>主程式編排&lt;/td>
 &lt;td>Agent 自決&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>角色&lt;/td>
 &lt;td>Step 是函數、無「身份」&lt;/td>
 &lt;td>每個 agent 有 role / 工具集&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Context&lt;/td>
 &lt;td>主程式傳 context&lt;/td>
 &lt;td>Agent 自帶 memory&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>重用&lt;/td>
 &lt;td>Step 是函數、容易 import&lt;/td>
 &lt;td>Agent 跨系統重用透過協議&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>失敗歸屬&lt;/td>
 &lt;td>Step 失敗、主程式接&lt;/td>
 &lt;td>Agent 失敗可能 cascading&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>三種主流拓樸：&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>拓樸&lt;/th>
 &lt;th>結構&lt;/th>
 &lt;th>適用&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>Flat&lt;/td>
 &lt;td>All-to-all、無 orchestrator&lt;/td>
 &lt;td>2-4 個 agent、動態協商&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Hierarchical&lt;/td>
 &lt;td>Orchestrator + specialists&lt;/td>
 &lt;td>多專業 agent、單一對外介面&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Agent-as-tool&lt;/td>
 &lt;td>Agent 互通像 tool call（如 MCP）&lt;/td>
 &lt;td>跨組織重用、標準協議&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h2 id="設計責任">設計責任&lt;/h2>
&lt;p>讀 agent framework / paper 看到「multi-agent」「orchestrator」「agent-as-tool」就是這層設計。實作判讀：&lt;/p>
&lt;ol>
&lt;li>&lt;strong>「先 multi-call、不夠再 multi-agent」&lt;/strong>：multi-agent 是「特定問題的解法」、不是「更高級的設計」。判讀訊號：role 顯著差異 / 跨產品重用 / 真正平行 / 動態協作 / 團隊熟悉度——四條件全滿足才走 multi-agent。&lt;/li>
&lt;li>&lt;strong>Specialization gain vs orchestration overhead&lt;/strong>：拆細帶來單一責任、獨立優化、重用、平行；代價是 context 重複傳遞、latency 累積、debug 困難、責任歸屬模糊。&lt;/li>
&lt;li>&lt;strong>特有失敗模式&lt;/strong>：循環依賴、責任歸屬模糊、context 重複傳遞、orchestrator 單點瓶頸、agent 互相 hallucinate。每類有對應 guardrail（call stack 監測、trace 全紀錄、shared context、deterministic dispatch rule、schema validation）。&lt;/li>
&lt;li>&lt;strong>跟 &lt;a href="https://tarrragon.github.io/blog/llm/knowledge-cards/mcp/" data-link-title="MCP（Model Context Protocol）" data-link-desc="LLM application ↔ 外部 tool server 之間的標準化協議、複用 OpenAI 相容 API 的成功模式">MCP&lt;/a> 的關係&lt;/strong>：MCP 的 tool primitive 視角下、agent-as-tool 可包成 MCP server 暴露、跨組織重用走這條路。&lt;/li>
&lt;/ol>
&lt;p>完整 multi-agent 拓樸設計見 &lt;a href="https://tarrragon.github.io/blog/llm/04-applications/multi-agent-topology/" data-link-title="4.8 Multi-Agent 拓樸：flat / hierarchical / agent-as-tool" data-link-desc="從 multi-call workflow 走到 multi-agent system 的判讀、flat vs hierarchical 拓樸、agent-as-tool 的 MCP 視角、specialization 跟 orchestration overhead 的取捨">4.8 Multi-Agent 拓樸&lt;/a>。&lt;/p></description><content:encoded><![CDATA[<p>Multi-agent system 的核心概念是「<strong>多個 LLM <a href="/blog/llm/knowledge-cards/agent/" data-link-title="LLM Agent" data-link-desc="把控制流交給 LLM 的應用模式：自主決策、跨多步呼叫工具、人類角色從主導變監督">agent</a> 協作完成任務</strong>」。跟 multi-call workflow 的差異<strong>不在 agent 數量多寡、在控制流跟責任邊界</strong>——multi-call 是主程式編排每 step、multi-agent 是 agent 自決下一步並可呼叫其他 agent。屬於 <a href="/blog/llm/knowledge-cards/agent/" data-link-title="LLM Agent" data-link-desc="把控制流交給 LLM 的應用模式：自主決策、跨多步呼叫工具、人類角色從主導變監督">agent</a> 概念的進一步擴展。</p>
<h2 id="概念位置">概念位置</h2>
<p>跟 multi-call 對照：</p>
<table>
  <thead>
      <tr>
          <th>維度</th>
          <th>Multi-call workflow</th>
          <th>Multi-agent system</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>控制流</td>
          <td>主程式編排</td>
          <td>Agent 自決</td>
      </tr>
      <tr>
          <td>角色</td>
          <td>Step 是函數、無「身份」</td>
          <td>每個 agent 有 role / 工具集</td>
      </tr>
      <tr>
          <td>Context</td>
          <td>主程式傳 context</td>
          <td>Agent 自帶 memory</td>
      </tr>
      <tr>
          <td>重用</td>
          <td>Step 是函數、容易 import</td>
          <td>Agent 跨系統重用透過協議</td>
      </tr>
      <tr>
          <td>失敗歸屬</td>
          <td>Step 失敗、主程式接</td>
          <td>Agent 失敗可能 cascading</td>
      </tr>
  </tbody>
</table>
<p>三種主流拓樸：</p>
<table>
  <thead>
      <tr>
          <th>拓樸</th>
          <th>結構</th>
          <th>適用</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Flat</td>
          <td>All-to-all、無 orchestrator</td>
          <td>2-4 個 agent、動態協商</td>
      </tr>
      <tr>
          <td>Hierarchical</td>
          <td>Orchestrator + specialists</td>
          <td>多專業 agent、單一對外介面</td>
      </tr>
      <tr>
          <td>Agent-as-tool</td>
          <td>Agent 互通像 tool call（如 MCP）</td>
          <td>跨組織重用、標準協議</td>
      </tr>
  </tbody>
</table>
<h2 id="設計責任">設計責任</h2>
<p>讀 agent framework / paper 看到「multi-agent」「orchestrator」「agent-as-tool」就是這層設計。實作判讀：</p>
<ol>
<li><strong>「先 multi-call、不夠再 multi-agent」</strong>：multi-agent 是「特定問題的解法」、不是「更高級的設計」。判讀訊號：role 顯著差異 / 跨產品重用 / 真正平行 / 動態協作 / 團隊熟悉度——四條件全滿足才走 multi-agent。</li>
<li><strong>Specialization gain vs orchestration overhead</strong>：拆細帶來單一責任、獨立優化、重用、平行；代價是 context 重複傳遞、latency 累積、debug 困難、責任歸屬模糊。</li>
<li><strong>特有失敗模式</strong>：循環依賴、責任歸屬模糊、context 重複傳遞、orchestrator 單點瓶頸、agent 互相 hallucinate。每類有對應 guardrail（call stack 監測、trace 全紀錄、shared context、deterministic dispatch rule、schema validation）。</li>
<li><strong>跟 <a href="/blog/llm/knowledge-cards/mcp/" data-link-title="MCP（Model Context Protocol）" data-link-desc="LLM application ↔ 外部 tool server 之間的標準化協議、複用 OpenAI 相容 API 的成功模式">MCP</a> 的關係</strong>：MCP 的 tool primitive 視角下、agent-as-tool 可包成 MCP server 暴露、跨組織重用走這條路。</li>
</ol>
<p>完整 multi-agent 拓樸設計見 <a href="/blog/llm/04-applications/multi-agent-topology/" data-link-title="4.8 Multi-Agent 拓樸：flat / hierarchical / agent-as-tool" data-link-desc="從 multi-call workflow 走到 multi-agent system 的判讀、flat vs hierarchical 拓樸、agent-as-tool 的 MCP 視角、specialization 跟 orchestration overhead 的取捨">4.8 Multi-Agent 拓樸</a>。</p>
]]></content:encoded></item><item><title>4.8 Multi-Agent 拓樸：flat / hierarchical / agent-as-tool</title><link>https://tarrragon.github.io/blog/llm/04-applications/multi-agent-topology/</link><pubDate>Thu, 14 May 2026 00:00:00 +0000</pubDate><guid>https://tarrragon.github.io/blog/llm/04-applications/multi-agent-topology/</guid><description>&lt;p>&lt;a href="https://tarrragon.github.io/blog/llm/04-applications/workflow-patterns/" data-link-title="4.7 Workflow 編排模式" data-link-desc="Pipeline / router / parallel / reflection：多 LLM call 組合的四種基本模式與退化條件">4.7 workflow patterns&lt;/a> 寫的是「多次 LLM call 怎麼組合」、四個基本模式（pipeline / router / parallel / &lt;a href="https://tarrragon.github.io/blog/llm/knowledge-cards/reflection/" data-link-title="Reflection / Self-critique" data-link-desc="要求模型先輸出一版、再 critique 自己、再修改的 prompting / workflow 模式、有自身失敗模式">reflection&lt;/a>）解的是 single-thread 多 call 問題。當問題進一步複雜——需要平行的多個專業化角色、需要跨產品的 &lt;a href="https://tarrragon.github.io/blog/llm/knowledge-cards/agent/" data-link-title="LLM Agent" data-link-desc="把控制流交給 LLM 的應用模式：自主決策、跨多步呼叫工具、人類角色從主導變監督">agent&lt;/a> 重用、需要 agent 之間互相呼叫——就進入 &lt;a href="https://tarrragon.github.io/blog/llm/knowledge-cards/multi-agent-system/" data-link-title="Multi-agent system" data-link-desc="多個 LLM agent 協作的系統、跟 multi-call workflow 的差異在控制流跟責任邊界、三種拓樸 flat / hierarchical / agent-as-tool">multi-agent system&lt;/a> 的領域。&lt;/p>
&lt;p>本章寫的是 multi-agent 系統的&lt;strong>拓樸結構&lt;/strong>：何時值得從多 call 走到多 agent、flat 跟 hierarchical 兩種拓樸的差異、&lt;a href="https://tarrragon.github.io/blog/llm/knowledge-cards/agent-as-tool/" data-link-title="Agent-as-Tool" data-link-desc="把一個專責 agent 包成可被另一個 agent 呼叫的 tool，形成跨 agent 的責任邊界">agent-as-tool&lt;/a> 的 MCP 視角、specialization 跟 orchestration overhead 的核心 trade-off。具體 framework（CrewAI、AutoGen、LangGraph 多 agent 等）半年一個世代、本章不寫具體 API。&lt;/p>
&lt;h2 id="本章目標">本章目標&lt;/h2>
&lt;p>讀完本章後你能：&lt;/p>
&lt;ol>
&lt;li>判斷一個系統該停在 multi-call workflow 還是進入 multi-agent。&lt;/li>
&lt;li>區分 flat / hierarchical / agent-as-tool 三種拓樸、各自的適用場景。&lt;/li>
&lt;li>估算 specialization gain vs orchestration overhead 的 trade-off。&lt;/li>
&lt;li>識別 multi-agent 特有的失敗模式（循環依賴、責任歸屬模糊、context 重複傳遞）。&lt;/li>
&lt;li>把 agent-as-tool 對應回 MCP / function calling 的協議設計。&lt;/li>
&lt;/ol>
&lt;h2 id="從-multi-call-走到-multi-agent-的判讀">從 Multi-Call 走到 Multi-Agent 的判讀&lt;/h2>
&lt;p>Multi-agent 跟 multi-call 不是「agent 數量多寡」的差別、是控制流跟責任邊界的差別。&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>維度&lt;/th>
 &lt;th>Multi-call workflow&lt;/th>
 &lt;th>Multi-agent system&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>控制流&lt;/td>
 &lt;td>主程式編排、每 call 是 step&lt;/td>
 &lt;td>Agent 自己決定下一步、可能呼叫其他 agent&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>角色&lt;/td>
 &lt;td>Step 跟 step 之間沒有「身份」、就是函數&lt;/td>
 &lt;td>每個 agent 有 role / 專業 / 工具集&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Context&lt;/td>
 &lt;td>主程式傳 context、step 不擁有 context&lt;/td>
 &lt;td>Agent 自帶 memory、有「自己知道的事」&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>重用&lt;/td>
 &lt;td>Step 是函數、容易 import 重用&lt;/td>
 &lt;td>Agent 是黑盒、跨系統重用要透過協議&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>失敗歸屬&lt;/td>
 &lt;td>Step 失敗、主程式接&lt;/td>
 &lt;td>Agent 失敗、可能 cascading 影響別的 agent&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>判讀「該走 multi-agent」的四條件（&lt;strong>任一不滿足、就留在 multi-call&lt;/strong>）：&lt;/p>
&lt;ul>
&lt;li>&lt;strong>角色差異顯著&lt;/strong>：不同 step 要不同 prompt / model / tool / memory。任一條件同質就退回 multi-call、硬拆成多 agent 只是換個名字、orchestration overhead 純增。&lt;/li>
&lt;li>&lt;strong>跨產品重用&lt;/strong>：同一個 agent 要被多團隊 / 多場景使用。單一 user / 單一場景的話、寫成函數比 agent 簡單。&lt;/li>
&lt;li>&lt;strong>真正平行 / 動態協作&lt;/strong>：多個 agent 各做自己的事最後合併、或哪些 agent 參與是 query-dependent。控制流可寫死、step 順序固定時、multi-call pipeline 已足夠。&lt;/li>
&lt;li>&lt;strong>團隊熟悉度足&lt;/strong>：multi-agent 失敗模式比 multi-call 多、debug 比較難。團隊還在學階段、debug 容易性 &amp;gt; 靈活性、先 stick to multi-call。&lt;/li>
&lt;/ul>
&lt;p>「先 multi-call、不夠再 multi-agent」是合理預設姿勢。Multi-agent 是「特定問題的解法」、不是「更高級的設計」。對應 &lt;a href="https://tarrragon.github.io/blog/llm/04-applications/agent-architecture/" data-link-title="4.4 Agent 架構原理" data-link-desc="Agent loop 結構、失敗模式、什麼任務適合 vs 不適合、跟人類審查的協作模型">4.4 agent 架構&lt;/a> 的「先 single-call、不夠再 agent」反射、層級往上類似。&lt;/p></description><content:encoded><![CDATA[<p><a href="/blog/llm/04-applications/workflow-patterns/" data-link-title="4.7 Workflow 編排模式" data-link-desc="Pipeline / router / parallel / reflection：多 LLM call 組合的四種基本模式與退化條件">4.7 workflow patterns</a> 寫的是「多次 LLM call 怎麼組合」、四個基本模式（pipeline / router / parallel / <a href="/blog/llm/knowledge-cards/reflection/" data-link-title="Reflection / Self-critique" data-link-desc="要求模型先輸出一版、再 critique 自己、再修改的 prompting / workflow 模式、有自身失敗模式">reflection</a>）解的是 single-thread 多 call 問題。當問題進一步複雜——需要平行的多個專業化角色、需要跨產品的 <a href="/blog/llm/knowledge-cards/agent/" data-link-title="LLM Agent" data-link-desc="把控制流交給 LLM 的應用模式：自主決策、跨多步呼叫工具、人類角色從主導變監督">agent</a> 重用、需要 agent 之間互相呼叫——就進入 <a href="/blog/llm/knowledge-cards/multi-agent-system/" data-link-title="Multi-agent system" data-link-desc="多個 LLM agent 協作的系統、跟 multi-call workflow 的差異在控制流跟責任邊界、三種拓樸 flat / hierarchical / agent-as-tool">multi-agent system</a> 的領域。</p>
<p>本章寫的是 multi-agent 系統的<strong>拓樸結構</strong>：何時值得從多 call 走到多 agent、flat 跟 hierarchical 兩種拓樸的差異、<a href="/blog/llm/knowledge-cards/agent-as-tool/" data-link-title="Agent-as-Tool" data-link-desc="把一個專責 agent 包成可被另一個 agent 呼叫的 tool，形成跨 agent 的責任邊界">agent-as-tool</a> 的 MCP 視角、specialization 跟 orchestration overhead 的核心 trade-off。具體 framework（CrewAI、AutoGen、LangGraph 多 agent 等）半年一個世代、本章不寫具體 API。</p>
<h2 id="本章目標">本章目標</h2>
<p>讀完本章後你能：</p>
<ol>
<li>判斷一個系統該停在 multi-call workflow 還是進入 multi-agent。</li>
<li>區分 flat / hierarchical / agent-as-tool 三種拓樸、各自的適用場景。</li>
<li>估算 specialization gain vs orchestration overhead 的 trade-off。</li>
<li>識別 multi-agent 特有的失敗模式（循環依賴、責任歸屬模糊、context 重複傳遞）。</li>
<li>把 agent-as-tool 對應回 MCP / function calling 的協議設計。</li>
</ol>
<h2 id="從-multi-call-走到-multi-agent-的判讀">從 Multi-Call 走到 Multi-Agent 的判讀</h2>
<p>Multi-agent 跟 multi-call 不是「agent 數量多寡」的差別、是控制流跟責任邊界的差別。</p>
<table>
  <thead>
      <tr>
          <th>維度</th>
          <th>Multi-call workflow</th>
          <th>Multi-agent system</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>控制流</td>
          <td>主程式編排、每 call 是 step</td>
          <td>Agent 自己決定下一步、可能呼叫其他 agent</td>
      </tr>
      <tr>
          <td>角色</td>
          <td>Step 跟 step 之間沒有「身份」、就是函數</td>
          <td>每個 agent 有 role / 專業 / 工具集</td>
      </tr>
      <tr>
          <td>Context</td>
          <td>主程式傳 context、step 不擁有 context</td>
          <td>Agent 自帶 memory、有「自己知道的事」</td>
      </tr>
      <tr>
          <td>重用</td>
          <td>Step 是函數、容易 import 重用</td>
          <td>Agent 是黑盒、跨系統重用要透過協議</td>
      </tr>
      <tr>
          <td>失敗歸屬</td>
          <td>Step 失敗、主程式接</td>
          <td>Agent 失敗、可能 cascading 影響別的 agent</td>
      </tr>
  </tbody>
</table>
<p>判讀「該走 multi-agent」的四條件（<strong>任一不滿足、就留在 multi-call</strong>）：</p>
<ul>
<li><strong>角色差異顯著</strong>：不同 step 要不同 prompt / model / tool / memory。任一條件同質就退回 multi-call、硬拆成多 agent 只是換個名字、orchestration overhead 純增。</li>
<li><strong>跨產品重用</strong>：同一個 agent 要被多團隊 / 多場景使用。單一 user / 單一場景的話、寫成函數比 agent 簡單。</li>
<li><strong>真正平行 / 動態協作</strong>：多個 agent 各做自己的事最後合併、或哪些 agent 參與是 query-dependent。控制流可寫死、step 順序固定時、multi-call pipeline 已足夠。</li>
<li><strong>團隊熟悉度足</strong>：multi-agent 失敗模式比 multi-call 多、debug 比較難。團隊還在學階段、debug 容易性 &gt; 靈活性、先 stick to multi-call。</li>
</ul>
<p>「先 multi-call、不夠再 multi-agent」是合理預設姿勢。Multi-agent 是「特定問題的解法」、不是「更高級的設計」。對應 <a href="/blog/llm/04-applications/agent-architecture/" data-link-title="4.4 Agent 架構原理" data-link-desc="Agent loop 結構、失敗模式、什麼任務適合 vs 不適合、跟人類審查的協作模型">4.4 agent 架構</a> 的「先 single-call、不夠再 agent」反射、層級往上類似。</p>
<h2 id="三種拓樸">三種拓樸</h2>
<p>Multi-agent 的拓樸結構決定 agent 之間怎麼通訊、誰決定誰做什麼。三種主流拓樸各有適用場景。</p>
<h3 id="flat-拓樸all-to-all">Flat 拓樸：all-to-all</h3>
<p>所有 agent 同層級、可以互相呼叫、沒有固定 orchestrator。</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="ln">1</span><span class="cl">       Agent A ─────── Agent B
</span></span><span class="line"><span class="ln">2</span><span class="cl">         │  ╲          ╱  │
</span></span><span class="line"><span class="ln">3</span><span class="cl">         │   ╲        ╱   │
</span></span><span class="line"><span class="ln">4</span><span class="cl">         │    ╲      ╱    │
</span></span><span class="line"><span class="ln">5</span><span class="cl">       Agent C ─────── Agent D</span></span></code></pre></div><ul>
<li><strong>適用</strong>：agent 之間平等、任務需要動態協商（agent A 想知道 X、問 B 跟 D、再決定）。</li>
<li><strong>典型場景</strong>：研究型多 agent debate、模擬多個利害關係人協商。</li>
<li><strong>失敗模式</strong>：
<ul>
<li><strong>N² 通訊複雜度</strong>：agent 多了之後、通訊路徑潛在 N²、實務常較稀疏但難預測、cost / latency 上限不可控。</li>
<li><strong>無權威仲裁</strong>：兩個 agent 意見衝突、沒有第三方決定、容易死鎖。</li>
<li><strong>責任歸屬模糊</strong>：最終結果是誰決定的不清楚、debug 困難。</li>
</ul>
</li>
<li><strong>規模限制</strong>：實務上 flat 拓樸超過 5–6 個 agent 就難維護、不推薦大規模。</li>
</ul>
<h3 id="hierarchical-拓樸orchestrator--specialists">Hierarchical 拓樸：orchestrator + specialists</h3>
<p>一個 orchestrator agent 對外、底下若干 specialist agent、orchestrator 決定 dispatch 給誰、合併結果回 user。</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="ln"> 1</span><span class="cl">              User
</span></span><span class="line"><span class="ln"> 2</span><span class="cl">                │
</span></span><span class="line"><span class="ln"> 3</span><span class="cl">          ┌─────────────┐
</span></span><span class="line"><span class="ln"> 4</span><span class="cl">          │ Orchestrator │
</span></span><span class="line"><span class="ln"> 5</span><span class="cl">          └──┬──┬──┬──┬─┘
</span></span><span class="line"><span class="ln"> 6</span><span class="cl">             │  │  │  │
</span></span><span class="line"><span class="ln"> 7</span><span class="cl">        ┌────┘  │  │  └────┐
</span></span><span class="line"><span class="ln"> 8</span><span class="cl">   Specialist  │  │   Specialist
</span></span><span class="line"><span class="ln"> 9</span><span class="cl">       A    Spec  Spec      D
</span></span><span class="line"><span class="ln">10</span><span class="cl">             B    C</span></span></code></pre></div><ul>
<li><strong>適用</strong>：對 user 要單一介面、底下 agent 專業化、orchestrator 知道每個 specialist 的 capability。</li>
<li><strong>典型場景</strong>：智慧家庭中央控制（user 對 orchestrator 說話、orchestrator 派給 climate / security / energy agent）、複雜客服系統（orchestrator 派給 product / refund / billing 不同 specialist）。</li>
<li><strong>失敗模式</strong>：
<ul>
<li><strong>Orchestrator 變單點瓶頸</strong>：所有請求過 orchestrator、它的 prompt / model 限制整個系統能力。</li>
<li><strong>Specialist 之間訊息傳遞要過 orchestrator</strong>：增加 latency、容易丟細節。</li>
<li><strong>Orchestrator 不知道何時該派誰</strong>：需要動態描述 specialist capability、複雜 query 容易 dispatch 錯。</li>
</ul>
</li>
<li><strong>變體</strong>：multi-level hierarchy（orchestrator 下面還有 sub-orchestrator），實務上 2 層夠用、3 層以上 overhead 大於 specialization gain。</li>
</ul>
<h3 id="agent-as-toolagent-互通就是-tool-call">Agent-as-Tool：agent 互通就是 tool call</h3>
<p>把每個 agent 包成「另一個 agent 的 tool」、agent A 呼叫 agent B 跟呼叫 weather API 在介面上一樣——都是 tool call。</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="ln">1</span><span class="cl">Agent A
</span></span><span class="line"><span class="ln">2</span><span class="cl">  ├── tool: weather_api
</span></span><span class="line"><span class="ln">3</span><span class="cl">  ├── tool: database_query
</span></span><span class="line"><span class="ln">4</span><span class="cl">  └── tool: agent_B  ←── 內部其實是另一個 agent loop
</span></span><span class="line"><span class="ln">5</span><span class="cl">                            └── 它也有自己的 tools
</span></span><span class="line"><span class="ln">6</span><span class="cl">                                ├── tool: code_executor
</span></span><span class="line"><span class="ln">7</span><span class="cl">                                └── tool: agent_C</span></span></code></pre></div><ul>
<li><strong>適用</strong>：agent 之間有清楚的「誰呼叫誰」、不是平等協商；想透過標準協議（function calling / MCP）讓 agent 跨系統重用。</li>
<li><strong>典型場景</strong>：<a href="/blog/llm/knowledge-cards/mcp/" data-link-title="MCP（Model Context Protocol）" data-link-desc="LLM application ↔ 外部 tool server 之間的標準化協議、複用 OpenAI 相容 API 的成功模式">MCP</a> 的 tool primitive 視角下、<a href="/blog/llm/knowledge-cards/agent-as-tool/" data-link-title="Agent-as-Tool" data-link-desc="把一個專責 agent 包成可被另一個 agent 呼叫的 tool，形成跨 agent 的責任邊界">agent-as-tool</a> 可以包成 MCP server 暴露、client agent 把它當 tool 用。跨組織 agent 互通常走這個模式。注意 MCP 還有 resources / prompts 另外兩類 primitive、不是所有 MCP server 都是 agent-as-tool。</li>
<li><strong>跟 hierarchical 的關係</strong>：agent-as-tool 是 hierarchical 的一個實作策略——orchestrator 把 specialist agent 當 tool。差異在於：hierarchical 可能是同進程內的緊耦合、agent-as-tool 走標準協議、跨進程 / 跨組織 / 可替換。</li>
<li><strong>失敗模式</strong>：
<ul>
<li><strong>協議的 schema 太薄</strong>：agent 跟 agent 之間的 input/output 用 string 傳、丟結構資訊、下游難解析。</li>
<li><strong>Cascading failure</strong>：下游 agent 失敗、上游 agent 不知道為什麼失敗、誤判繼續。</li>
<li><strong>重複 context 傳遞</strong>：每次呼叫都要重新 brief 一次下游 agent、token cost 爆。緩解：下游 agent 自帶 session memory（見 <a href="/blog/llm/04-applications/agent-memory-architecture/" data-link-title="4.19 Agent memory 分層架構" data-link-desc="Agent 在 context window 之外管理長期狀態的設計：working / short-term / long-term episodic / semantic / procedural 五個層次、寫入時機、retrieval 設計、失敗模式">4.19 agent memory architecture</a>）。</li>
</ul>
</li>
</ul>
<h3 id="三種拓樸的選擇">三種拓樸的選擇</h3>
<table>
  <thead>
      <tr>
          <th>場景特性</th>
          <th>推薦拓樸</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>2–4 個 agent、需要動態協商</td>
          <td>Flat</td>
      </tr>
      <tr>
          <td>多個專業 agent、單一對外介面</td>
          <td>Hierarchical</td>
      </tr>
      <tr>
          <td>跨組織 / 跨進程 / 標準化重用</td>
          <td>Agent-as-tool</td>
      </tr>
      <tr>
          <td>大規模（10+ agents）、固定協作模式</td>
          <td>Hierarchical 多層</td>
      </tr>
      <tr>
          <td>想簡單開始</td>
          <td>Hierarchical 兩層</td>
      </tr>
  </tbody>
</table>
<p>教材建議的組合：對外是 hierarchical（單一 orchestrator）、orchestrator 內部跟 specialist 通訊走 agent-as-tool 協議（如 MCP tool primitive）、specialist 之間用 flat 模式平等溝通。實務上組合方式因團隊跟產品差異很大、這只是一個合理起點。</p>
<h2 id="specialization-gain-vs-orchestration-overhead">Specialization Gain vs Orchestration Overhead</h2>
<p>Multi-agent 的核心 trade-off 是<strong>專業化收益跟協調成本的拉鋸</strong>。</p>
<h3 id="specialization-gain把-agent-拆細的好處">Specialization gain：把 agent 拆細的好處</h3>
<ul>
<li><strong>單一責任</strong>：每個 agent prompt 短、focus 清楚、debugging 容易。</li>
<li><strong>獨立優化</strong>：每個 agent 可以用不同 model（具體 routing 思路屬於 <a href="/blog/llm/04-applications/workflow-patterns/" data-link-title="4.7 Workflow 編排模式" data-link-desc="Pipeline / router / parallel / reflection：多 LLM call 組合的四種基本模式與退化條件">4.7 workflow patterns</a> router 模式）、不同 prompt、獨立 eval。</li>
<li><strong>重用</strong>：同一個 specialist 跨多個系統用、攤平訓練 / 設計成本。</li>
<li><strong>平行</strong>：獨立 agent 可平行跑、latency 降。</li>
</ul>
<h3 id="orchestration-overhead拆細的成本">Orchestration overhead：拆細的成本</h3>
<ul>
<li><strong>Context 傳遞成本</strong>：每個 agent 要被 brief、context 重複傳、token 累積。</li>
<li><strong>Latency 累積</strong>：每跳一個 agent 加一個 LLM call 的 latency、跨 agent chain 跟 reflection / multi-step retrieval 一樣會累積。</li>
<li><strong>失敗模式多</strong>：每個 agent 自己會 drift、agent 之間也會誤判、debug 比 single agent 難。</li>
<li><strong>責任歸屬</strong>：bug 出現時、定位是哪個 agent 跑偏要看完整 trace。</li>
</ul>
<h3 id="何時-specialization-划算">何時 specialization 划算</h3>
<table>
  <thead>
      <tr>
          <th>條件</th>
          <th>Specialization 划算？</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Agent 之間 role 差異顯著</td>
          <td>划算</td>
      </tr>
      <tr>
          <td>Agent 之間 role 同質</td>
          <td>不划算</td>
      </tr>
      <tr>
          <td>重用機會多（多產品 / 多場景）</td>
          <td>划算</td>
      </tr>
      <tr>
          <td>單一場景 / 單一團隊</td>
          <td>不划算</td>
      </tr>
      <tr>
          <td>每個 sub-task 各自有客觀 eval</td>
          <td>划算</td>
      </tr>
      <tr>
          <td>Sub-task 無法獨立評估</td>
          <td>不划算（debugging 困難）</td>
      </tr>
      <tr>
          <td>Latency 容忍度高（後台 batch）</td>
          <td>划算</td>
      </tr>
      <tr>
          <td>即時 chatbot</td>
          <td>不划算（orchestration latency 殺死 UX）</td>
      </tr>
  </tbody>
</table>
<p>兩個容易低估的條件展開：</p>
<ul>
<li><strong>「sub-task 無法獨立評估」為何讓 debugging 困難</strong>：當 specialist agent 出問題、若沒有 component-level eval、要從 final output 倒推到「哪個 agent 跑偏」要看完整 trace + 人工讀。Single agent 失敗只需查一個 agent 的 trace、multi-agent 失敗要查 N 個、且 cascading failure 讓 root cause 模糊。要配 sub-task 客觀 eval（如 <a href="/blog/llm/knowledge-cards/retrieval-recall/" data-link-title="Retrieval Recall" data-link-desc="衡量 RAG 檢索是否把應該命中的文件或 chunk 放進 top-k 結果，是 component-level eval 的核心指標">retrieval recall</a>、抽取 accuracy）才能秒抓問題層、不然 specialization 換來的是更貴的 debug。</li>
<li><strong>「orchestration latency 殺死 UX」的量級</strong>：每跳一個 agent 加一個 LLM call（雲端旗艦 ~1-3s）。Hierarchical 三層、user query 到回應走 3+ 次 LLM、累積 3-10s。即時 chatbot 的 latency budget 通常 &lt; 3s、multi-agent 容易超標。Workaround：specialist 換小 model、或某些 step 改 deterministic、或退回 single agent + multi-step prompt。</li>
</ul>
<h3 id="先粗再細的演化路徑">「先粗、再細」的演化路徑</h3>
<p>實務多採演化路徑、不是一開始就設計多 agent：</p>
<ol>
<li><strong>Single agent 開始</strong>：把整個任務塞一個 agent、看跑得起來嗎。</li>
<li><strong>發現某子任務 systematic 失敗</strong>：那個子任務拆出來、變成 specialist agent。</li>
<li><strong>更多子任務需要拆</strong>：演化成 hierarchical。</li>
<li><strong>要跨產品重用</strong>：把某個 specialist 包成 agent-as-tool（透過 MCP）。</li>
</ol>
<p>這條路徑的好處是<strong>每一步都有具體痛點驅動拆分</strong>、不是「為了 multi-agent 而 multi-agent」。</p>
<h2 id="multi-agent-特有的失敗模式">Multi-Agent 特有的失敗模式</h2>
<p>除了單 agent 共通的失敗（context drift / goal drift / tool misread、見 <a href="/blog/llm/04-applications/agent-architecture/" data-link-title="4.4 Agent 架構原理" data-link-desc="Agent loop 結構、失敗模式、什麼任務適合 vs 不適合、跟人類審查的協作模型">4.4</a>）、multi-agent 系統有自己特有的失敗模式：</p>
<h3 id="循環依賴">循環依賴</h3>
<p>循環依賴是 agent 呼叫圖在執行期才形成 cycle、靜態 declaration 抓不出來、結果無限執行。例：Agent A 呼叫 B、B 呼叫 C、C 又呼叫 A、形成 cycle。</p>
<p>緩解：</p>
<ul>
<li>Call stack 監測、深度超過 N 強制中止。</li>
<li>Agent 設計時明確 declare 它會呼叫哪些下游 agent、靜態 check 不出 cycle。</li>
<li>Cycle 的合法用例（如 negotiation）要明確設停止條件。</li>
</ul>
<h3 id="責任歸屬模糊">責任歸屬模糊</h3>
<p>責任歸屬模糊是 multi-agent 的 cascading 結構讓 final output 的「哪個 agent 出錯」可能跨多個 agent 累積、debug 時不知道從哪查。</p>
<p>緩解：</p>
<ul>
<li>強制 trace 全部 agent call（見 <a href="/blog/llm/04-applications/llm-tracing-and-observability/" data-link-title="4.20 LLM tracing 與 observability" data-link-desc="OpenTelemetry GenAI semantic conventions、結構化 span 設計、cost / latency 監控、failure debug 流程、跟 LLM-as-judge eval 的串接">4.20 LLM tracing</a>）。</li>
<li>每個 agent 明確 declare 它對 final output 的貢獻範圍。</li>
<li>Error 用結構化、明確標出 raised by 哪個 agent。</li>
</ul>
<h3 id="context-重複傳遞">Context 重複傳遞</h3>
<p>Context 重複傳遞是 agent-as-tool 介面下、上游每次呼叫下游都要重新 brief 一遍、缺乏跨 call 的狀態保留、累積成 token cost 跟 latency 雙重浪費。</p>
<p>緩解：</p>
<ul>
<li>Specialist agent 自帶 session memory、不用每次 brief（見 <a href="/blog/llm/04-applications/agent-memory-architecture/" data-link-title="4.19 Agent memory 分層架構" data-link-desc="Agent 在 context window 之外管理長期狀態的設計：working / short-term / long-term episodic / semantic / procedural 五個層次、寫入時機、retrieval 設計、失敗模式">4.19 agent memory architecture</a>）。</li>
<li>共享 context（global state、reference passing）取代複製。</li>
<li>Agent-as-tool 協議設計時、輸入 schema 包含「已 brief 過、跳過 intro」flag。</li>
</ul>
<h3 id="orchestrator-成為單點認知瓶頸">Orchestrator 成為單點認知瓶頸</h3>
<p>Orchestrator 是 hierarchical 拓樸的核心、要理解所有 specialist 跟分派邏輯、它的 prompt / capability 限制整個系統上限。換 specialist 容易（介面標準）、換 orchestrator 牽動所有 routing 邏輯（耦合深）。</p>
<p>緩解：</p>
<ul>
<li>Orchestrator 的 dispatch 邏輯外部化（不寫在 prompt 內、寫在 deterministic routing rule）。</li>
<li>Specialist 自己 declare capability（用 OpenAPI / MCP schema）、orchestrator 動態讀、不寫死。</li>
</ul>
<h3 id="agent-之間互相-hallucinate">Agent 之間互相 hallucinate</h3>
<p>Agent 之間互相 hallucinate 是 agent 介面信任假設失效——上游 agent 給的 input 被視為「可信」、下游沒驗證就執行、hallucinated 內容沿著 agent chain 層層放大。</p>
<p>緩解：</p>
<ul>
<li>Agent 之間互通也要走 schema validation（見 <a href="/blog/llm/00-foundations/deterministic-vs-fuzzy-engineering/" data-link-title="0.8 Deterministic vs Fuzzy Engineering：軟體設計典範的位移" data-link-desc="傳統 deterministic 軟體跟 fuzzy LLM 軟體在資料、邏輯、分解、實驗成本四個維度的根本差異、以及哪段該 deterministic、哪段該 fuzzy 的決策框架">0.8 fuzzy engineering</a> guardrail 段）。</li>
<li>Critical path 加 deterministic check、不只靠 LLM 自評。</li>
</ul>
<h2 id="跟-mcp--function-calling-的協議對應">跟 MCP / Function Calling 的協議對應</h2>
<p><a href="/blog/llm/04-applications/application-protocols/" data-link-title="4.6 應用層協議：function calling / structured output / MCP" data-link-desc="三個常被混為一談的概念：模型能力、sampling 約束、server 協議，三者的層級差異與組合方式">4.6 應用層協議</a> 寫 function calling / structured output / MCP 的層級差異。Multi-agent 拓樸的 agent-as-tool 模式直接對應 MCP：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="ln">1</span><span class="cl">Agent-as-tool 在 MCP 視角下的展開：
</span></span><span class="line"><span class="ln">2</span><span class="cl">
</span></span><span class="line"><span class="ln">3</span><span class="cl">Client Agent
</span></span><span class="line"><span class="ln">4</span><span class="cl">  ├── MCP client
</span></span><span class="line"><span class="ln">5</span><span class="cl">  │     ↓ stdio / SSE / HTTP
</span></span><span class="line"><span class="ln">6</span><span class="cl">  │   MCP server #1 ← 包了一個 specialist agent
</span></span><span class="line"><span class="ln">7</span><span class="cl">  │   MCP server #2 ← 包了另一個 specialist agent
</span></span><span class="line"><span class="ln">8</span><span class="cl">  │   MCP server #3 ← 包了一個外部 service
</span></span><span class="line"><span class="ln">9</span><span class="cl">  └── 對 client agent 來說、三者介面一致、都是 tool</span></span></code></pre></div><p>這個 framing 的價值：<strong>目前 agent 跨組織重用的主要工程問題是 agent-as-tool 協議普及度</strong>——MCP 是當前的主流選項。當業界對協議 schema 達成共識（無論是 MCP 還是後續演化的標準）、agent-as-tool 拓樸的工程成本會大幅下降。</p>
<p>判讀訊號：自家 agent 想暴露給其他團隊用、預設選 MCP server 包裝、不要設計 proprietary protocol。</p>
<h2 id="何時過時--何時不過時">何時過時 / 何時不過時</h2>
<p><strong>不會過時的部分</strong>：</p>
<ul>
<li>Multi-call vs multi-agent 的判讀框架（控制流 / 角色 / context / 重用 / 失敗歸屬五維度）。</li>
<li>Flat / hierarchical / agent-as-tool 三種拓樸的結構分類。</li>
<li>Specialization gain vs orchestration overhead 的 trade-off。</li>
<li>「先粗、再細」的演化路徑反射。</li>
<li>Multi-agent 特有的五類失敗模式跟緩解。</li>
<li>Agent-as-tool 對應 MCP 的 framing。</li>
</ul>
<p><strong>會變的部分</strong>：</p>
<ul>
<li>具體 multi-agent framework（CrewAI / AutoGen / LangGraph multi-agent 等會持續演化）。</li>
<li>MCP server 生態的成熟度（普及度會大幅影響 agent-as-tool 的工程成本）。</li>
<li>各家 framework 對 multi-agent 失敗模式的 handling 工具（debugging / tracing tooling）。</li>
</ul>
<h2 id="下一章">下一章</h2>
<p>下一章：<a href="/blog/llm/04-applications/production-resource-planning/" data-link-title="4.9 Production 部署的資源評估原理" data-link-desc="從本地單 user 到 production multi-tenant：concurrent users、cost model、observability、SLA、capacity planning 的設計取捨">4.9 Production 部署資源評估</a>、把多 LLM call / 多 agent 系統的 cost / latency / capacity 落到具體 production 評估。Multi-agent 跟 multi-call 的對比基礎見 <a href="/blog/llm/04-applications/workflow-patterns/" data-link-title="4.7 Workflow 編排模式" data-link-desc="Pipeline / router / parallel / reflection：多 LLM call 組合的四種基本模式與退化條件">4.7 workflow patterns</a>、agent 自身的失敗模式見 <a href="/blog/llm/04-applications/agent-architecture/" data-link-title="4.4 Agent 架構原理" data-link-desc="Agent loop 結構、失敗模式、什麼任務適合 vs 不適合、跟人類審查的協作模型">4.4 agent 架構</a>、MCP 協議層討論見 <a href="/blog/llm/04-applications/application-protocols/" data-link-title="4.6 應用層協議：function calling / structured output / MCP" data-link-desc="三個常被混為一談的概念：模型能力、sampling 約束、server 協議，三者的層級差異與組合方式">4.6 應用層協議</a>。</p>
]]></content:encoded></item></channel></rss>