<mxGraphModel dx="1200" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1400" pageHeight="950" math="0" shadow="0"><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="title" value="Foreign Trade Assistant — 系统架构图" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=22;fontStyle=1;fontColor=#0F172A;" vertex="1" parent="1"><mxGeometry x="380" y="15" width="500" height="30" as="geometry"/></mxCell><mxCell id="user-browser" value="🌐 外贸业务员浏览器" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#DBEAFE;strokeColor=#3B82F6;fontColor=#1E40AF;fontSize=13;fontStyle=1;arcSize=20;" vertex="1" parent="1"><mxGeometry x="540" y="60" width="200" height="40" as="geometry"/></mxCell><mxCell id="frontend" value="前端 SPA - static/trade_chat.html (2224行)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F5F3FF;strokeColor=#8B5CF6;fontColor=#4C1D95;fontSize=10;arcSize=10;align=center;spacingLeft=10;" vertex="1" parent="1"><mxGeometry x="60" y="60" width="260" height="40" as="geometry"/></mxCell><mxCell id="fe1" style="endArrow=classic;html=1;strokeColor=#8B5CF6;strokeWidth=1.5;exitX=1;exitY=0.5;entryX=0;entryY=0.5;dashed=1;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="320" y="80"/><mxPoint x="540" y="80"/></mxGeometry></mxCell><mxCell id="fastapi" value="FastAPI Server (server.py)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EFF6FF;strokeColor=#2563EB;fontColor=#1E3A5F;fontSize=14;fontStyle=1;arcSize=15;" vertex="1" parent="1"><mxGeometry x="460" y="145" width="360" height="45" as="geometry"/></mxCell><mxCell id="a1" style="endArrow=classic;html=1;strokeColor=#3B82F6;strokeWidth=2;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="640" y="100"/><mxPoint x="640" y="145"/></mxGeometry></mxCell><mxCell id="a2" style="endArrow=classic;html=1;strokeColor=#8B5CF6;strokeWidth=1.5;exitX=0.5;exitY=1;entryX=0.5;entryY=0;dashed=1;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="190" y="100"/><mxPoint x="640" y="145"/></mxGeometry></mxCell><mxCell id="api-routes" value="API 路由 - /api/trade/*" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F8FAFC;strokeColor=#94A3B8;fontColor=#334155;fontSize=10;arcSize=10;align=center;" vertex="1" parent="1"><mxGeometry x="45" y="220" width="210" height="85" as="geometry"/></mxCell><mxCell id="deps" value="中间件/依赖 - Session Token + require_company + CORS" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FEF3C7;strokeColor=#F59E0B;fontColor=#78350F;fontSize=10;arcSize=10;align=center;" vertex="1" parent="1"><mxGeometry x="500" y="220" width="200" height="40" as="geometry"/></mxCell><mxCell id="skills-sync" value="Skills系统(14个) - post_install.py + skill_registry.py" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FEF3C7;strokeColor=#F59E0B;fontColor=#78350F;fontSize=10;arcSize=10;align=center;" vertex="1" parent="1"><mxGeometry x="730" y="220" width="210" height="40" as="geometry"/></mxCell><mxCell id="a3" style="endArrow=classic;html=1;strokeColor=#94A3B8;strokeWidth=1.5;exitX=0;exitY=0.5;entryX=0.5;entryY=0;dashed=1;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="460" y="167"/><mxPoint x="150" y="220"/></mxGeometry></mxCell><mxCell id="a4" style="endArrow=classic;html=1;strokeColor=#F59E0B;strokeWidth=1.5;exitX=0.5;exitY=1;entryX=0.5;entryY=0;dashed=1;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="600" y="190"/><mxPoint x="600" y="220"/></mxGeometry></mxCell><mxCell id="a5" style="endArrow=classic;html=1;strokeColor=#F59E0B;strokeWidth=1.5;exitX=1;exitY=0.5;entryX=0;entryY=0.5;dashed=1;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="820" y="167"/><mxPoint x="730" y="240"/></mxGeometry></mxCell><mxCell id="helpers" value="helpers.py - build_query + create_agent + get_agent_kwargs" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F0FDF4;strokeColor=#10B981;fontColor=#064E3B;fontSize=10;arcSize=10;align=center;" vertex="1" parent="1"><mxGeometry x="45" y="365" width="280" height="40" as="geometry"/></mxCell><mxCell id="skill-router" value="skill_router.py - match_skill + augment_query" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F0FDF4;strokeColor=#10B981;fontColor=#064E3B;fontSize=10;arcSize=10;align=center;" vertex="1" parent="1"><mxGeometry x="360" y="365" width="220" height="40" as="geometry"/></mxCell><mxCell id="prompts" value="prompts.py + prompt.py - resolve_system_prompt (文件→DB→代码)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F0FDF4;strokeColor=#10B981;fontColor=#064E3B;fontSize=10;arcSize=10;align=center;" vertex="1" parent="1"><mxGeometry x="620" y="365" width="270" height="40" as="geometry"/></mxCell><mxCell id="a-b1" style="endArrow=classic;html=1;strokeColor=#94A3B8;strokeWidth=1.5;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="150" y="305"/><mxPoint x="185" y="365"/></mxGeometry></mxCell><mxCell id="a-b2" style="endArrow=classic;html=1;strokeColor=#94A3B8;strokeWidth=1.5;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="600" y="260"/><mxPoint x="470" y="365"/></mxGeometry></mxCell><mxCell id="a-b3" style="endArrow=classic;html=1;strokeColor=#10B981;strokeWidth=1.5;exitX=1;exitY=0.3;entryX=0;entryY=0.3;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="325" y="375"/><mxPoint x="360" y="375"/></mxGeometry></mxCell><mxCell id="a-b3b" style="endArrow=classic;html=1;strokeColor=#10B981;strokeWidth=1.5;exitX=1;exitY=0.7;entryX=0;entryY=0.7;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="580" y="375"/><mxPoint x="620" y="375"/></mxGeometry></mxCell><mxCell id="database" value="database.py - SQLite (WAL+busy_timeout)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F1F5F9;strokeColor=#64748B;fontColor=#334155;fontSize=10;arcSize=10;align=center;" vertex="1" parent="1"><mxGeometry x="45" y="480" width="200" height="40" as="geometry"/></mxCell><mxCell id="company" value="company.py - 多公司CRUD+工作目录" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F1F5F9;strokeColor=#64748B;fontColor=#334155;fontSize=10;arcSize=10;align=center;" vertex="1" parent="1"><mxGeometry x="265" y="480" width="190" height="40" as="geometry"/></mxCell><mxCell id="customer" value="customer.py - 客户CRUD+文档库关联" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F1F5F9;strokeColor=#64748B;fontColor=#334155;fontSize=10;arcSize=10;align=center;" vertex="1" parent="1"><mxGeometry x="475" y="480" width="190" height="40" as="geometry"/></mxCell><mxCell id="chat-mem" value="chat_memory.py - 对话记录+Hindsight记忆" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F1F5F9;strokeColor=#64748B;fontColor=#334155;fontSize=10;arcSize=10;align=center;" vertex="1" parent="1"><mxGeometry x="685" y="480" width="210" height="40" as="geometry"/></mxCell><mxCell id="a-b4" style="endArrow=classic;html=1;strokeColor=#94A3B8;strokeWidth=1.5;exitX=0.5;exitY=1;entryX=0.5;entryY=0;dashed=1;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="185" y="405"/><mxPoint x="145" y="480"/></mxGeometry></mxCell><mxCell id="a-b5" style="endArrow=classic;html=1;strokeColor=#94A3B8;strokeWidth=1.5;exitX=0.5;exitY=1;entryX=0.5;entryY=0;dashed=1;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="470" y="405"/><mxPoint x="360" y="480"/></mxGeometry></mxCell><mxCell id="a-b6" style="endArrow=classic;html=1;strokeColor=#94A3B8;strokeWidth=1.5;exitX=0.5;exitY=1;entryX=0.5;entryY=0;dashed=1;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="755" y="405"/><mxPoint x="570" y="480"/></mxGeometry></mxCell><mxCell id="hermes-agent" value="Hermes Agent (v0.14) - NousResearch/hermes-agent - AIAgent.run_conversation()" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ECFDF5;strokeColor=#059669;fontColor=#064E3B;fontSize=10;arcSize=12;align=center;" vertex="1" parent="1"><mxGeometry x="940" y="240" width="300" height="45" as="geometry"/></mxCell><mxCell id="a-h2" style="endArrow=classic;html=1;strokeColor=#059669;strokeWidth=2;exitX=1;exitY=0.5;entryX=0;entryY=0.5;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="890" y="385"/><mxPoint x="940" y="262"/></mxGeometry></mxCell><mxCell id="provider" value="LLM Provider (MiniMax/OpenAI/Anthropic)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FEF2F2;strokeColor=#EF4444;fontColor=#7F1D1D;fontSize=10;arcSize=15;align=center;" vertex="1" parent="1"><mxGeometry x="960" y="415" width="260" height="35" as="geometry"/></mxCell><mxCell id="github" value="GitHub - Skills更新 + 版本管理" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FEF2F2;strokeColor=#EF4444;fontColor=#7F1D1D;fontSize=10;arcSize=15;align=center;" vertex="1" parent="1"><mxGeometry x="960" y="475" width="260" height="35" as="geometry"/></mxCell><mxCell id="a-p1" style="endArrow=classic;html=1;strokeColor=#EF4444;strokeWidth=1.5;exitX=0.5;exitY=1;entryX=0.5;entryY=0;dashed=1;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="1090" y="285"/><mxPoint x="1090" y="415"/></mxGeometry></mxCell><mxCell id="a-git" style="endArrow=classic;html=1;strokeColor=#EF4444;strokeWidth=1.5;exitX=0;exitY=0.5;entryX=1;entryY=0.5;dashed=1;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="960" y="492"/><mxPoint x="730" y="240"/></mxGeometry></mxCell><mxCell id="osint" value="trade/osint/ - 6层背调: orchestrator → whois/email/sanctions/tech/linkedin/scoring" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EFF6FF;strokeColor=#2563EB;fontColor=#1E3A5F;fontSize=10;arcSize=10;align=center;" vertex="1" parent="1"><mxGeometry x="45" y="610" width="460" height="35" as="geometry"/></mxCell><mxCell id="email-intel" value="email_intel.py - holehe子进程(120+平台)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EFF6FF;strokeColor=#2563EB;fontColor=#1E3A5F;fontSize=10;arcSize=10;align=center;" vertex="1" parent="1"><mxGeometry x="530" y="610" width="260" height="35" as="geometry"/></mxCell><mxCell id="a-osint" style="endArrow=classic;html=1;strokeColor=#2563EB;strokeWidth=1.5;exitX=0.5;exitY=1;entryX=0.5;entryY=0;dashed=1;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="600" y="260"/><mxPoint x="275" y="610"/></mxGeometry></mxCell><mxCell id="ds-sqlite" value="~/.trade/data/trade.db" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;fillColor=#F1F5F9;strokeColor=#64748B;fontColor=#334155;fontSize=10;size=10;" vertex="1" parent="1"><mxGeometry x="120" y="700" width="140" height="45" as="geometry"/></mxCell><mxCell id="ds-hermes" value="~/.hermes/skills/ memories/ cron/" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F1F5F9;strokeColor=#64748B;fontColor=#334155;fontSize=10;arcSize=10;align=center;" vertex="1" parent="1"><mxGeometry x="340" y="700" width="210" height="45" as="geometry"/></mxCell><mxCell id="ds-companies" value="~/.trade/companies/{slug}/" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F1F5F9;strokeColor=#64748B;fontColor=#334155;fontSize=10;arcSize=10;align=center;" vertex="1" parent="1"><mxGeometry x="610" y="700" width="200" height="45" as="geometry"/></mxCell><mxCell id="a-db1" style="endArrow=classic;html=1;strokeColor=#64748B;strokeWidth=1.5;exitX=0.5;exitY=1;entryX=0.5;entryY=0;dashed=1;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="275" y="645"/><mxPoint x="190" y="700"/></mxGeometry></mxCell><mxCell id="a-db2" style="endArrow=classic;html=1;strokeColor=#64748B;strokeWidth=1.5;exitX=0.5;exitY=1;entryX=0.5;entryY=0;dashed=1;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="660" y="645"/><mxPoint x="445" y="700"/></mxGeometry></mxCell><mxCell id="a-db3" style="endArrow=classic;html=1;strokeColor=#64748B;strokeWidth=1.5;exitX=0.5;exitY=1;entryX=0.5;entryY=0;dashed=1;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="500" y="520"/><mxPoint x="710" y="700"/></mxGeometry></mxCell></root></mxGraphModel>