Files
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

60 lines
10 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 40 880 520" width="880" height="520" 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="60" width="200" height="60" rx="6" fill="#d0d0d0" stroke="#333333" stroke-width="2"/>
<text x="120" y="82" 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">User input</text>
<text x="120" y="100" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="13" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">&quot;I want to book a flight to Beijing&quot;</text>
<line x1="220" y1="90" x2="260" y2="90" stroke="#333333" stroke-width="2" marker-end="url(#ah)"/>
<rect x="260" y="55" width="260" height="140" rx="6" fill="#ffffff" stroke="#333333" stroke-width="2" stroke-dasharray="8,4"/>
<text x="390" y="75" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14.5" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">LLM analysis → Generate form code</text>
<rect x="270" y="90" width="240" height="140" rx="3" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
<text x="276" y="103" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central">&lt;form id=&quot;clarify&quot;&gt;</text>
<text x="276" y="116" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> &lt;input type=&quot;text&quot;</text>
<text x="276" y="129" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> name=&quot;from&quot; label=&quot;Departure city&quot;/&gt;</text>
<text x="276" y="142" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> &lt;input type=&quot;date&quot;</text>
<text x="276" y="155" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> name=&quot;depart&quot; label=&quot;Departure date&quot;/&gt;</text>
<text x="276" y="168" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> &lt;select name=&quot;type&quot;&gt;</text>
<text x="276" y="181" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> &lt;option&gt;One-way&lt;/option&gt;</text>
<text x="276" y="194" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> &lt;option&gt;Round Trip&lt;/option&gt;</text>
<text x="276" y="207" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> &lt;/select&gt;</text>
<text x="276" y="220" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central">&lt;/form&gt;</text>
<line x1="520" y1="130" x2="560" y2="130" stroke="#333333" stroke-width="2" marker-end="url(#ah)"/>
<rect x="560" y="55" width="300" height="200" rx="6" fill="#ffffff" stroke="#333333" stroke-width="2"/>
<text x="710" y="75" 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">Rendered form interface</text>
<text x="580" y="95" 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">Departure City</text>
<rect x="660" y="83" width="180" height="24" rx="3" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
<text x="668" y="95" font-family="'Courier New', Courier, monospace" font-size="11" fill="#333333" text-anchor="start" dominant-baseline="central">Shanghai</text>
<text x="580" y="135" 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">Departure Date</text>
<rect x="660" y="123" width="180" height="24" rx="3" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
<text x="668" y="135" font-family="'Courier New', Courier, monospace" font-size="11" fill="#333333" text-anchor="start" dominant-baseline="central">2025-08-15</text>
<text x="580" y="175" 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">Trip Type</text>
<rect x="660" y="163" width="180" height="24" rx="3" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
<text x="668" y="175" font-family="'Courier New', Courier, monospace" font-size="11" fill="#333333" text-anchor="start" dominant-baseline="central">Round Trip ▾</text>
<text x="580" y="215" 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">Return Date</text>
<rect x="660" y="203" width="180" height="24" rx="3" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
<text x="668" y="215" font-family="'Courier New', Courier, monospace" font-size="11" fill="#333333" text-anchor="start" dominant-baseline="central">2025-08-22</text>
<rect x="660" y="238" width="80" height="26" rx="13" fill="#999999" stroke="#333333" stroke-width="2"/>
<text x="700.0" y="251.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#ffffff" text-anchor="middle" dominant-baseline="central" font-weight="bold">Submit</text>
<line x1="710" y1="268" x2="710" y2="300" stroke="#333333" stroke-width="2" marker-end="url(#ah)"/>
<rect x="560" y="300" width="300" height="110" rx="6" fill="#ffffff" stroke="#333333" stroke-width="2" stroke-dasharray="8,4"/>
<text x="710" y="318" 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">Structured JSON Response</text>
<rect x="570" y="330" width="280" height="74" rx="3" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
<text x="578" y="344" font-family="'Courier New', Courier, monospace" font-size="11" fill="#333333" text-anchor="start" dominant-baseline="central">{&quot;from&quot;: &quot;Shanghai&quot;,</text>
<text x="578" y="360" font-family="'Courier New', Courier, monospace" font-size="11" fill="#333333" text-anchor="start" dominant-baseline="central"> &quot;depart&quot;: &quot;2025-08-15&quot;,</text>
<text x="578" y="376" font-family="'Courier New', Courier, monospace" font-size="11" fill="#333333" text-anchor="start" dominant-baseline="central"> &quot;type&quot;: &quot;Round Trip&quot;,</text>
<text x="578" y="392" font-family="'Courier New', Courier, monospace" font-size="11" fill="#333333" text-anchor="start" dominant-baseline="central"> &quot;return&quot;: &quot;2025-08-22&quot;}</text>
<line x1="560" y1="390" x2="400" y2="440" stroke="#333333" stroke-width="2" marker-end="url(#ah)"/>
<rect x="100" y="430" width="500" height="50" rx="6" fill="#d0d0d0" stroke="#333333" stroke-width="2"/>
<text x="350" y="448" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="20" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">Agent continues execution with complete parameters</text>
<text x="350" y="468" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">search_flights(from='Shanghai', to='Beijing', depart='2025-08-15', ...)</text>
<rect x="20" y="280" width="250" height="140" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="145" y="300" 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">Comparison: Plain Text vs Form</text>
<text x="30" y="318" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">Text Q&amp;A: 10 rounds of dialogue</text>
<text x="30" y="331" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> Q1: Departure city? A: Shanghai</text>
<text x="30" y="344" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> Q2: Date? A: August 15</text>
<text x="30" y="357" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> Q3: One-way or round trip? ...</text>
<text x="30" y="370" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"></text>
<text x="30" y="383" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">Dynamic Form: 1 submission</text>
<text x="30" y="396" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> All information collected at once</text>
<text x="30" y="409" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> Cascading logic handled automatically</text>
<text x="440.0" y="510" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">Form code dynamically generated by LLM → Cascading logic: automatically show return date when &quot;Round Trip&quot; is selected</text>
</svg>