- Translated and updated the README.md to provide a clearer overview of PicoBot's functionality and architecture in Chinese. - Added a new SVG diagram for message flow to illustrate the process from user input through various components back to the channel. - Created a new SVG diagram for runtime architecture to depict the high-level structure of PicoBot, including channels, gateway, message bus, session manager, agent loop, tools, providers, storage, scheduler, skills, and MCP.
102 lines
4.6 KiB
XML
102 lines
4.6 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" width="1120" height="460" viewBox="0 0 1120 460" role="img" aria-labelledby="title desc">
|
|
<title id="title">PicoBot message flow</title>
|
|
<desc id="desc">Message flow from channel input through bus, session manager, agent loop, tools, provider, storage, outbound dispatcher, and back to the channel.</desc>
|
|
<defs>
|
|
<style>
|
|
.bg { fill: #fbfbf8; }
|
|
.lane { fill: #ffffff; stroke: #d6d3d1; stroke-width: 2; rx: 18; }
|
|
.step { fill: #f4f4f5; stroke: #71717a; stroke-width: 1.6; rx: 12; }
|
|
.in { fill: #e0f2fe; stroke: #0284c7; }
|
|
.state { fill: #ecfdf5; stroke: #059669; }
|
|
.agent { fill: #fff7ed; stroke: #ea580c; }
|
|
.out { fill: #f5f3ff; stroke: #7c3aed; }
|
|
.text { font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; fill: #18181b; }
|
|
.title { font-size: 30px; font-weight: 800; }
|
|
.label { font-size: 17px; font-weight: 700; }
|
|
.small { font-size: 14px; fill: #52525b; }
|
|
.arrow { stroke: #3f3f46; stroke-width: 2.4; fill: none; marker-end: url(#arrow); }
|
|
.soft { stroke: #71717a; stroke-width: 2; fill: none; stroke-dasharray: 7 6; marker-end: url(#arrow-soft); }
|
|
.num { fill: #18181b; font-size: 13px; font-weight: 800; }
|
|
.badge { fill: #ffffff; stroke: #a1a1aa; }
|
|
</style>
|
|
<marker id="arrow" markerWidth="12" markerHeight="12" refX="10" refY="6" orient="auto">
|
|
<path d="M2,2 L10,6 L2,10 Z" fill="#3f3f46" />
|
|
</marker>
|
|
<marker id="arrow-soft" markerWidth="12" markerHeight="12" refX="10" refY="6" orient="auto">
|
|
<path d="M2,2 L10,6 L2,10 Z" fill="#71717a" />
|
|
</marker>
|
|
</defs>
|
|
|
|
<rect class="bg" width="1120" height="460" />
|
|
<text class="text title" x="48" y="56">Message Flow</text>
|
|
<text class="text small" x="48" y="82">A user message becomes a session-scoped agent run, then returns to the original channel.</text>
|
|
|
|
<rect class="lane" x="38" y="122" width="1044" height="236" />
|
|
|
|
<g transform="translate(70 182)">
|
|
<rect class="step in" width="130" height="78" />
|
|
<circle class="badge" cx="18" cy="18" r="13" />
|
|
<text class="text num" x="14" y="23">1</text>
|
|
<text class="text label" x="32" y="37">Channel</text>
|
|
<text class="text small" x="22" y="60">CLI / Feishu</text>
|
|
</g>
|
|
|
|
<g transform="translate(230 182)">
|
|
<rect class="step" width="130" height="78" />
|
|
<circle class="badge" cx="18" cy="18" r="13" />
|
|
<text class="text num" x="14" y="23">2</text>
|
|
<text class="text label" x="30" y="37">MessageBus</text>
|
|
<text class="text small" x="29" y="60">inbound queue</text>
|
|
</g>
|
|
|
|
<g transform="translate(390 182)">
|
|
<rect class="step state" width="150" height="78" />
|
|
<circle class="badge" cx="18" cy="18" r="13" />
|
|
<text class="text num" x="14" y="23">3</text>
|
|
<text class="text label" x="34" y="37">SessionManager</text>
|
|
<text class="text small" x="31" y="60">dialog + context</text>
|
|
</g>
|
|
|
|
<g transform="translate(580 182)">
|
|
<rect class="step agent" width="130" height="78" />
|
|
<circle class="badge" cx="18" cy="18" r="13" />
|
|
<text class="text num" x="14" y="23">4</text>
|
|
<text class="text label" x="34" y="37">AgentLoop</text>
|
|
<text class="text small" x="23" y="60">LLM/tool loop</text>
|
|
</g>
|
|
|
|
<g transform="translate(750 182)">
|
|
<rect class="step agent" width="130" height="78" />
|
|
<circle class="badge" cx="18" cy="18" r="13" />
|
|
<text class="text num" x="14" y="23">5</text>
|
|
<text class="text label" x="48" y="37">Tools</text>
|
|
<text class="text small" x="29" y="60">side effects</text>
|
|
</g>
|
|
|
|
<g transform="translate(920 182)">
|
|
<rect class="step out" width="130" height="78" />
|
|
<circle class="badge" cx="18" cy="18" r="13" />
|
|
<text class="text num" x="14" y="23">6</text>
|
|
<text class="text label" x="30" y="37">Response</text>
|
|
<text class="text small" x="28" y="60">outbound bus</text>
|
|
</g>
|
|
|
|
<path class="arrow" d="M200 221 H230" />
|
|
<path class="arrow" d="M360 221 H390" />
|
|
<path class="arrow" d="M540 221 H580" />
|
|
<path class="arrow" d="M710 221 H750" />
|
|
<path class="arrow" d="M880 221 H920" />
|
|
|
|
<path class="soft" d="M455 182 C460 120 620 116 652 181" />
|
|
<text class="text small" x="500" y="126">recall memory + build prompt</text>
|
|
|
|
<path class="soft" d="M645 260 C640 322 482 326 458 260" />
|
|
<text class="text small" x="496" y="334">persist messages and metadata</text>
|
|
|
|
<path class="soft" d="M815 182 C820 122 918 122 958 181" />
|
|
<text class="text small" x="828" y="126">provider calls</text>
|
|
|
|
<path class="arrow" d="M985 260 C972 390 139 392 135 260" />
|
|
<text class="text small" x="420" y="408">OutboundDispatcher routes the reply back to the same channel/chat scope.</text>
|
|
</svg>
|