Files
ai-agent-book/book-en/images/fig7-6.svg
T
liqiang b119135836
Build latest book artifacts / build (push) Canceled after 0s
dependency resolution / resolve (3.11) (push) Canceled after 0s
dependency resolution / resolve (3.13) (push) Canceled after 0s
deploy-pages / build (push) Canceled after 0s
deploy-pages / deploy (push) Canceled after 0s
i18n consistency check / check (push) Canceled after 0s
provider adoption tests / test (chapter2/context-compression) (push) Canceled after 0s
provider adoption tests / test (chapter2/prompt-injection) (push) Canceled after 0s
provider adoption tests / test (chapter2/system-hint) (push) Canceled after 0s
provider adoption tests / test (chapter3/log-sanitization) (push) Canceled after 0s
web-search-agent tests / test (push) Canceled after 0s
web-search-agent tests / agentbook (push) Canceled after 0s
ai-agent-book 精选快照(<2MB 代码与文档,来自 github.com/bojieli/ai-agent-book)
2026-08-20 13:12:50 +00:00

49 lines
9.0 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 40 880 660" width="880" height="660" style="background:#ffffff">
<defs><marker id="ah" markerWidth="7" markerHeight="10" refX="7" refY="5" orient="auto" markerUnits="userSpaceOnUse"><polygon points="0 0, 7 5, 0 10" fill="#333333"/></marker><marker id="ah-light" markerWidth="12" markerHeight="8" refX="12" refY="4" orient="auto"><polygon points="0 0, 12 4, 0 8" fill="#999999"/></marker></defs>
<rect x="30" y="66" width="400" height="552" rx="6" fill="#ffffff" stroke="#333333" stroke-width="2" stroke-dasharray="8,4"/>
<text x="230" y="92" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">Execution trace tree (single task)</text>
<rect x="50" y="108" width="360" height="46" rx="6" fill="#d0d0d0" stroke="#333333" stroke-width="2"/>
<text x="230" y="131" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="12" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">Trace: Check Beijing weather for user tomorrow (3.2s, $0.008)</text>
<rect x="50" y="164" width="360" height="64" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="68" y="189" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="start" dominant-baseline="central" font-weight="bold">LLM Call: Intent recognition</text>
<text x="68" y="211" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="start" dominant-baseline="central" font-weight="normal">Claude 4 Sonnet · 0.4s · 320 tokens</text>
<rect x="50" y="238" width="360" height="64" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="68" y="263" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="start" dominant-baseline="central" font-weight="bold">Toolget_weather(Beijing)</text>
<text x="68" y="285" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="start" dominant-baseline="central" font-weight="normal">MCP Server · 1.8s · 200ms TTFT</text>
<rect x="86" y="312" width="324" height="64" rx="6" fill="#f5f5f5" stroke="#333333" stroke-width="2"/>
<text x="104" y="337" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="start" dominant-baseline="central" font-weight="bold">├─ HTTP Request</text>
<text x="104" y="359" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="start" dominant-baseline="central" font-weight="normal">api.weather.com · 1.6s</text>
<rect x="86" y="386" width="324" height="64" rx="6" fill="#f5f5f5" stroke="#333333" stroke-width="2"/>
<text x="104" y="411" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="start" dominant-baseline="central" font-weight="bold">└─ Response Parse</text>
<text x="104" y="433" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="start" dominant-baseline="central" font-weight="normal">JSON → Structured weather data</text>
<rect x="50" y="460" width="360" height="64" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="68" y="485" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="start" dominant-baseline="central" font-weight="bold">LLM Call: Generate response</text>
<text x="68" y="507" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="start" dominant-baseline="central" font-weight="normal">Claude 4 Sonnet · 0.8s · 580 tokens</text>
<rect x="50" y="534" width="360" height="64" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="68" y="559" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="start" dominant-baseline="central" font-weight="bold">Toolsend_message(user)</text>
<text x="68" y="581" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="start" dominant-baseline="central" font-weight="normal">0.2s · Contains weather summary</text>
<line x1="230" y1="154" x2="230" y2="163" stroke="#333333" stroke-width="2" marker-end="url(#ah)"/>
<line x1="230" y1="228" x2="230" y2="237" stroke="#333333" stroke-width="2" marker-end="url(#ah)"/>
<line x1="248" y1="302" x2="248" y2="311" stroke="#333333" stroke-width="2" marker-end="url(#ah)"/>
<line x1="248" y1="376" x2="248" y2="385" stroke="#333333" stroke-width="2" marker-end="url(#ah)"/>
<line x1="248" y1="450" x2="248" y2="459" stroke="#333333" stroke-width="2" marker-end="url(#ah)"/>
<line x1="230" y1="524" x2="230" y2="533" stroke="#333333" stroke-width="2" marker-end="url(#ah)"/>
<rect x="470" y="66" width="380" height="552" rx="6" fill="#ffffff" stroke="#333333" stroke-width="2" stroke-dasharray="8,4"/>
<text x="660" y="92" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">Monitoring dashboard</text>
<rect x="490" y="116" width="340" height="140" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="660" y="142" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">Cost tracking</text>
<text x="510" y="174" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="start" dominant-baseline="central" font-weight="normal">Today: $12.30 (1,200 calls)</text>
<text x="510" y="198" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="start" dominant-baseline="central" font-weight="normal">This month: $340 (34K calls)</text>
<text x="510" y="222" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="13" fill="#666666" text-anchor="start" dominant-baseline="central" font-weight="normal">Anomaly: task#892 looped search 14 times, cost $2.1</text>
<rect x="490" y="272" width="340" height="140" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="660" y="298" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">Performance monitoring</text>
<text x="510" y="330" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="start" dominant-baseline="central" font-weight="normal">P50 / P95 / P99 latency: 2.1s / 8.4s / 15.2s</text>
<text x="510" y="354" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="start" dominant-baseline="central" font-weight="normal">Tool success rate: 94.3%</text>
<rect x="490" y="428" width="340" height="140" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="660" y="454" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">Quality audit</text>
<text x="510" y="486" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="13.5" fill="#666666" text-anchor="start" dominant-baseline="central" font-weight="normal">Task success rate: 87% Hallucination trigger: 2.1%</text>
<text x="510" y="510" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="12" fill="#666666" text-anchor="start" dominant-baseline="central" font-weight="normal">Security violations: 0 (this month) User satisfaction: 4.3/5</text>
<rect x="30" y="640" width="820" height="46" rx="6" fill="#d0d0d0" stroke="#333333" stroke-width="2"/>
<text x="440" y="0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="15" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold"><tspan x="440" dy="654">Closed loop: Trace data → Identify issues → A/B testing →</tspan><tspan x="440" dy="17">Prompt version management → Continuous optimization</tspan></text>
</svg>