{% extends "ewoooc_base.html" %} {% block title %}Agent 編排矩陣{% endblock %} {% block ewooo_content %}

Agent 編排矩陣 {{ hours }}h 內 4 Agent × Ollama × Gemini × MCP × RAG 協作全景

{% if error %}
{{ error }}
{% endif %}
{% if overall %}
總呼叫

{{ "{:,}".format(overall.total_calls) }}

Token:{{ "{:,}".format(overall.total_tokens) }}
本地 Ollama 比例

{{ "%.0f"|format(overall.local_pct) }}%

{{ "{:,}".format(overall.local_calls) }} 呼叫
付費 LLM 成本

${{ "%.2f"|format(overall.total_cost) }}

{{ "{:,}".format(overall.paid_calls) }} 付費呼叫({{ "%.0f"|format(overall.paid_pct) }}%)
RAG 命中率

{{ "%.0f"|format(overall.rag_rate) }}%

{{ "{:,}".format(overall.rag_hits) }} hits
{% endif %}
4 Agent × LLM × MCP × RAG 矩陣 資料來源:ai_calls × mcp_calls × rag_query_log(caller 自動分組)
{% for ag in agent_matrix %} {% endfor %}
Agent 呼叫 成本 本地 Ollama 付費 LLM MCP 編排 RAG 命中 錯誤率 耗時
{{ ag.label }} {{ ag.desc }} {% if ag.calls > 0 %} {{ "{:,}".format(ag.calls) }} {{ "{:,}".format(ag.tokens) }} tk {% else %} {% endif %} {% if ag.calls > 0 %} ${{ "%.2f"|format(ag.cost) }} {% else %} {% endif %} {% if ag.calls > 0 %} {{ "%.0f"|format(ag.ollama_pct) }}% GCP-A {{ ag.ollama_gcp_a }} · GCP-B {{ ag.ollama_gcp_b }} · 111 {{ ag.ollama_111 }} {% else %} {% endif %} {% if ag.calls > 0 %} {{ "%.0f"|format(ag.paid_pct) }}% Gemini {{ ag.gemini }}{% if ag.other_paid %} · 其他 {{ ag.other_paid }}{% endif %} {% else %} {% endif %} {% if ag.calls > 0 %} {{ "%.1f"|format(ag.mcp_rate) }}% {{ ag.mcp_calls }} request_id {% else %} {% endif %} {% if ag.calls > 0 %} {{ "%.1f"|format(ag.rag_rate) }}% {{ ag.rag_hits }} hits {% else %} {% endif %} {% if ag.calls > 0 %} {{ "%.1f"|format(ag.error_rate) }}% {{ ag.errors }} 次 {% else %} {% endif %} {% if ag.calls > 0 %}{{ ag.avg_ms }} ms{% else %}{% endif %}
{% if recommendations %}
編排策略自動建議 — rule-based 規則引擎,5 條判斷
    {% for r in recommendations %}
  • {{ r.severity|upper }} {{ r.agent }}
    發現:{{ r.finding }}
    建議:{{ r.suggestion }}
  • {% endfor %}
{% endif %} {% if mcp_matrix %}
MCP server × caller 工作量明細 資料來源:mcp_calls(過去 {{ hours }}h,前 30 筆)
{% for m in mcp_matrix %} {% endfor %}
MCP Server 呼叫端 (caller) tool 呼叫 cache 命中 cache 率 成本
{{ m.server }} {{ m.caller }} {{ "{:,}".format(m.calls) }} {{ m.cache_hits }} {{ "%.0f"|format(m.cache_rate) }}% ${{ "%.4f"|format(m.cost) }}
{% endif %}

Operation Ollama-First v5.0 / Phase 46 — Agent 編排矩陣 (8 表跨 JOIN:ai_calls × mcp_calls × rag_query_log × ai_insights × learning_episodes × incidents × heal_logs × host_health_probes)

{% endblock %}