<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="eli.ai" agent="eli.ai diagram exporter" version="1">
  <diagram id="ai-platform-simplified-system-view-f0dc7f24" name="AI platform — simplified system view">
    <mxGraphModel dx="1600" dy="1200" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1600" pageHeight="1200" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <object id="1" label="AI platform — simplified system view" schemaVersion="1" diagramId="ai-platform-simplified-system-view-f0dc7f24" canonicalAppearanceKey="md:docs/architecture/workspace/04-ai-platform.md#1" sourceSha256="f0dc7f24c53544d2e1c858797db9a28daee6b185adc6a1c9309e8f8413afe2b1" metadataPayloadSha256="f9bd84d91924c69d7cf76b5355c4dc2445f771e2d297c2e43a42afcbb1068bbd" generationKey="5afaa8049af62edcc37d026501f491faf82691fb0b06d6a0fe7283cbef842331" concepts="[&quot;AI platform&quot;]" keywords="[&quot;anthropic / openai / google / ...&quot;,&quot;eli UI&quot;,&quot;Native AI routes&quot;,&quot;* + chat + digest&quot;,&quot;External OpenAI clients&quot;,&quot;Key resolver&quot;,&quot;RAG context over notes&quot;,&quot;Vercel AI Gateway&quot;,&quot;editor, VaultChat, settings&quot;,&quot;Bearer PAT or local token&quot;,&quot;/ OpenAI-compatible facade&quot;,&quot;saas-byok - local-byok - gateway master&quot;,&quot;Hybrid search + vault tools&quot;,&quot;tier registry, failover, HIPAA allowlist&quot;,&quot;Usage metering + read-time pricing&quot;,&quot;/api/ai&quot;]" application="{&quot;name&quot;:&quot;eli-ai&quot;,&quot;version&quot;:&quot;0.1.0&quot;}" packages="{&quot;mermaid&quot;:&quot;11.16.0&quot;,&quot;mermaidCli&quot;:&quot;11.16.0&quot;,&quot;playwright&quot;:&quot;1.62.1&quot;,&quot;playwrightCore&quot;:&quot;1.62.1&quot;,&quot;puppeteer&quot;:&quot;25.6.0&quot;,&quot;puppeteerCore&quot;:&quot;25.6.0&quot;}" environment="{&quot;architecture&quot;:&quot;x64&quot;,&quot;containerImage&quot;:&quot;playwright:v1.62.1-noble@sha256:c091b21d9fae78c76e85cd4356431e9b018402f172a214fc7d7a5e9a7e29d8ac+node:26.3.1-bookworm-slim@sha256:209558c3e5e40e8adff68959d3c2ba7cd73723e716d89196878a0c362fa1e109&quot;,&quot;node&quot;:&quot;v26.3.1&quot;,&quot;platform&quot;:&quot;linux&quot;,&quot;yarn&quot;:&quot;4.17.1&quot;}" renderer="{&quot;browser&quot;:{&quot;executableSha256&quot;:&quot;0b20b130e7edd9dd51873be867761295fe0cfad490c2b9a64f95bd3cfc08fa71&quot;,&quot;name&quot;:&quot;chromium&quot;,&quot;revision&quot;:&quot;1234&quot;,&quot;version&quot;:&quot;151.0.7922.34&quot;},&quot;font&quot;:{&quot;family&quot;:&quot;Eli Diagram Inter Variable&quot;,&quot;fileSha256&quot;:&quot;3100e775e8616cd2611beecfa23a4263d7037586789b43f035236a2e6fbd4c62&quot;,&quot;licenseSha256&quot;:&quot;3b0a5fca3d17942cde889069889dedbbbd075e9b599968c82a95f4d944e9b345&quot;},&quot;mermaidConfigSha256&quot;:&quot;68c10966fe84406ee626034d58bfabd555df9f65f691204b7c46db24038da101&quot;,&quot;themeCssSha256&quot;:&quot;c80287a78d80ad63d27bd5ca348b2ef9a7e2f44da289e436be6484ea28a1b033&quot;}" adapterVersions="{&quot;diagramGenerator&quot;:&quot;2&quot;,&quot;drawioFlowchart&quot;:&quot;1&quot;,&quot;drawioGantt&quot;:&quot;1&quot;,&quot;drawioSequence&quot;:&quot;1&quot;,&quot;drawioState&quot;:&quot;1&quot;}" mermaidType="flowchart" direction="LR" generatedAt="2026-08-12T23:36:37.004Z" mermaidSource="flowchart LR&#10;  ui[&quot;eli UI&lt;br/&gt;(editor, VaultChat, settings)&quot;] --&gt; routes[&quot;Native AI routes&lt;br/&gt;/api/ai/* + chat + digest&quot;]&#10;  extc[&quot;External OpenAI clients&lt;br/&gt;(Bearer PAT or local token)&quot;] --&gt; v1f[&quot;/v1 OpenAI-compatible facade&quot;]&#10;  routes --&gt; resolver[&quot;Key resolver&lt;br/&gt;saas-byok - local-byok - gateway master&quot;]&#10;  v1f --&gt; resolver&#10;  routes --&gt; rag[&quot;Hybrid search + vault tools&lt;br/&gt;(RAG context over notes)&quot;]&#10;  v1f --&gt; rag&#10;  resolver --&gt; vgw[&quot;Vercel AI Gateway&lt;br/&gt;tier registry, failover, HIPAA allowlist&quot;]&#10;  vgw --&gt; prov[&quot;anthropic / openai / google / ...&quot;]&#10;  routes --&gt; meter[&quot;Usage metering + read-time pricing&quot;]">
          <mxCell parent="0"/>
        </object>
        <object id="n:ui" label="eli UI(editor, VaultChat, settings)" mermaidId="ui" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="8" y="217" width="256" height="100" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:routes" label="Native AI routes/api/ai/* + chat + digest" mermaidId="routes" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="324.34375" y="229" width="235.3125" height="76" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:extc" label="External OpenAI clients(Bearer PAT or local token)" mermaidId="extc" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="8" y="8" width="256" height="100" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:v1f" label="/v1 OpenAI-compatible facade" mermaidId="v1f" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="314" y="20" width="256" height="76" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:resolver" label="Key resolversaas-byok - local-byok - gateway master" mermaidId="resolver" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="620" y="8" width="256" height="100" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:rag" label="Hybrid search + vault tools(RAG context over notes)" mermaidId="rag" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="620" y="158" width="256" height="100" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:vgw" label="Vercel AI Gatewaytier registry, failover, HIPAA allowlist" mermaidId="vgw" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="926" y="8" width="256" height="100" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:prov" label="anthropic / openai / google / ..." mermaidId="prov" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="1232" y="20" width="256" height="76" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:meter" label="Usage metering + read-time pricing" mermaidId="meter" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="620" y="308" width="256" height="76" as="geometry"/>
          </mxCell>
        </object>
        <object id="e:L_ui_routes_0" label="" mermaidId="L_ui_routes_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:ui" target="n:routes" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="264" y="267" as="sourcePoint"/>
              <mxPoint x="324.34375" y="267" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="289" y="267"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_extc_v1f_0" label="" mermaidId="L_extc_v1f_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:extc" target="n:v1f" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="264" y="58" as="sourcePoint"/>
              <mxPoint x="314" y="58" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="289" y="58"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_routes_resolver_0" label="" mermaidId="L_routes_resolver_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:routes" target="n:resolver" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="482.375" y="229" as="sourcePoint"/>
              <mxPoint x="630.307692" y="108" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="595" y="123"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_v1f_resolver_0" label="" mermaidId="L_v1f_resolver_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:v1f" target="n:resolver" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="570" y="49.633987" as="sourcePoint"/>
              <mxPoint x="620" y="49.633987" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="595" y="48"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_routes_rag_0" label="" mermaidId="L_routes_rag_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:routes" target="n:rag" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="559.65625" y="267" as="sourcePoint"/>
              <mxPoint x="620" y="257.359477" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="595" y="267"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_v1f_rag_0" label="" mermaidId="L_v1f_rag_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:v1f" target="n:rag" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="510.4" y="96" as="sourcePoint"/>
              <mxPoint x="630.307692" y="158" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="595" y="143"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_resolver_vgw_0" label="" mermaidId="L_resolver_vgw_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:resolver" target="n:vgw" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="876" y="58" as="sourcePoint"/>
              <mxPoint x="926" y="58" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="901" y="58"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_vgw_prov_0" label="" mermaidId="L_vgw_prov_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:vgw" target="n:prov" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="1182" y="58" as="sourcePoint"/>
              <mxPoint x="1232" y="58" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="1207" y="58"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_routes_meter_0" label="" mermaidId="L_routes_meter_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:routes" target="n:meter" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="515.594937" y="305" as="sourcePoint"/>
              <mxPoint x="620" y="346" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="595" y="346"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
