ThothII Runtime Architecture

ThothII Runtime Architecture An architecture diagram generated by Archify. User / Reviewer · Browser · Architecture component User / Reviewer Browser Frontend · React 18 + Vite · Local Docker Compose runtime · in-memory transcript Frontend React 18 + Vite in-memory transcript Backend · Fastify + TypeScript · Local Docker Compose runtime · session bridge Backend Fastify + TypeScript session bridge Pi · RPC process per session · Local Docker Compose runtime › core container · inside core Pi RPC process per session inside core tht / Harness · 8-phase NL→SQL workflow · Local Docker Compose runtime › core container · workflow owner tht / Harness 8-phase NL→SQL workflow workflow owner Workspace Repository · sessions + phase artifacts · operator-controlled persisted state · source of truth Workspace Repository sessions + phase artifacts source of truth Authentication · local registry or OIDC · Architecture component Authentication local registry or OIDC AI Model Provider · installation-selected APIs · Architecture component AI Model Provider installation-selected APIs Metadata Catalog · PostgreSQL + Kysely · Local Docker Compose runtime · backend-owned Metadata Catalog PostgreSQL + Kysely backend-owned Embedding Service · Ollama · Local Docker Compose runtime Embedding Service Ollama Vector Store · Qdrant · Local Docker Compose runtime Vector Store Qdrant Data Warehouse · external, read-only · Architecture component Data Warehouse external, read-only question / gate decision REST SSE: text · info · widget JSON-RPC stdio phase / gate commands artifacts + decision ledger local session / OIDC callback session model API catalog CRUD + runs short-lived LiteLLM calls introspection + read-only SQL embedding requests index + vector retrieval Local Docker Compose runtime core container operator-controlled persisted state Legend Frontend Backend Database Security External

Primary session path

  • • The browser sends questions and reviewer decisions over REST; the backend returns text, information, and widget descriptors over SSE.
  • • One Pi RPC process drives each active session and delegates deterministic phase operations to tht / Harness.

State ownership

  • • Harness owns the eight-phase workflow and persists session_manifest.yaml, phase artifacts, and review_decisions.jsonl.
  • • Backend owns the separate installation-local metadata catalog; the live frontend transcript is not persisted.

Trust boundaries

  • • Catalog DB, Qdrant, and Ollama stay inside Compose; workspace state is operator controlled and mounted into core.
  • • The DWH and AI provider remain external endpoints; DWH access is constrained to introspection, tests, bounded samples, and read-only SQL.