updated-policy / assets /agent_loop.svg
srinjoyd's picture
fix issues with blog
dca255f
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 480" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif">
<rect width="1200" height="480" fill="#ffffff"/>
<defs>
<marker id="arr2" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto">
<path d="M 0 0 L 10 5 L 0 10 z" fill="#374151"/>
</marker>
<filter id="sh2" x="-20%" y="-20%" width="140%" height="140%">
<feDropShadow dx="0" dy="2" stdDeviation="3" flood-opacity="0.08"/>
</filter>
</defs>
<text x="600" y="40" font-size="22" font-weight="700" text-anchor="middle" fill="#111827">The agent loop — partial observation, hierarchical action</text>
<text x="600" y="65" font-size="13" fill="#6b7280" text-anchor="middle">validate → mutate → tick → observe → reward</text>
<!-- Agent box -->
<g filter="url(#sh2)">
<rect x="80" y="170" width="260" height="160" rx="14" fill="#eef2ff" stroke="#6366f1" stroke-width="1.5"/>
<text x="210" y="200" font-size="16" font-weight="700" text-anchor="middle" fill="#3730a3">LLM Agent</text>
<text x="210" y="222" font-size="11" text-anchor="middle" fill="#4338ca">(Qwen2.5-7B + LoRA)</text>
<text x="100" y="250" font-size="12" fill="#374151">emits one JSON action:</text>
<text x="100" y="272" font-size="11" font-family="ui-monospace,monospace" fill="#111">{</text>
<text x="115" y="288" font-size="11" font-family="ui-monospace,monospace" fill="#111">"action_type": "...",</text>
<text x="115" y="302" font-size="11" font-family="ui-monospace,monospace" fill="#111">"target_service": "...",</text>
<text x="115" y="316" font-size="11" font-family="ui-monospace,monospace" fill="#111">"parameters": { ... }</text>
<text x="100" y="332" font-size="11" font-family="ui-monospace,monospace" fill="#111">}</text>
</g>
<!-- Env box -->
<g filter="url(#sh2)">
<rect x="860" y="170" width="260" height="160" rx="14" fill="#fef3c7" stroke="#f59e0b" stroke-width="1.5"/>
<text x="990" y="200" font-size="16" font-weight="700" text-anchor="middle" fill="#92400e">incident_env</text>
<text x="990" y="222" font-size="11" text-anchor="middle" fill="#b45309">FastAPI / OpenEnv</text>
<text x="880" y="252" font-size="12" fill="#374151">7 reactive services</text>
<text x="880" y="272" font-size="12" fill="#374151">10 P1 actions · 7 P2 actions</text>
<text x="880" y="292" font-size="12" fill="#374151">10 scenarios across 4 pools</text>
<text x="880" y="312" font-size="12" fill="#374151">phase-aware step dispatch</text>
</g>
<!-- Arrows -->
<path d="M 340 230 Q 600 150 860 230" stroke="#374151" stroke-width="2" fill="none" marker-end="url(#arr2)"/>
<text x="600" y="170" font-size="13" font-weight="600" text-anchor="middle" fill="#111">action (POST /step)</text>
<path d="M 860 290 Q 600 380 340 290" stroke="#374151" stroke-width="2" fill="none" marker-end="url(#arr2)"/>
<text x="600" y="395" font-size="13" font-weight="600" text-anchor="middle" fill="#111">observation, reward, valid_actions, done</text>
<!-- Observation card -->
<g filter="url(#sh2)">
<rect x="430" y="220" width="340" height="100" rx="10" fill="#ffffff" stroke="#e5e7eb" stroke-width="1"/>
<text x="600" y="245" font-size="13" font-weight="700" text-anchor="middle" fill="#111">Partial observation (POMDP)</text>
<text x="445" y="268" font-size="11" fill="#374151">· alerts, metrics, logs, deps, deploys</text>
<text x="445" y="284" font-size="11" fill="#374151">· service_statuses + cumulative_reward</text>
<text x="445" y="300" font-size="11" fill="#374151">· valid_actions (action mask)</text>
<text x="445" y="316" font-size="11" fill="#dc2626" font-weight="600">never: fault_type, is_bad, root cause</text>
</g>
</svg>