Files
ai-agent-book/book-tr/images/fig10-1.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

68 lines
9.6 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 40 780 520" width="780" 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="55" width="350" height="480" rx="8" fill="#ffffff" stroke="#333333" stroke-width="2" stroke-dasharray="8,4"/>
<text x="32" y="73" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#666666" text-anchor="start" dominant-baseline="central" font-weight="bold">Shared Context (Inherited Collaboration)</text>
<g transform="translate(0 4)">
<rect x="35" y="82" width="320" height="100" rx="4" fill="#d0d0d0" stroke="#333333" stroke-width="2"/>
<text x="43" y="96" 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">Phase 1: Requirements Analyst</text>
<text x="47" y="114" font-family="'Courier New', Courier, monospace" font-size="7" fill="#333333" text-anchor="start" dominant-baseline="central">sys: "Your responsibility is to fully understand the requirements..."</text>
<text x="47" y="132" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">tools: [ask_question, save_req]</text>
<text x="47" y="150" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">user: "Write a CSV analysis script"</text>
<text x="47" y="168" font-family="'Courier New', Courier, monospace" font-size="11" fill="#333333" text-anchor="start" dominant-baseline="central">agent: "What file types need to be processed?"</text>
<g transform="translate(0 10)">
<rect x="35" y="184" width="320" height="100" rx="4" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="43" y="198" 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">Phase 2: Software Engineer</text>
<text x="47" y="216" font-family="'Courier New', Courier, monospace" font-size="9.5" fill="#333333" text-anchor="start" dominant-baseline="central">sys: "Write code based on confirmed requirements..."</text>
<text x="47" y="234" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">tools: [write_file, execute_code]</text>
<text x="47" y="252" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">agent: write_file(&quot;analyze.py&quot;, ...)</text>
<text x="47" y="270" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">agent: execute_code(&quot;python test.py&quot;)</text>
</g>
<g transform="translate(0 20)">
<rect x="35" y="286" width="320" height="100" rx="4" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="43" y="300" 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">Phase 3: Code Reviewer</text>
<text x="47" y="318" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">sys: "Review code quality and security..."</text>
<text x="47" y="336" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">tools: [run_linter, run_tests]</text>
<text x="47" y="354" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">agent: run_linter → 2 warnings</text>
<text x="47" y="372" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">agent: approve_code()</text>
</g>
<g transform="translate(0 38)">
<rect x="35" y="388" width="320" height="28" rx="3" fill="#f5f5f5" stroke="#333333" stroke-width="2"/>
<text x="195" y="402" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="13" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">↑ All phases share the same conversation history</text>
<text x="195" y="434" 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">✓ Complete trace</text>
<text x="195" y="456" 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">✗ Rapid context expansion</text>
</g>
</g>
<rect x="410" y="55" width="350" height="480" rx="8" fill="#ffffff" stroke="#333333" stroke-width="2" stroke-dasharray="8,4"/>
<text x="422" y="73" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#666666" text-anchor="start" dominant-baseline="central" font-weight="bold">No Shared Context (Isolated Collaboration)</text>
<g transform="translate(0 4)">
<rect x="425" y="82" width="320" height="80" rx="4" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="433" y="96" 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">Glossary Agent</text>
<text x="437" y="114" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">sys: "Identify terms and translate..."</text>
<text x="437" y="132" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">tools: [search_dict, write_file]</text>
<text x="437" y="150" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">→ glossary.json</text>
<g transform="translate(0 10)">
<rect x="425" y="170" width="320" height="80" rx="4" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="433" y="184" 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">Translation Agent</text>
<text x="437" y="202" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">sys: "Translate this chapter..."</text>
<text x="437" y="220" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">tools: [read_file, write_file]</text>
<text x="437" y="238" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">→ chapter1_zh.md</text>
</g>
<g transform="translate(0 20)">
<rect x="425" y="258" width="320" height="80" rx="4" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="433" y="272" 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">Proofreading Agent</text>
<text x="437" y="290" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">sys: "Check terminology consistency..."</text>
<text x="437" y="308" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">tools: [read_file, write_file]</text>
<text x="437" y="326" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">→ review_report.md</text>
</g>
<g transform="translate(0 39)">
<rect x="425" y="351" width="320" height="65" rx="4" fill="#d0d0d0" stroke="#333333" stroke-width="2"/>
<text x="585" y="367" 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">Shared File System</text>
<text x="437" y="389" font-family="'Courier New', Courier, monospace" font-size="10.5" fill="#333333" text-anchor="start" dominant-baseline="central">glossary.json chapter1_zh.md review_report.md</text>
<text x="585" y="406" 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">+ Tool call parameters pass structured data</text>
<text x="585" y="433" 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">✓ Modular · Extensible · Parallel</text>
<text x="585" y="455" 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">✗ Complex information synchronization</text>
</g>
</g>
</svg>