Persistent project knowledge graph for coding agents. MCP server with semantic search, in-process embeddings, and web explorer.
TypeScript agentic-codingaiai-agentsclaude-codecode-contextcoding-agentembeddingsknowledge-graphllmmcpmcp-serveropencodepersistent-memorysqlitetypescript
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 516" role="img" aria-labelledby="a-title a-desc">
<title id="a-title">Architecture</title>
<desc id="a-desc">Three-tier architecture: coding agent, MCP server with grouped tools, SQLite database, and embedding engine.</desc>
<defs>
<marker id="arr" markerWidth="7" markerHeight="5" refX="6" refY="2.5" orient="auto">
<path d="M0 0 L7 2.5 L0 5" fill="none" stroke="#484f58" stroke-width="1.2"/>
</marker>
</defs>
<rect width="800" height="516" fill="#0d1117"/>
<!-- Title -->
<text x="400" y="40" text-anchor="middle" fill="#e6edf3" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="28" font-weight="600">Architecture</text>
<!-- Tier 1: Coding Agent -->
<rect x="140" y="66" width="520" height="68" rx="10" fill="#161b22" stroke="#30363d" stroke-width="1"/>
<rect x="140" y="66" width="520" height="3" fill="#58a6ff"/>
<text x="164" y="96" fill="#e6edf3" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="17" font-weight="600">Coding Agent</text>
<text x="164" y="116" fill="#8b949e" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="13" font-weight="400">Claude Code · opencode · any MCP client</text>
<!-- Arrow: Agent → Server -->
<line x1="400" y1="134" x2="400" y2="160" stroke="#484f58" stroke-width="1.5" marker-end="url(#arr)"/>
<text x="414" y="152" fill="#6e7681" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="11" font-weight="500">stdio</text>
<!-- Tier 2: MCP Server -->
<rect x="80" y="164" width="640" height="186" rx="10" fill="#161b22" stroke="#30363d" stroke-width="1"/>
<rect x="80" y="164" width="640" height="3" fill="#bc8cff"/>
<text x="108" y="194" fill="#e6edf3" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="17" font-weight="600">MCP Server</text>
<!-- Divider -->
<line x1="108" y1="206" x2="700" y2="206" stroke="#262c36" stroke-width="1"/>
<!-- Row: query tools -->
<text x="108" y="234" fill="#484f58" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="11" font-weight="500">query</text>
<rect x="152" y="220" width="88" height="22" rx="6" fill="rgba(88,166,255,0.12)"/>
<text x="196" y="235" text-anchor="middle" fill="#58a6ff" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="12" font-weight="500">understand</text>
<rect x="248" y="220" width="78" height="22" rx="6" fill="rgba(88,166,255,0.12)"/>
<text x="287" y="235" text-anchor="middle" fill="#58a6ff" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="12" font-weight="500">list_roots</text>
<!-- Row: write tools -->
<text x="108" y="268" fill="#484f58" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="11" font-weight="500">write</text>
<rect x="152" y="254" width="112" height="22" rx="6" fill="rgba(188,140,255,0.12)"/>
<text x="208" y="269" text-anchor="middle" fill="#bc8cff" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="12" font-weight="500">create_concept</text>
<rect x="272" y="254" width="116" height="22" rx="6" fill="rgba(188,140,255,0.12)"/>
<text x="330" y="269" text-anchor="middle" fill="#bc8cff" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="12" font-weight="500">update_concept</text>
<rect x="396" y="254" width="38" height="22" rx="6" fill="rgba(188,140,255,0.12)"/>
<text x="415" y="269" text-anchor="middle" fill="#bc8cff" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="12" font-weight="500">link</text>
<rect x="442" y="254" width="118" height="22" rx="6" fill="rgba(188,140,255,0.12)"/>
<text x="501" y="269" text-anchor="middle" fill="#bc8cff" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="12" font-weight="500">remove_concept</text>
<!-- Row: merge tools -->
<text x="108" y="302" fill="#484f58" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="11" font-weight="500">merge</text>
<rect x="152" y="288" width="100" height="22" rx="6" fill="rgba(63,185,80,0.12)"/>
<text x="202" y="303" text-anchor="middle" fill="#3fb950" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="12" font-weight="500">list_conflicts</text>
<rect x="260" y="288" width="116" height="22" rx="6" fill="rgba(63,185,80,0.12)"/>
<text x="318" y="303" text-anchor="middle" fill="#3fb950" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="12" font-weight="500">resolve_conflict</text>
<!-- Summary -->
<text x="108" y="336" fill="#484f58" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="11" font-weight="400">8 tools · Zod schemas · JSON over stdio</text>
<!-- Arrows: Server → bottom tier -->
<line x1="300" y1="350" x2="230" y2="400" stroke="#484f58" stroke-width="1.5" marker-end="url(#arr)"/>
<text x="238" y="380" fill="#6e7681" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="11" font-weight="500">read / write</text>
<line x1="500" y1="350" x2="570" y2="400" stroke="#484f58" stroke-width="1.5" marker-end="url(#arr)"/>
<text x="548" y="380" fill="#6e7681" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="11" font-weight="500">embed</text>
<!-- Tier 3a: SQLite -->
<rect x="80" y="408" width="300" height="68" rx="10" fill="#161b22" stroke="#30363d" stroke-width="1"/>
<rect x="80" y="408" width="300" height="3" fill="#3fb950"/>
<text x="104" y="436" fill="#e6edf3" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="16" font-weight="600">SQLite</text>
<text x="104" y="456" fill="#8b949e" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="12" font-weight="400">knowledge.db · nodes · edges · WAL mode</text>
<!-- Tier 3b: Embeddings -->
<rect x="420" y="408" width="300" height="68" rx="10" fill="#161b22" stroke="#30363d" stroke-width="1"/>
<rect x="420" y="408" width="300" height="3" fill="#d29922"/>
<text x="444" y="436" fill="#e6edf3" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="16" font-weight="600">Embeddings</text>
<text x="444" y="456" fill="#8b949e" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="12" font-weight="400">all-MiniLM-L6-v2 · 384-dim · cosine similarity</text>
<!-- Double connector: SQLite ↔ Embeddings -->
<line x1="384" y1="442" x2="416" y2="442" stroke="#30363d" stroke-width="1.5"/>
<circle cx="392" cy="442" r="1.5" fill="#30363d"/>
<circle cx="408" cy="442" r="1.5" fill="#30363d"/>
<text x="400" y="430" text-anchor="middle" fill="#484f58" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif" font-size="10" font-weight="500">vectors as BLOB</text>
</svg>