ai-agent-book 精选快照(<2MB 代码与文档,来自 github.com/bojieli/ai-agent-book)
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

This commit is contained in:
2026-08-20 13:12:50 +00:00
commit b119135836
10275 changed files with 3284984 additions and 0 deletions
+65
View File
@@ -0,0 +1,65 @@
<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="80" 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">Requisito del usuario</text>
<text x="170" y="98" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="12" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">&quot;Crear un Agente de at. cliente para devoluciones&quot;</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-Agente (Agente de programación)</text>
<rect x="35" y="185" width="190" height="170" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="130" y="205" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="15" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">① Leer código referencia</text>
<text x="45" y="228" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">read_file:</text>
<text x="45" y="248" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central"> agent.py</text>
<text x="45" y="268" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central"> tools/*.py</text>
<text x="45" y="288" 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="308" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central"> config.yaml</text>
<text x="45" y="332" 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">→ Entender patrones arquit.</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="205" 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">② Copiar esqueleto</text>
<text x="258" y="228" 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="248" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central"> → new_agent/</text>
<text x="258" y="278" 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">Conservar:</text>
<text x="258" y="298" 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"> Marco del bucle del Agente</text>
<text x="258" y="318" 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"> Formato mens. / opt. KV</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="205" 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">③ Cambios dirigidos</text>
<text x="471" y="228" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">edit_file:</text>
<text x="471" y="248" 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="268" 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"> → Reglas devolución e-comm.</text>
<text x="471" y="290" 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="310" 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"> → Agregar herramienta</text>
<text x="471" y="332" 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="205" 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">④ Prueba de validación</text>
<text x="684" y="228" font-family="'Courier New', Courier, monospace" font-size="12" fill="#333333" text-anchor="start" dominant-baseline="central">bash:</text>
<text x="684" y="248" 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="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"> → Iniciar nuevo Agente</text>
<text x="684" y="290" 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"> → Enviar mensajes prueba</text>
<text x="684" y="310" 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"> → Revisar llamadas herram.</text>
<text x="684" y="330" 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"> → Validar flujo chat</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">Nuevo Agente producido</text>
<rect x="135" y="448" width="170" height="42" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="220" y="462" 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="480" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">Reglas devolución e-commerce</text>
<rect x="313" y="448" width="170" height="42" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="398" y="462" 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="480" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="10.5" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">Herramientas devolución/consulta</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="13" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">Código de marco heredado</text>
<rect x="669" y="448" width="170" height="42" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="754" y="462" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="middle" dominant-baseline="central">config.yaml</text>
<text x="754" y="480" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="10.5" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">Configuración modelo/parámetros</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="549" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="15" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">Generación desde cero: faltan mejores prácticas</text>
<text x="235" y="571" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11.5" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">Gestión azarosa de contexto · Diseño no estándar · API obsoleta</text>
<rect x="470" y="530" width="350" height="54" rx="6" fill="#999999" stroke="#333333" stroke-width="2"/>
<text x="645" y="549" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="12.5" fill="#ffffff" text-anchor="middle" dominant-baseline="central" font-weight="bold">Adaptación desde ejemplo: hereda las mejores prácticas</text>
<text x="645" y="571" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="11.5" fill="#ffffff" text-anchor="middle" dominant-baseline="central" font-weight="normal">Formato estándar · Diseño herramientas estándar · API moderna</text>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB