# axoviq-ai/synthadoc architecture

> Architecture diagram of the GitHub repository axoviq-ai/synthadoc, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/axoviq-ai/synthadoc
- Repository: https://github.com/axoviq-ai/synthadoc

## Overview

Synthadoc is a domain-agnostic LLM wiki engine: users submit documents or questions through CLI, web, Obsidian, or MCP interfaces; agents synthesize and retrieve knowledge, and the wiki persists as Markdown with citations. The graph preserves documented maintenance, cross-wiki, skill, and integration capabilities. Source excerpts and the README support the main relationships; unsampled subsystem internals are represented at their exact tree paths, with uncertain links omitted.

Main entry points: [`synthadoc/agents/query_agent.py`](https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/agents/query_agent.py) (Question Answering), [`synthadoc/agents/ingest_agent.py`](https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/agents/ingest_agent.py) (Document Ingest), [`synthadoc/integration/http_server.py`](https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/integration/http_server.py) (HTTP Server), [`synthadoc/cli/main.py`](https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/cli/main.py) (CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User Interfaces"]
  node_cli["CLI<br/>[main.py]"]
  node_web["Web UI<br/>[App.tsx]"]
  node_obsidian["Obsidian Plugin<br/>[main.ts]"]
  node_mcp["MCP Server<br/>[mcp_server.py]"]
  node_http["HTTP Server<br/>[http_server.py]"]
end

subgraph group_agents["Knowledge Agents"]
  node_ingest["Document Ingest<br/>[ingest_agent.py]"]
  node_query["Question Answering<br/>[query_agent.py]"]
  node_lint["Wiki Lint<br/>[lint_agent.py]"]
  node_crosswiki["Cross-Wiki Query"]
  node_workflows["Maintenance Workflows"]
  node_skills["Document Skills"]
end

subgraph group_platform["Core Platform"]
  node_provider["LLM Providers<br/>[base.py]"]
  node_routing["Routing Index<br/>[routing.py]"]
  node_templates["Wiki Templates"]
end

subgraph group_state["Wiki State"]
  node_wiki[("Markdown Wiki<br/>[wiki.py]")]
  node_search[("Hybrid Search<br/>[search.py]")]
  node_audit[("Audit and Logs<br/>[log.py]")]
end

subgraph group_integrations["Extensions"]
end

node_user(("User"))

node_user -->|"submits sources"| node_cli
node_user -->|"asks questions"| node_web
node_user -->|"uses wiki"| node_obsidian
node_user -->|"connects tools"| node_mcp
node_cli -->|"ingests documents"| node_ingest
node_cli -->|"asks questions"| node_query
node_web -.->|"calls API"| node_http
node_obsidian -.->|"calls API"| node_http
node_mcp -.->|"integrates server"| node_http
node_http -.->|"serves queries"| node_query
node_http -.->|"accepts ingestion"| node_ingest
node_ingest -->|"requests synthesis"| node_provider
node_query -->|"requests answers"| node_provider
node_ingest -->|"extracts sources"| node_skills
node_ingest -->|"writes pages"| node_wiki
node_ingest -->|"indexes pages"| node_search
node_ingest -->|"records activity"| node_audit
node_query -->|"retrieves pages"| node_search
node_query -->|"reads pages"| node_wiki
node_query -->|"records activity"| node_audit
node_lint -->|"checks pages"| node_wiki
node_lint -->|"checks claims"| node_provider
node_crosswiki -->|"queries wikis"| node_query
node_crosswiki -->|"resolves wiki"| node_cli
node_workflows -->|"runs maintenance"| node_lint
node_query -->|"loads branches"| node_routing
node_user -->|"starts wiki"| node_templates
node_wiki -->|"provides Markdown"| node_user

click node_cli "https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/cli/main.py"
click node_web "https://github.com/axoviq-ai/synthadoc/blob/main/web-ui/src/App.tsx"
click node_obsidian "https://github.com/axoviq-ai/synthadoc/blob/main/obsidian-plugin/src/main.ts"
click node_mcp "https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/integration/mcp_server.py"
click node_http "https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/integration/http_server.py"
click node_ingest "https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/agents/ingest_agent.py"
click node_query "https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/agents/query_agent.py"
click node_lint "https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/agents/lint_agent.py"
click node_crosswiki "https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/agents/cross_wiki_query_agent.py"
click node_workflows "https://github.com/axoviq-ai/synthadoc/tree/main/synthadoc/agents/workflows"
click node_skills "https://github.com/axoviq-ai/synthadoc/tree/main/synthadoc/skills"
click node_provider "https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/providers/base.py"
click node_routing "https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/core/routing.py"
click node_wiki "https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/storage/wiki.py"
click node_search "https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/storage/search.py"
click node_audit "https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/storage/log.py"
click node_templates "https://github.com/axoviq-ai/synthadoc/tree/main/synthadoc/templates"

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_cli,node_web,node_obsidian,node_mcp,node_http,node_user toneBlue
class node_ingest,node_query,node_lint,node_crosswiki,node_workflows,node_skills toneAmber
class node_provider,node_routing,node_templates toneMint
class node_wiki,node_search,node_audit toneRose
```

## Components

### User Interfaces

- [CLI](https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/cli/main.py): `synthadoc/cli/main.py`
- [Web UI](https://github.com/axoviq-ai/synthadoc/blob/main/web-ui/src/App.tsx): `web-ui/src/App.tsx`
- [Obsidian Plugin](https://github.com/axoviq-ai/synthadoc/blob/main/obsidian-plugin/src/main.ts): `obsidian-plugin/src/main.ts`
- [MCP Server](https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/integration/mcp_server.py): `synthadoc/integration/mcp_server.py`
- [HTTP Server](https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/integration/http_server.py): `synthadoc/integration/http_server.py`

### Knowledge Agents

- [Document Ingest](https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/agents/ingest_agent.py): `synthadoc/agents/ingest_agent.py`
- [Question Answering](https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/agents/query_agent.py): `synthadoc/agents/query_agent.py`
- [Wiki Lint](https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/agents/lint_agent.py): `synthadoc/agents/lint_agent.py`
- [Cross-Wiki Query](https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/agents/cross_wiki_query_agent.py): `synthadoc/agents/cross_wiki_query_agent.py`
- [Maintenance Workflows](https://github.com/axoviq-ai/synthadoc/tree/main/synthadoc/agents/workflows): `synthadoc/agents/workflows`
- [Document Skills](https://github.com/axoviq-ai/synthadoc/tree/main/synthadoc/skills): `synthadoc/skills`

### Core Platform

- [LLM Providers](https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/providers/base.py): `synthadoc/providers/base.py`
- [Routing Index](https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/core/routing.py): `synthadoc/core/routing.py`
- [Wiki Templates](https://github.com/axoviq-ai/synthadoc/tree/main/synthadoc/templates): `synthadoc/templates`

### Wiki State

- [Markdown Wiki](https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/storage/wiki.py): `synthadoc/storage/wiki.py`
- [Hybrid Search](https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/storage/search.py): `synthadoc/storage/search.py`
- [Audit and Logs](https://github.com/axoviq-ai/synthadoc/blob/main/synthadoc/storage/log.py): `synthadoc/storage/log.py`

### Other components

- **User**

## Connections

- User → CLI: submits sources (evidence: `README.md`)
- User → Web UI: asks questions (evidence: `README.md`)
- User → Obsidian Plugin: uses wiki (evidence: `README.md`)
- User → MCP Server: connects tools (evidence: `README.md`)
- CLI → Document Ingest: ingests documents (evidence: `README.md`)
- CLI → Question Answering: asks questions (evidence: `README.md`)
- Web UI → HTTP Server: calls API
- Obsidian Plugin → HTTP Server: calls API
- MCP Server → HTTP Server: integrates server (evidence: `synthadoc/integration/http_server.py`)
- HTTP Server → Question Answering: serves queries
- HTTP Server → Document Ingest: accepts ingestion (evidence: `synthadoc/integration/http_server.py`)
- Document Ingest → LLM Providers: requests synthesis (evidence: `synthadoc/agents/ingest_agent.py`)
- Question Answering → LLM Providers: requests answers (evidence: `synthadoc/agents/query_agent.py`)
- Document Ingest → Document Skills: extracts sources (evidence: `synthadoc/agents/ingest_agent.py`)
- Document Ingest → Markdown Wiki: writes pages (evidence: `synthadoc/agents/ingest_agent.py`)
- Document Ingest → Hybrid Search: indexes pages (evidence: `synthadoc/agents/ingest_agent.py`)
- Document Ingest → Audit and Logs: records activity (evidence: `synthadoc/agents/ingest_agent.py`)
- Question Answering → Hybrid Search: retrieves pages (evidence: `synthadoc/agents/query_agent.py`)
- Question Answering → Markdown Wiki: reads pages (evidence: `synthadoc/agents/query_agent.py`)
- Question Answering → Audit and Logs: records activity (evidence: `synthadoc/agents/query_agent.py`)
- Wiki Lint → Markdown Wiki: checks pages (evidence: `synthadoc/agents/lint_agent.py`)
- Wiki Lint → LLM Providers: checks claims (evidence: `synthadoc/agents/lint_agent.py`)
- Cross-Wiki Query → Question Answering: queries wikis (evidence: `synthadoc/agents/cross_wiki_query_agent.py`)
- Cross-Wiki Query → CLI: resolves wiki (evidence: `synthadoc/agents/cross_wiki_query_agent.py`)
- Maintenance Workflows → Wiki Lint: runs maintenance (evidence: `synthadoc/agents/workflows/ingest_lint.py`)
- Question Answering → Routing Index: loads branches (evidence: `synthadoc/agents/query_agent.py`)
- User → Wiki Templates: starts wiki (evidence: `README.md`)
- Markdown Wiki → User: provides Markdown (evidence: `README.md`)
