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

65 lines
13 KiB
XML
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. 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 570" width="880" height="570" 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="30" y="60" width="280" height="55" rx="6" fill="#d0d0d0" stroke="#333333" stroke-width="2" />
<text x="170" y="73.18" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="15.15" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">Nhu cầu của người dùng</text>
<text x="170" y="0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="13.26" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal"><tspan x="170" dy="88.52">"Tạo dịch vụ hoàn tiền thương mại</tspan><tspan x="170" dy="14.32">điện tử cho khách hàng Agent"</tspan></text>
<line x1="170" y1="115" x2="170" y2="145" stroke="#333333" stroke-width="2" marker-end="url(#ah)" />
<rect x="20" y="145" width="840" height="230" rx="6" fill="#ffffff" stroke="#333333" stroke-width="2" stroke-dasharray="8,4" />
<text x="440" y="168" 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">Meta-Agent (Coding Agent)</text>
<rect x="35" y="185" width="190" height="170" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2" />
<text x="130" y="270" 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">① Đọc mã tham chiếu</text>
<text x="45" y="231.12" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">read_file:</text>
<text x="45" y="244.08" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">agent.py</text>
<text x="45" y="257.04" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">tools/*.py</text>
<text x="45" y="270" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">system_prompt.md</text>
<text x="45" y="282.96" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">config.yaml</text>
<text x="45" y="0" 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"><tspan x="45" dy="295.92">→ Tìm hiểu các mẫu kiến</tspan><tspan x="45" dy="12.96">trúc</tspan></text>
<line x1="225" y1="270" x2="248" y2="270" stroke="#333333" stroke-width="2" marker-end="url(#ah)" />
<rect x="248" y="185" width="190" height="170" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2" />
<text x="343" y="270" 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">② Sao chép giàn giáo</text>
<text x="258" y="237.6" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">cp -r reference/</text>
<text x="258" y="250.56" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">→ new_agent/</text>
<text x="258" y="263.52" 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">dự trữ:</text>
<text x="258" y="276.48" 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">Khung vòng lặp Agent</text>
<text x="258" y="0" 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"><tspan x="258" dy="289.44">Định dạng tin nhắn / tối</tspan><tspan x="258" dy="12.96">ưu hóa KV</tspan></text>
<line x1="438" y1="270" x2="461" y2="270" stroke="#333333" stroke-width="2" marker-end="url(#ah)" />
<rect x="461" y="185" width="190" height="170" rx="6" fill="#d0d0d0" stroke="#333333" stroke-width="2" />
<text x="556" y="270" 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">③ Sửa đổi định hướng</text>
<text x="471" y="231.12" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">edit_file:</text>
<text x="471" y="244.08" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">system_prompt.md</text>
<text x="471" y="0" 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"><tspan x="471" dy="257.04">→ Quy định hoàn tiền</tspan><tspan x="471" dy="12.96">thương mại điện tử</tspan></text>
<text x="471" y="282.96" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">tools/refund.py</text>
<text x="471" y="295.92" 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">→ Đã thêm tool hoàn tiền</text>
<text x="471" y="308.88" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">config.yaml</text>
<line x1="651" y1="270" x2="674" y2="270" stroke="#333333" stroke-width="2" marker-end="url(#ah)" />
<rect x="674" y="185" width="175" height="170" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2" />
<text x="761" y="270" 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">④ Kiểm tra xác minh</text>
<text x="684" y="231.12" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">bash:</text>
<text x="684" y="244.08" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">python agent.py</text>
<text x="684" y="257.04" 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">→ Bắt đầu Agent mới</text>
<text x="684" y="270" 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">→ Gửi tin nhắn kiểm tra</text>
<text x="684" y="282.96" 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">→ Kiểm tra cuộc gọi tool</text>
<text x="684" y="0" 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"><tspan x="684" dy="295.92">→ Xác minh luồng hội</tspan><tspan x="684" dy="12.96">thoại</tspan></text>
<line x1="440.0" y1="375" x2="440.0" y2="410" stroke="#333333" stroke-width="2" marker-end="url(#ah)" />
<rect x="115" y="410" width="700" height="90" rx="6" fill="#ffffff" stroke="#333333" stroke-width="2" stroke-dasharray="8,4" />
<text x="465" y="432" 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">Đã tạo Agent mới</text>
<rect x="135" y="448" width="170" height="42" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2" />
<text x="220" y="457.21" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="middle" dominant-baseline="central">system_prompt.md</text>
<text x="220" y="0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="10.92" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal"><tspan x="220" dy="468.5">Quy định hoàn tiền</tspan><tspan x="220" dy="11.79">thương mại điện tử</tspan></text>
<rect x="313" y="448" width="170" height="42" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2" />
<text x="398" y="457.21" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="middle" dominant-baseline="central">tools/refund.py</text>
<text x="398" y="0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="10.92" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal"><tspan x="398" dy="468.5">Tool yêu cầu/hoàn</tspan><tspan x="398" dy="11.79">tiền</tspan></text>
<rect x="491" y="448" width="170" height="42" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2" />
<text x="576" y="462" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="middle" dominant-baseline="central">agent.py</text>
<text x="576" y="480" 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">Kế thừa mã khung</text>
<rect x="669" y="448" width="170" height="42" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2" />
<text x="754" y="457.21" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="middle" dominant-baseline="central">config.yaml</text>
<text x="754" y="0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="10.92" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal"><tspan x="754" dy="468.5">Cấu hình mô</tspan><tspan x="754" dy="11.79">hình/tham số</tspan></text>
<line x1="30" y1="515" x2="850" y2="515" stroke="#999999" stroke-width="2" stroke-dasharray="8,4" />
<rect x="60" y="530" width="350" height="54" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2" />
<text x="235" y="0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="10.86" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold"><tspan x="235" dy="540.34">Xây dựng từ đầu: thiếu các phương pháp</tspan><tspan x="235" dy="11.73">hay nhất</tspan></text>
<text x="235" 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" font-weight="normal"><tspan x="235" dy="563.33">Quản lý bối cảnh lộn xộn · Thiết kế tool</tspan><tspan x="235" dy="10.8">không được chuẩn hóa · API đã lỗi thời</tspan></text>
<rect x="470" y="530" width="350" height="54" rx="6" fill="#999999" stroke="#333333" stroke-width="2" />
<text x="645" y="0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="10.86" fill="#ffffff" text-anchor="middle" dominant-baseline="central" font-weight="bold"><tspan x="645" dy="540.34">Sửa đổi dựa trên ví dụ: kế thừa các</tspan><tspan x="645" dy="11.73">phương pháp hay nhất</tspan></text>
<text x="645" y="0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="10" fill="#ffffff" text-anchor="middle" dominant-baseline="central" font-weight="normal"><tspan x="645" dy="563.33">Định dạng tin nhắn tiêu chuẩn · Thiết kế tool</tspan><tspan x="645" dy="10.8">tiêu chuẩn · API hiện đại</tspan></text>
</svg>