Files
ai-agent-book/book-vi/images/fig2-12.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

88 lines
8.7 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 40 820 620" width="820" height="620" style="background:#ffffff">
<defs><marker id="ah" markerWidth="12" markerHeight="8" refX="12" refY="4" orient="auto"><polygon points="0 0, 12 4, 0 8" fill="#333333" /></marker><marker id="ah-y" markerWidth="12" markerHeight="8" refX="12" refY="4" orient="auto"><polygon points="0 0, 12 4, 0 8" fill="#e6a817" /></marker><marker id="ah-o" markerWidth="12" markerHeight="8" refX="12" refY="4" orient="auto"><polygon points="0 0, 12 4, 0 8" fill="#d46e4e" /></marker></defs>
<text x="40" y="60" font-family="'Courier New', Courier, monospace" font-size="16" fill="#333333" text-anchor="start" dominant-baseline="central" font-weight="bold">messages: [</text>
<rect x="50" y="78" width="500" height="32" rx="4" fill="#e8e8e8" stroke="#999999" stroke-width="1.5" />
<text x="62" y="94" font-family="'Courier New', Courier, monospace" font-size="13" fill="#333333" text-anchor="start" dominant-baseline="central">{ role: "system", content: "Bạn là trợ lý Claude Code..." }</text>
<rect x="50" y="114" width="500" height="32" rx="4" fill="#e8e8e8" stroke="#999999" stroke-width="1.5" />
<text x="62" y="130" font-family="'Courier New', Courier, monospace" font-size="13" fill="#333333" text-anchor="start" dominant-baseline="central">tools: [Skill, Read, Bash, Edit, Write, ...]</text>
<path d="M 560,78 C 575,78 575,114 580,123 C 575,132 575,146 560,146" fill="none" stroke="#999999" stroke-width="1.5" />
<text x="590" y="112" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="13" fill="#666666" text-anchor="start" dominant-baseline="central">đã sửa</text>
<text x="590" y="130" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="13" fill="#666666" text-anchor="start" dominant-baseline="central">(KV Cache Cache)</text>
<rect x="50" y="158" width="500" height="32" rx="4" fill="#dce9f5" stroke="#999999" stroke-width="1.5" />
<text x="62" y="174" font-family="'Courier New', Courier, monospace" font-size="13" fill="#333333" text-anchor="start" dominant-baseline="central">{ role: "user", content: "Giúp tôi tạo PPT từ PDF này" }</text>
<rect x="50" y="198" width="500" height="64" rx="4" fill="#fff3cd" stroke="#e6a817" stroke-width="2.5" />
<text x="62" y="214" font-family="'Courier New', Courier, monospace" font-size="13" fill="#333333" text-anchor="start" dominant-baseline="central">{ role: "user", isMeta: true,</text>
<text x="62" y="232" font-family="'Courier New', Courier, monospace" font-size="13" fill="#333333" text-anchor="start" dominant-baseline="central">content: "&lt;system-reminder&gt;</text>
<text x="62" y="250" font-family="'Courier New', Courier, monospace" font-size="13" fill="#333333" text-anchor="start" dominant-baseline="central">Available skills: pdf, pptx, ...&lt;/system-reminder&gt;" }</text>
<line x1="600" y1="230" x2="555" y2="230" stroke="#e6a817" stroke-width="2" marker-end="url(#ah-y)" />
<text x="608" y="214" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="13" fill="#c9a227" text-anchor="start" dominant-baseline="central" font-weight="bold">ⓐ Skill listing</text>
<text x="608" y="232" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="12" fill="#666666" text-anchor="start" dominant-baseline="central">Harness emit-once</text>
<text x="608" y="250" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="12" fill="#666666" text-anchor="start" dominant-baseline="central">~300 tokens</text>
<rect x="50" y="270" width="500" height="32" rx="4" fill="#d9f0d9" stroke="#999999" stroke-width="1.5" />
<text x="62" y="286" font-family="'Courier New', Courier, monospace" font-size="13" fill="#333333" text-anchor="start" dominant-baseline="central">{ role: "assistant", tool_calls: [Skill(skill: "pptx")] }</text>
<rect x="50" y="306" width="500" height="32" rx="4" fill="#fdf6e3" stroke="#999999" stroke-width="1.5" />
<text x="62" y="322" font-family="'Courier New', Courier, monospace" font-size="13" fill="#333333" text-anchor="start" dominant-baseline="central">{ role: "tool", content: "Launching skill: pptx" } ← giữ chỗ</text>
<rect x="50" y="346" width="500" height="64" rx="4" fill="#ffe4d9" stroke="#d46e4e" stroke-width="2.5" />
<text x="62" y="362" font-family="'Courier New', Courier, monospace" font-size="13" fill="#333333" text-anchor="start" dominant-baseline="central">{ role: "user", isMeta: true,</text>
<text x="62" y="380" font-family="'Courier New', Courier, monospace" font-size="13" fill="#333333" text-anchor="start" dominant-baseline="central">content: "Base directory: ...\n# PPTX Skill</text>
<text x="62" y="398" font-family="'Courier New', Courier, monospace" font-size="13" fill="#333333" text-anchor="start" dominant-baseline="central">## Workflow: 1. Use markitdown..." }</text>
<line x1="600" y1="378" x2="555" y2="378" stroke="#d46e4e" stroke-width="2" marker-end="url(#ah-o)" />
<text x="608" y="362" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="13" fill="#a04830" text-anchor="start" dominant-baseline="central" font-weight="bold">ⓑ Skill content</text>
<text x="608" y="380" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="12" fill="#666666" text-anchor="start" dominant-baseline="central">Tool Skill emit-once</text>
<text x="608" y="398" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="12" fill="#666666" text-anchor="start" dominant-baseline="central">~2k tokens</text>
<rect x="50" y="418" width="500" height="32" rx="4" fill="#d9f0d9" stroke="#999999" stroke-width="1.5" />
<text x="62" y="434" font-family="'Courier New', Courier, monospace" font-size="13" fill="#333333" text-anchor="start" dominant-baseline="central">{ role: "assistant", tool_calls: [Read(file: "input.pdf")] }</text>
<rect x="50" y="454" width="500" height="32" rx="4" fill="#fdf6e3" stroke="#999999" stroke-width="1.5" />
<text x="62" y="470" font-family="'Courier New', Courier, monospace" font-size="13" fill="#333333" text-anchor="start" dominant-baseline="central">{ role: "tool", content: "...Nội dung văn bản PDF..." }</text>
<rect x="50" y="490" width="500" height="32" rx="4" fill="#d9f0d9" stroke="#999999" stroke-width="1.5" />
<text x="62" y="506" font-family="'Courier New', Courier, monospace" font-size="13" fill="#333333" text-anchor="start" dominant-baseline="central">{ role: "assistant", tool_calls: [Write(file: "slides.html")] }</text>
<rect x="50" y="526" width="500" height="32" rx="4" fill="#fdf6e3" stroke="#999999" stroke-width="1.5" />
<text x="62" y="542" font-family="'Courier New', Courier, monospace" font-size="13" fill="#333333" text-anchor="start" dominant-baseline="central">{ role: "tool", content: "Wrote 12345 bytes" }</text>
<path d="M 560,418 C 575,418 575,490 580,506 C 575,522 575,558 560,558" fill="none" stroke="#999999" stroke-width="1.5" />
<text x="590" y="478" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="13" fill="#666666" text-anchor="start" dominant-baseline="central">Theo dõi tool_use /</text>
<text x="590" y="496" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="13" fill="#666666" text-anchor="start" dominant-baseline="central">tool_result kéo dài</text>
<text x="590" y="514" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="13" fill="#666666" text-anchor="start" dominant-baseline="central">append đến cùng</text>
<text x="300" y="580" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#999999" text-anchor="middle" dominant-baseline="central">... những vòng tiếp theo ...</text>
<text x="40" y="604" font-family="'Courier New', Courier, monospace" font-size="16" fill="#333333" text-anchor="start" dominant-baseline="central" font-weight="bold">]</text>
<rect x="50" y="624" width="720" height="22" rx="4" fill="#f5f5f5" stroke="none" />
<text x="410" y="0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="10" fill="#666666" text-anchor="middle" dominant-baseline="central"><tspan x="410" dy="629.6">ⓐ và ⓑ đều là emit-once: sau khi thanh toán cache_creation một lần, tiền tố bộ đệm sẽ tồn tại vĩnh viễn</tspan><tspan x="410" dy="10.8">và sẽ không được di chuyển với tool_use tiếp theo</tspan></text>
</svg>