Skip to content

# 03 — Architecture Overview

A one-page mental model. For details follow the cross-links.

## Topology

                             ┌────────────────┐
       voice / typing ──────▶│     Memos      │◀──── Nexa replies as comments
                             │  (interface)   │
                             └───────┬────────┘
                                     │ webhook (- [ ] / #nexa:*)
                                     ▼
                             ┌────────────────┐
       IMAP / RSS / NC  ────▶│      n8n       │◀──── workflows live in
       Karakeep / Bluesky    │  (logic)       │      ./nexa-core/n8n-workflows
                             └───┬────────┬───┘
                      classify ▲ │        │ ▲ retrieve
                               │ ▼        ▼ │
                           ┌──────────┐  ┌──────────┐
                           │  SAIA    │  │  Qdrant  │
                           │ LiteLLM  │  │  vector  │
                           └──────────┘  └────┬─────┘
                                              │
                                              ▼
                                         ┌──────────┐
                                         │ GraphDB  │  Ontotext, SPARQL
                                         │  (RDF)   │  Phase 3.4
                                         └──────────┘
                                     │
                                     ▼ writes
                      ┌──────────────────────────────┐
                      │  Nextcloud (Tasks, Calendar, │
                      │  Mail, Files / Obsidian)     │
                      └──────────────────────────────┘

## Components

Component | Role | Where it runs (today)
--- | --- | ---
Memos | Interface, voice input, webhook source | docker host LXC 104 (unprivileged, 16 CPU / 31 GiB / 200 GiB) → `memos.nuclide.systems`
n8n | Workflow / logic engine | docker host LXC 104 → `n8n.nuclide.systems`
SAIA / LiteLLM | Model gateway, embeddings, classification | docker host LXC 104 → `ai.nuclide.systems` (LiteLLM internal :4000)
Qdrant | Vector memory (semantic recall) | docker host LXC 104 — reuse `qdrant_scientific`. Collections: `nexa_knowledge_text` (Phase 3.1, 1024-dim) and `nexa_knowledge_visual` (Phase 3.2, 768-dim)
Ontotext GraphDB | Structural memory via SPARQL (Phase 3.4) | not yet deployed; see 09-deployment
TEI (HF text-embeddings-inference) | Self-hosted text embeddings, `BAAI/bge-m3`, Phase 3.1 | docker host LXC 104, CPU only — swapped for `infinity` in Phase 3.2 to add `jina-clip-v2`
Nextcloud | Tasks, calendar, mail, files | dedicated LXC 105 → `nc.nuclide.systems`
ntfy | Push channel for system alerts | docker host → `ntfy.nuclide.systems`
Backrest | Backup orchestration | LXC 103
Zoraxy | Reverse proxy + TLS | LXC 108 (`192.168.1.4:8000`)
AdGuard DNS | Internal name resolution | LXC 102
Home Assistant | Voice + house automation | VM 100 (HAOS)

## Two-pillar memory

- Qdrant answers "what is similar / relevant?" (cosine search over embeddings).
- Ontotext GraphDB answers "who, what depends on what, how is it structured?" (SPARQL over RDF).

Both pillars are queried in parallel for `#nexa:ask` and merged before SAIA generates the final answer. See 08 — GraphRAG architecture.

## Dual-context routing

Every input is classified `work` or `personal` before any side effect (task creation, calendar write). See 04 — Integration matrix and 06 — Classification logic.