Files
ai-agent-book/book-en/images/fig4-4.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

35 lines
6.6 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 40 880 540" width="880" height="540" 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-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="20" y="50" width="560" height="118" rx="6" fill="#ffffff" stroke="#333333" stroke-width="2" stroke-dasharray="8,4"/>
<text x="36" y="72" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="start" dominant-baseline="central" font-weight="bold">Static prefix (byte-identical, keeps hitting the KV cache)</text>
<rect x="40" y="84" width="520" height="34" rx="6" fill="#d0d0d0" stroke="#333333" stroke-width="2"/>
<text x="300.0" y="101" 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">System Prompt</text>
<rect x="40" y="124" width="520" height="34" rx="6" fill="#d0d0d0" stroke="#333333" stroke-width="2"/>
<text x="300.0" y="141" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">Core tool definitions: web_search, code_interpreter, tool_search</text>
<rect x="20" y="180" width="560" height="386" rx="6" fill="#ffffff" stroke="#333333" stroke-width="2" stroke-dasharray="8,4"/>
<text x="36" y="202" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="start" dominant-baseline="central" font-weight="bold">Trajectory (append-only; new content goes on the end)</text>
<rect x="40" y="214" width="520" height="30" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="300.0" y="229.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="normal">User: look up the NVDA share price</text>
<rect x="40" y="250" width="520" height="30" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="300.0" y="265.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="normal">Assistant: tool_search_call(share price)</text>
<rect x="40" y="286" width="520" height="40" rx="6" fill="#d8e8d8" stroke="#333333" stroke-width="2"/>
<text x="300.0" y="306.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">tool_search_output → inject the full get_stock_quote schema</text>
<rect x="40" y="332" width="520" height="30" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="300.0" y="347.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="normal">Assistant: call get_stock_quote → Tool Result</text>
<rect x="40" y="368" width="520" height="30" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="300.0" y="383.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="normal">User: analyze the contributors of a GitHub repo</text>
<rect x="40" y="404" width="520" height="30" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="300.0" y="419.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="normal">Assistant: tool_search_call(GitHub)</text>
<rect x="40" y="440" width="520" height="40" rx="6" fill="#d8e8d8" stroke="#333333" stroke-width="2"/>
<text x="300.0" y="460.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">tool_search_output → inject list_contributors and related schemas</text>
<rect x="40" y="486" width="520" height="30" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="300.0" y="501.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="normal">Assistant: call → Tool Result → reply</text>
<rect x="40" y="522" width="520" height="30" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="300.0" y="537.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="normal">… latest content of this round</text>
<line x1="562" y1="306.0" x2="592" y2="306.0" stroke="#333333" stroke-width="2" stroke-dasharray="8,4" marker-end="url(#ah)"/>
<line x1="562" y1="460.0" x2="592" y2="460.0" stroke="#333333" stroke-width="2" stroke-dasharray="8,4" marker-end="url(#ah)"/>
<text x="600" y="294.0" 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">First appearance: prefill once (cache write)</text>
<text x="600" y="316.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" fill="#666666" text-anchor="start" dominant-baseline="central" font-weight="normal" style="font-size:12.5px">After that it is ordinary history and hits the cache</text>
<text x="600" y="448.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" fill="#333333" text-anchor="start" dominant-baseline="central" font-weight="bold" style="font-size:13.5px">Never remove or reorder tools already loaded</text>
<text x="600" y="470.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" fill="#666666" text-anchor="start" dominant-baseline="central" font-weight="normal" style="font-size:11px">Otherwise the cache is invalid from the change onward</text>
</svg>