# macrohard90-boop/metis architecture

> Architecture diagram of the GitHub repository macrohard90-boop/metis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/macrohard90-boop/metis
- Repository: https://github.com/macrohard90-boop/metis

## Overview

METIS is a persistent personal knowledge system with structural and semantic memory. Its main workflow is knowledge capture and ingestion, followed by retrieval through Claude Code or the API/chat surfaces. Knowledge can be parsed, deduplicated, and stored in Neo4j and Qdrant; queries route across those memories. The README documents the hybrid-memory and MCP capabilities, while excerpts directly confirm selected storage, query, and ingestion behavior. Some links between unsampled components are shown as unverified rather than asserted.

Main entry points: [`src/capture/extraction_pipeline.py`](https://github.com/macrohard90-boop/metis/blob/main/src/capture/extraction_pipeline.py) (Ingestion Pipeline), [`src/brain/graph_client.py`](https://github.com/macrohard90-boop/metis/blob/main/src/brain/graph_client.py) (Graph Client), [`src/brain/vector_client.py`](https://github.com/macrohard90-boop/metis/blob/main/src/brain/vector_client.py) (Vector Client), [`src/surfaces/mcp_server.py`](https://github.com/macrohard90-boop/metis/blob/main/src/surfaces/mcp_server.py) (MCP Server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_surfaces["User Surfaces"]
  node_mcp["MCP Server<br/>[mcp_server.py]"]
  node_api["API Server<br/>[api_server.py]"]
  node_chat["Chat Agent<br/>[chat_agent.py]"]
  node_bridge["Claude Bridge<br/>[claude_bridge.py]"]
end

subgraph group_capture["Knowledge Capture"]
  node_pipeline["Ingestion Pipeline"]
  node_claude_parser["CLAUDE Parser"]
  node_code_parser["Code Parser<br/>[code_parser.py]"]
  node_code_graph["Code Graph Builder"]
  node_extractor["Knowledge Extractor"]
  node_curation["Curation Pass<br/>[curation_pass.py]"]
  node_dedup["Knowledge Dedup<br/>[knowledge_dedup.py]"]
  node_linker["Knowledge Linker"]
end

subgraph group_reasoning["Brain Services"]
  node_router["Query Router<br/>[query_router.py]"]
  node_writer["Knowledge Writer"]
  node_ops["Brain Operations<br/>[brain_ops.py]"]
  node_briefing["Briefing<br/>[briefing.py]"]
  node_topology["Topology<br/>[topology.py]"]
  node_doc_audit["Document Audit<br/>[doc_audit.py]"]
  node_doc_gen["Document Generator<br/>[doc_generator.py]"]
  node_llm["LLM Providers<br/>[llm.py]"]
  node_embedding["Embedding Encoder<br/>[embedding.py]"]
end

subgraph group_storage["Memory Stores"]
  node_graph_client["Graph Client<br/>[graph_client.py]"]
  node_vector_client["Vector Client<br/>[vector_client.py]"]
  node_neo4j[("Neo4j")]
  node_qdrant[("Qdrant")]
end

node_user(("User"))
node_claude["Claude Code"]

node_user -->|"asks"| node_claude
node_claude -->|"uses MCP"| node_mcp
node_user -.->|"uses"| node_api
node_api -.->|"dispatches"| node_chat
node_chat -.->|"delegates"| node_bridge
node_mcp -->|"routes queries"| node_router
node_mcp -->|"stores knowledge"| node_writer
node_mcp -->|"embeds content"| node_embedding
node_pipeline -->|"parses code"| node_code_parser
node_pipeline -.->|"extracts proposals"| node_claude_parser
node_pipeline -.->|"builds structure"| node_code_graph
node_pipeline -.->|"extracts knowledge"| node_extractor
node_pipeline -.->|"curates proposals"| node_curation
node_pipeline -.->|"checks duplicates"| node_dedup
node_pipeline -.->|"links knowledge"| node_linker
node_pipeline -.->|"embeds content"| node_embedding
node_pipeline -->|"registers project"| node_graph_client
node_router -->|"embeds query"| node_embedding
node_router -->|"queries graph"| node_graph_client
node_router -->|"searches vectors"| node_vector_client
node_writer -->|"embeds knowledge"| node_embedding
node_writer -->|"writes nodes"| node_graph_client
node_writer -->|"stores vectors"| node_vector_client
node_graph_client -->|"reads and writes"| node_neo4j
node_vector_client -->|"reads and writes"| node_qdrant
node_llm -.->|"answers"| node_user
node_doc_audit -->|"checks documents"| node_doc_gen
node_briefing -.->|"reads knowledge"| node_graph_client
node_briefing -.->|"reads context"| node_vector_client
node_topology -.->|"reads graph"| node_graph_client
node_topology -.->|"reads vectors"| node_vector_client

click node_mcp "https://github.com/macrohard90-boop/metis/blob/main/src/surfaces/mcp_server.py"
click node_api "https://github.com/macrohard90-boop/metis/blob/main/src/surfaces/api_server.py"
click node_chat "https://github.com/macrohard90-boop/metis/blob/main/src/surfaces/chat_agent.py"
click node_bridge "https://github.com/macrohard90-boop/metis/blob/main/src/surfaces/claude_bridge.py"
click node_pipeline "https://github.com/macrohard90-boop/metis/blob/main/src/capture/extraction_pipeline.py"
click node_claude_parser "https://github.com/macrohard90-boop/metis/blob/main/src/capture/claude_md_parser.py"
click node_code_parser "https://github.com/macrohard90-boop/metis/blob/main/src/capture/code_parser.py"
click node_code_graph "https://github.com/macrohard90-boop/metis/blob/main/src/capture/code_graph_builder.py"
click node_extractor "https://github.com/macrohard90-boop/metis/blob/main/src/capture/knowledge_extractor.py"
click node_curation "https://github.com/macrohard90-boop/metis/blob/main/src/capture/curation_pass.py"
click node_dedup "https://github.com/macrohard90-boop/metis/blob/main/src/capture/knowledge_dedup.py"
click node_linker "https://github.com/macrohard90-boop/metis/blob/main/src/capture/knowledge_linker.py"
click node_router "https://github.com/macrohard90-boop/metis/blob/main/src/brain/query_router.py"
click node_writer "https://github.com/macrohard90-boop/metis/blob/main/src/brain/knowledge_writer.py"
click node_ops "https://github.com/macrohard90-boop/metis/blob/main/src/brain/brain_ops.py"
click node_briefing "https://github.com/macrohard90-boop/metis/blob/main/src/brain/briefing.py"
click node_topology "https://github.com/macrohard90-boop/metis/blob/main/src/brain/topology.py"
click node_doc_audit "https://github.com/macrohard90-boop/metis/blob/main/src/brain/doc_audit.py"
click node_doc_gen "https://github.com/macrohard90-boop/metis/blob/main/src/brain/doc_generator.py"
click node_llm "https://github.com/macrohard90-boop/metis/blob/main/src/brain/llm.py"
click node_embedding "https://github.com/macrohard90-boop/metis/blob/main/src/brain/embedding.py"
click node_graph_client "https://github.com/macrohard90-boop/metis/blob/main/src/brain/graph_client.py"
click node_vector_client "https://github.com/macrohard90-boop/metis/blob/main/src/brain/vector_client.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mcp,node_api,node_chat,node_bridge,node_user toneBlue
class node_pipeline,node_claude_parser,node_code_parser,node_code_graph,node_extractor,node_curation,node_dedup,node_linker toneAmber
class node_router,node_writer,node_ops,node_briefing,node_topology,node_doc_audit,node_doc_gen,node_llm,node_embedding toneMint
class node_graph_client,node_vector_client,node_neo4j,node_qdrant toneRose
class node_claude toneIndigo
```

## Components

### User Surfaces

- [MCP Server](https://github.com/macrohard90-boop/metis/blob/main/src/surfaces/mcp_server.py): `src/surfaces/mcp_server.py`
- [API Server](https://github.com/macrohard90-boop/metis/blob/main/src/surfaces/api_server.py): `src/surfaces/api_server.py`
- [Chat Agent](https://github.com/macrohard90-boop/metis/blob/main/src/surfaces/chat_agent.py): `src/surfaces/chat_agent.py`
- [Claude Bridge](https://github.com/macrohard90-boop/metis/blob/main/src/surfaces/claude_bridge.py): `src/surfaces/claude_bridge.py`

### Knowledge Capture

- [Ingestion Pipeline](https://github.com/macrohard90-boop/metis/blob/main/src/capture/extraction_pipeline.py): `src/capture/extraction_pipeline.py`
- [CLAUDE Parser](https://github.com/macrohard90-boop/metis/blob/main/src/capture/claude_md_parser.py): `src/capture/claude_md_parser.py`
- [Code Parser](https://github.com/macrohard90-boop/metis/blob/main/src/capture/code_parser.py): `src/capture/code_parser.py`
- [Code Graph Builder](https://github.com/macrohard90-boop/metis/blob/main/src/capture/code_graph_builder.py): `src/capture/code_graph_builder.py`
- [Knowledge Extractor](https://github.com/macrohard90-boop/metis/blob/main/src/capture/knowledge_extractor.py): `src/capture/knowledge_extractor.py`
- [Curation Pass](https://github.com/macrohard90-boop/metis/blob/main/src/capture/curation_pass.py): `src/capture/curation_pass.py`
- [Knowledge Dedup](https://github.com/macrohard90-boop/metis/blob/main/src/capture/knowledge_dedup.py): `src/capture/knowledge_dedup.py`
- [Knowledge Linker](https://github.com/macrohard90-boop/metis/blob/main/src/capture/knowledge_linker.py): `src/capture/knowledge_linker.py`

### Brain Services

- [Query Router](https://github.com/macrohard90-boop/metis/blob/main/src/brain/query_router.py): `src/brain/query_router.py`
- [Knowledge Writer](https://github.com/macrohard90-boop/metis/blob/main/src/brain/knowledge_writer.py): `src/brain/knowledge_writer.py`
- [Brain Operations](https://github.com/macrohard90-boop/metis/blob/main/src/brain/brain_ops.py): `src/brain/brain_ops.py`
- [Briefing](https://github.com/macrohard90-boop/metis/blob/main/src/brain/briefing.py): `src/brain/briefing.py`
- [Topology](https://github.com/macrohard90-boop/metis/blob/main/src/brain/topology.py): `src/brain/topology.py`
- [Document Audit](https://github.com/macrohard90-boop/metis/blob/main/src/brain/doc_audit.py): `src/brain/doc_audit.py`
- [Document Generator](https://github.com/macrohard90-boop/metis/blob/main/src/brain/doc_generator.py): `src/brain/doc_generator.py`
- [LLM Providers](https://github.com/macrohard90-boop/metis/blob/main/src/brain/llm.py): `src/brain/llm.py`
- [Embedding Encoder](https://github.com/macrohard90-boop/metis/blob/main/src/brain/embedding.py): `src/brain/embedding.py`

### Memory Stores

- [Graph Client](https://github.com/macrohard90-boop/metis/blob/main/src/brain/graph_client.py): `src/brain/graph_client.py`
- [Vector Client](https://github.com/macrohard90-boop/metis/blob/main/src/brain/vector_client.py): `src/brain/vector_client.py`
- **Neo4j**
- **Qdrant**

### Other components

- **User**
- **Claude Code**

## Connections

- User → Claude Code: asks
- Claude Code → MCP Server: uses MCP
- User → API Server: uses
- API Server → Chat Agent: dispatches (evidence: `src/surfaces/api_server.py`)
- Chat Agent → Claude Bridge: delegates (evidence: `src/surfaces/chat_agent.py`)
- MCP Server → Query Router: routes queries (evidence: `src/surfaces/mcp_server.py`)
- MCP Server → Knowledge Writer: stores knowledge (evidence: `src/surfaces/mcp_server.py`)
- MCP Server → Embedding Encoder: embeds content (evidence: `src/surfaces/mcp_server.py`)
- Ingestion Pipeline → Code Parser: parses code (evidence: `src/capture/extraction_pipeline.py`)
- Ingestion Pipeline → CLAUDE Parser: extracts proposals (evidence: `src/capture/extraction_pipeline.py`)
- Ingestion Pipeline → Code Graph Builder: builds structure (evidence: `src/capture/extraction_pipeline.py`)
- Ingestion Pipeline → Knowledge Extractor: extracts knowledge (evidence: `src/capture/extraction_pipeline.py`)
- Ingestion Pipeline → Curation Pass: curates proposals (evidence: `src/capture/extraction_pipeline.py`)
- Ingestion Pipeline → Knowledge Dedup: checks duplicates (evidence: `src/capture/extraction_pipeline.py`)
- Ingestion Pipeline → Knowledge Linker: links knowledge (evidence: `src/capture/extraction_pipeline.py`)
- Ingestion Pipeline → Embedding Encoder: embeds content (evidence: `src/capture/extraction_pipeline.py`)
- Ingestion Pipeline → Graph Client: registers project (evidence: `src/capture/extraction_pipeline.py`)
- Query Router → Embedding Encoder: embeds query (evidence: `src/brain/query_router.py`)
- Query Router → Graph Client: queries graph (evidence: `src/brain/query_router.py`)
- Query Router → Vector Client: searches vectors (evidence: `src/brain/query_router.py`)
- Knowledge Writer → Embedding Encoder: embeds knowledge (evidence: `src/brain/knowledge_writer.py`)
- Knowledge Writer → Graph Client: writes nodes (evidence: `src/brain/knowledge_writer.py`)
- Knowledge Writer → Vector Client: stores vectors (evidence: `src/brain/knowledge_writer.py`)
- Graph Client → Neo4j: reads and writes (evidence: `src/brain/graph_client.py`)
- Vector Client → Qdrant: reads and writes (evidence: `src/brain/vector_client.py`)
- LLM Providers → User: answers
- Document Audit → Document Generator: checks documents (evidence: `src/brain/doc_audit.py`)
- Briefing → Graph Client: reads knowledge (evidence: `src/brain/briefing.py`)
- Briefing → Vector Client: reads context (evidence: `src/brain/briefing.py`)
- Topology → Graph Client: reads graph (evidence: `src/brain/topology.py`)
- Topology → Vector Client: reads vectors (evidence: `src/brain/topology.py`)
