Files
kandev/docs/screenshots/agent-communication.svg
T
2026-09-03 23:12:45 +00:00

67 lines
6.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<svg width="840" height="600" viewBox="16 0 840 600" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="agent-communication-title agent-communication-desc">
<title id="agent-communication-title">Agents agree on a contract</title>
<desc id="agent-communication-desc">Agent A in the backend proposes a GET items contract to Agent B in the frontend. Agent B requests created_at, Agent A queues the reply, and Agent A confirms the agreed contract before both agents implement it.</desc>
<defs><style>@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&amp;family=Geist:wght@400;500;600&amp;family=Geist+Mono:wght@400;500;600&amp;family=Figtree:wght@400;500;600&amp;display=swap');</style>
<marker id="agent-communication-arrow" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto">
<polygon points="0 0, 8 3, 0 6" fill="#a1a1a1"/>
</marker>
<marker id="agent-communication-arrow-accent" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto">
<polygon points="0 0, 8 3, 0 6" fill="#6468f0"/>
</marker>
</defs>
<rect x="0" y="0" width="960" height="600" fill="#0d0d10"/>
<!-- Lifelines are deliberately quiet; messages carry the sequence meaning. -->
<line x1="264" y1="104" x2="264" y2="536" stroke="#737373" stroke-width="1" stroke-dasharray="4 4"/>
<line x1="696" y1="104" x2="696" y2="536" stroke="#737373" stroke-width="1" stroke-dasharray="4 4"/>
<rect x="260" y="152" width="8" height="328" rx="2" fill="#404040"/>
<rect x="692" y="168" width="8" height="96" rx="2" fill="#404040"/>
<!-- Messages. The third message is the single focal agreement signal. -->
<path d="M264 168 H696" fill="none" stroke="#a1a1a1" stroke-width="1.2" stroke-linecap="round" marker-end="url(#agent-communication-arrow)"/>
<path d="M696 264 H264" fill="none" stroke="#a1a1a1" stroke-width="1.2" stroke-linecap="round" marker-end="url(#agent-communication-arrow)"/>
<path d="M264 360 H696" fill="none" stroke="#6468f0" stroke-width="1.4" stroke-linecap="round" marker-end="url(#agent-communication-arrow-accent)"/>
<path d="M264 456 H320 Q328 456 328 464 V480 Q328 488 320 488 H264" fill="none" stroke="#a1a1a1" stroke-width="1.2" stroke-dasharray="4 4" stroke-linecap="round" marker-end="url(#agent-communication-arrow)"/>
<!-- Arrow labels use paper masks and a compact technical register. -->
<rect x="320" y="132" width="320" height="20" rx="4" fill="#0d0d10"/>
<text x="480" y="146" text-anchor="middle" fill="#a1a1a1" font-size="12" font-family="'Geist Mono', monospace" letter-spacing="0.04em">message_task_kandev(B) · GET /items</text>
<rect x="320" y="228" width="320" height="20" rx="4" fill="#0d0d10"/>
<text x="480" y="242" text-anchor="middle" fill="#a1a1a1" font-size="12" font-family="'Geist Mono', monospace" letter-spacing="0.04em">message_task_kandev(A) · add created_at</text>
<rect x="320" y="324" width="320" height="20" rx="4" fill="#0d0d10"/>
<text x="480" y="338" text-anchor="middle" fill="#6468f0" font-size="12" font-family="'Geist Mono', monospace" letter-spacing="0.04em">message_task_kandev(B) · contract agreed</text>
<rect x="336" y="412" width="264" height="20" rx="4" fill="#0d0d10"/>
<text x="468" y="426" text-anchor="middle" fill="#a1a1a1" font-size="12" font-family="'Geist Mono', monospace" letter-spacing="0.04em">get_task_conversation_kandev(B)</text>
<!-- State notes translate the source sequence notes into visible checkpoints. -->
<rect x="608" y="192" width="176" height="40" rx="4" fill="#111114" stroke="#404040" stroke-width="1"/>
<text x="620" y="210" fill="#ffffff" font-size="12" font-family="'Geist Mono', monospace">idle → "sent"</text>
<text x="620" y="224" fill="#737373" font-size="12" font-family="'Geist Mono', monospace">new turn</text>
<rect x="176" y="288" width="176" height="40" rx="4" fill="#111114" stroke="#404040" stroke-width="1"/>
<text x="188" y="306" fill="#ffffff" font-size="12" font-family="'Geist Mono', monospace">running → "queued"</text>
<text x="188" y="320" fill="#737373" font-size="12" font-family="'Geist Mono', monospace">next turn</text>
<rect x="320" y="504" width="320" height="32" rx="4" fill="#111114" stroke="#404040" stroke-width="1"/>
<text x="480" y="524" text-anchor="middle" fill="#a1a1a1" font-size="12" font-family="'Geist Mono', monospace" letter-spacing="0.06em">CONTRACT AGREED · BOTH IMPLEMENT</text>
<!-- Participants sit above the lifelines. -->
<g role="group" aria-label="Agent A backend">
<rect x="144" y="48" width="240" height="56" rx="8" fill="#111114" stroke="#404040" stroke-width="1"/>
<text x="264" y="72" text-anchor="middle" fill="#ffffff" font-size="16" font-weight="600" font-family="'Figtree', 'Geist', sans-serif">Agent A</text>
<text x="264" y="92" text-anchor="middle" fill="#737373" font-size="8" font-family="'Geist Mono', monospace">backend</text>
</g>
<g role="group" aria-label="Agent B frontend">
<rect x="576" y="48" width="240" height="56" rx="8" fill="#111114" stroke="#404040" stroke-width="1"/>
<text x="696" y="72" text-anchor="middle" fill="#ffffff" font-size="16" font-weight="600" font-family="'Figtree', 'Geist', sans-serif">Agent B</text>
<text x="696" y="92" text-anchor="middle" fill="#737373" font-size="8" font-family="'Geist Mono', monospace">frontend</text>
</g>
<line x1="56" y1="568" x2="88" y2="568" stroke="#a1a1a1" stroke-width="1.2" marker-end="url(#agent-communication-arrow)"/>
<text x="104" y="572" fill="#a1a1a1" font-size="12" font-family="'Geist Mono', monospace" letter-spacing="0.06em">TASK MESSAGE</text>
<line x1="280" y1="568" x2="312" y2="568" stroke="#6468f0" stroke-width="1.4" marker-end="url(#agent-communication-arrow-accent)"/>
<text x="328" y="572" fill="#6468f0" font-size="12" font-family="'Geist Mono', monospace" letter-spacing="0.06em">AGREEMENT</text>
<line x1="480" y1="568" x2="512" y2="568" stroke="#a1a1a1" stroke-width="1.2" stroke-dasharray="4 4" marker-end="url(#agent-communication-arrow)"/>
<text x="528" y="572" fill="#a1a1a1" font-size="12" font-family="'Geist Mono', monospace" letter-spacing="0.06em">READ-BACK</text>
</svg>