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
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:
@@ -0,0 +1,68 @@
|
||||
<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="250" height="160" rx="6" fill="#ffffff" stroke="#333333" stroke-width="2" stroke-dasharray="8,4"/>
|
||||
<text x="145" y="82" 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">① Log collection</text>
|
||||
<rect x="30" y="98" width="230" height="122" rx="3" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
|
||||
<text x="38" y="112" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central">trajectory_001.json:</text>
|
||||
<text x="38" y="126" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> {"role":"user","content":</text>
|
||||
<text x="38" y="140" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> "Cancel order #12345"}</text>
|
||||
<text x="38" y="154" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> {"role":"assistant",</text>
|
||||
<text x="38" y="168" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> "tool_call":"cancel_order"}</text>
|
||||
<text x="38" y="182" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> {"role":"tool","result":</text>
|
||||
<text x="38" y="196" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> "ERROR: no insurance"}</text>
|
||||
<text x="38" y="210" font-family="'Courier New', Courier, monospace" font-size="8" fill="#333333" text-anchor="start" dominant-baseline="central"> → Agent did not inform user of the reason</text>
|
||||
<line x1="270" y1="140" x2="310" y2="140" stroke="#333333" stroke-width="2" marker-end="url(#ah)"/>
|
||||
<rect x="310" y="60" width="260" height="160" rx="6" fill="#ffffff" stroke="#333333" stroke-width="2" stroke-dasharray="8,4"/>
|
||||
<text x="440" y="82" 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">② LLM analysis</text>
|
||||
<text x="320" y="100" font-family="'Courier New', Courier, monospace" font-size="9.5" fill="#333333" text-anchor="start" dominant-baseline="central">Input: trace + architecture document + PRD</text>
|
||||
<text x="320" y="114" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"></text>
|
||||
<text x="320" y="128" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">Analysis dimensions:</text>
|
||||
<text x="320" y="142" font-family="'Courier New', Courier, monospace" font-size="8" fill="#333333" text-anchor="start" dominant-baseline="central"> - Whether the execution flow meets expectations</text>
|
||||
<text x="320" y="156" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> - Whether tool calls are correct</text>
|
||||
<text x="320" y="170" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> - Whether error handling is appropriate</text>
|
||||
<text x="320" y="184" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> - Whether user experience is satisfactory</text>
|
||||
<text x="320" y="198" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"></text>
|
||||
<text x="320" y="212" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">→ Locate the deviating step and module</text>
|
||||
<line x1="570" y1="140" x2="610" y2="140" stroke="#333333" stroke-width="2" marker-end="url(#ah)"/>
|
||||
<rect x="610" y="60" width="250" height="160" rx="6" fill="#ffffff" stroke="#333333" stroke-width="2" stroke-dasharray="8,4"/>
|
||||
<text x="735" y="82" 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">③ Structured report</text>
|
||||
<rect x="620" y="98" width="230" height="108" rx="3" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
|
||||
<text x="628" y="112" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central">Problem report:</text>
|
||||
<text x="628" y="126" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> Priority: P1 (User Churn Risk)</text>
|
||||
<text x="628" y="140" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> Module: cancellation_handler</text>
|
||||
<text x="628" y="154" font-family="'Courier New', Courier, monospace" font-size="6" fill="#333333" text-anchor="start" dominant-baseline="central"> Description: After cancellation failure, no explanation of</text>
|
||||
<text x="628" y="168" font-family="'Courier New', Courier, monospace" font-size="6.5" fill="#333333" text-anchor="start" dominant-baseline="central"> the reason and alternatives is provided to the user</text>
|
||||
<text x="628" y="182" font-family="'Courier New', Courier, monospace" font-size="8" fill="#333333" text-anchor="start" dominant-baseline="central"> Suggestion: Add failure reason explanation</text>
|
||||
<text x="628" y="196" font-family="'Courier New', Courier, monospace" font-size="9" fill="#333333" text-anchor="start" dominant-baseline="central"> and guidance to purchase insurance</text>
|
||||
<line x1="440.0" y1="220" x2="440.0" y2="260" stroke="#333333" stroke-width="2" marker-end="url(#ah)"/>
|
||||
<rect x="60" y="260" width="370" height="160" rx="6" fill="#ffffff" stroke="#333333" stroke-width="2" stroke-dasharray="8,4"/>
|
||||
<text x="245" y="282" 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">④ Regression Test Case Generation</text>
|
||||
<rect x="70" y="298" width="350" height="150" rx="3" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
|
||||
<text x="78" y="312" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">def test_cancel_no_insurance():</text>
|
||||
<text x="78" y="326" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> """Trajectory #001, Round 3-5"""</text>
|
||||
<text x="78" y="340" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> # Replay: User requests cancellation of economy class</text>
|
||||
<text x="78" y="354" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> resp = agent.run(</text>
|
||||
<text x="78" y="368" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> "Cancel Order #12345")</text>
|
||||
<text x="78" y="382" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> # Verify: Should explain the reason</text>
|
||||
<text x="78" y="396" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> assert "insurance" in resp.text</text>
|
||||
<text x="78" y="410" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> assert "alternative" in resp.text</text>
|
||||
<text x="78" y="424" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> # Verify: Should not directly return an error</text>
|
||||
<text x="78" y="438" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> assert "ERROR" not in resp.text</text>
|
||||
<line x1="430" y1="340" x2="470" y2="340" stroke="#333333" stroke-width="2" marker-end="url(#ah)"/>
|
||||
<rect x="470" y="260" width="380" height="160" rx="6" fill="#ffffff" stroke="#333333" stroke-width="2" stroke-dasharray="8,4"/>
|
||||
<text x="660" y="282" 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">⑤ GitHub Issue Auto-creation</text>
|
||||
<rect x="480" y="298" width="360" height="136" rx="3" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
|
||||
<text x="488" y="312" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">gh issue create \</text>
|
||||
<text x="488" y="326" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> --title "P1: Cancellation failure lacks</text>
|
||||
<text x="488" y="340" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> user guidance" \</text>
|
||||
<text x="488" y="354" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> --body "**Problem**: Agent directly</text>
|
||||
<text x="488" y="368" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> returns an error after cancel_order</text>
|
||||
<text x="488" y="382" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> failure, without explaining the reason...</text>
|
||||
<text x="488" y="396" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> **Trajectory**: #001 Round 3-5</text>
|
||||
<text x="488" y="410" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> **Test**: test_cancel_..." \</text>
|
||||
<text x="488" y="424" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central"> --assignee @backend-team</text>
|
||||
<rect x="100" y="445" width="680" height="44" rx="6" fill="#999999" stroke="#333333" stroke-width="2"/>
|
||||
<text x="440.0" y="460" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="20" fill="#ffffff" text-anchor="middle" dominant-baseline="central" font-weight="bold">End-to-End Automation: Log → Analysis → Report → Test → Issue</text>
|
||||
<text x="440.0" y="480" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#ffffff" text-anchor="middle" dominant-baseline="central" font-weight="normal">Integrate with GitHub via MCP · Test framework auto-replay verification</text>
|
||||
<text x="440.0" y="530" 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="bold">Reduce manual diagnosis cost from hours to minutes</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 12 KiB |
Reference in New Issue
Block a user