Skip to main content

System Topology

Complete KOSMOS V2.0 system architecture and technology stack.

Architecture Diagram

┌─────────────────────────────────────────────────────────────────────────────┐
│ KOSMOS V2.0 ARCHITECTURE │
├─────────────────────────────────────────────────────────────────────────────┤
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ PRESENTATION LAYER │ │
│ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────────────┐ │ │
│ │ │ Next.js │ │ Mobile │ │ Desktop │ │ Ergonomic Engine │ │ │
│ │ │ 14 + TSX │ │ (React │ │ (Tauri) │ │ (Color/Breaks) │ │ │
│ │ │ │ │ Native) │ │ │ │ │ │ │
│ │ └──────────┘ └──────────┘ └──────────┘ └──────────────────┘ │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
│ │ │
│ ┌─────────────────────────────────▼───────────────────────────────────┐ │
│ │ API GATEWAY LAYER │ │
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌────────────┐ │ │
│ │ │ Cloudflare │ │ Kong/APISIX │ │ Rate Limit │ │ WAF + DDoS │ │ │
│ │ │ CDN + Edge │ │ Gateway │ │ (Dragonfly) │ │ Protection │ │ │
│ │ └─────────────┘ └─────────────┘ └─────────────┘ └────────────┘ │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
│ │ │
│ ┌─────────────────────────────────▼───────────────────────────────────┐ │
│ │ ORCHESTRATION LAYER │ │
│ │ ┌───────────────────────────────────────────────────────────────┐ │ │
│ │ │ ZEUS (Master Orchestrator) │ │ │
│ │ │ ┌─────────────┐ ┌─────────────┐ ┌───────────────────────┐ │ │ │
│ │ │ │ Intent │ │ Sequential │ │ Pentarchy Governance │ │ │ │
│ │ │ │ Classifier │ │ Thinking │ │ (3-Agent Voting) │ │ │ │
│ │ │ └─────────────┘ └─────────────┘ └───────────────────────┘ │ │ │
│ │ └───────────────────────────────────────────────────────────────┘ │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
│ │ │
│ ┌─────────────────────────────────▼───────────────────────────────────┐ │
│ │ AGENT ECOSYSTEM (11 Agents) │ │
│ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │
│ │ │ Hermes │ │ AEGIS │ │ Chronos │ │ Athena │ │Hephaestus│ │ │
│ │ │ Comms │ │ Security│ │ Schedule│ │ RAG/KB │ │ DevOps │ │ │
│ │ └─────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │ │
│ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │
│ │ │Nur PROM │ │ Iris │ │ MEMORIX │ │ Hestia │ │Morpheus │ │ │
│ │ │Analytics│ │ Notify │ │ Memory │ │Wellness │ │ Learn │ │ │
│ │ └─────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
│ │ │
│ ┌─────────────────────────────────▼───────────────────────────────────┐ │
│ │ MCP INTEGRATION HUB (88 Servers) │ │
│ │ ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐ │ │
│ │ │ Database │ │ Messaging │ │ AI/LLM │ │ Security │ │ │
│ │ │ (12 MCPs) │ │ (8 MCPs) │ │ (15 MCPs) │ │ (10 MCPs) │ │ │
│ │ └────────────┘ └────────────┘ └────────────┘ └────────────┘ │ │
│ │ ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐ │ │
│ │ │ Productiv. │ │ DevOps │ │ Reasoning │ │ External │ │ │
│ │ │ (15 MCPs) │ │ (13 MCPs) │ │ (5 MCPs) │ │ (10 MCPs) │ │ │
│ │ └────────────┘ └────────────┘ └────────────┘ └────────────┘ │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
│ │ │
│ ┌─────────────────────────────────▼───────────────────────────────────┐ │
│ │ DATA PERSISTENCE LAYER │ │
│ │ ┌─────────────────────────────────────────────────────────────┐ │ │
│ │ │ PostgreSQL 16 (Unified Data Store) │ │ │
│ │ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌────────┐ │ │ │
│ │ │ │pgvector │ │Apache │ │Timescale│ │ pg_trgm │ │ JSONB │ │ │ │
│ │ │ │ (RAG) │ │ AGE │ │ DB │ │(Search) │ │ │ │ │ │
│ │ │ └─────────┘ └─────────┘ └─────────┘ └─────────┘ └────────┘ │ │ │
│ │ └─────────────────────────────────────────────────────────────┘ │ │
│ │ ┌────────────┐ ┌────────────┐ ┌────────────┐ │ │
│ │ │ Dragonfly │ │ MinIO │ │ Memory │ │ │
│ │ │ (Cache) │ │ (Objects) │ │ Server │ │ │
│ │ └────────────┘ └────────────┘ └────────────┘ │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
│ │ │
│ ┌─────────────────────────────────▼───────────────────────────────────┐ │
│ │ INFRASTRUCTURE LAYER │ │
│ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────────┐ │ │
│ │ │ K3s/K8s │ │ Argo CD │ │ NATS │ │ Zitadel │ │ Infisical │ │ │
│ │ │ Cluster │ │ GitOps │ │ Events │ │ Auth │ │ Secrets │ │ │
│ │ └─────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────────┘ │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────────┘

Technology Stack

LayerTechnologyPurpose
FrontendNext.js 14, TypeScript, Tailwind CSSWeb interface
MobileReact NativeMobile applications
DesktopTauriCross-platform desktop app
API GatewayKong/APISIX + CloudflareTraffic management, security
BackendFastAPI (Python 3.11+)API services
Agent FrameworkLangGraphMulti-agent orchestration
LLM RouterLiteLLMModel abstraction layer
DatabasePostgreSQL 16 + extensionsPrimary data store
CacheDragonflyRedis-compatible caching
ObjectsMinIOS3-compatible storage
MessagingNATSEvent streaming
AuthZitadelOIDC/SAML identity
SecretsInfisicalSecrets management
OrchestrationK3s/KubernetesContainer orchestration
GitOpsArgo CDDeployment automation
ObservabilityPrometheus, Grafana, Loki, Jaeger, LangfuseFull-stack monitoring

Layer Descriptions

Presentation Layer

  • Next.js 14 - Server-side rendering, React Server Components
  • React Native - Mobile apps for iOS/Android
  • Tauri - Lightweight desktop apps (Rust-based)
  • Ergonomic Engine - User wellness and productivity optimization

API Gateway Layer

  • Cloudflare CDN - Edge caching, DDoS protection
  • Kong/APISIX - API gateway, rate limiting
  • WAF - Web Application Firewall

Orchestration Layer

  • Zeus - Master orchestrator agent
  • Intent Classifier - Route requests to appropriate agents
  • Sequential Thinking - Complex reasoning chains
  • Pentarchy Governance - 3-agent voting for decisions

Agent Ecosystem

11 specialized agents with distinct responsibilities (see Agents section)

MCP Integration Hub

88 MCP servers across 9 domains (see MCP Servers section)

Data Persistence Layer

  • PostgreSQL 16 with pgvector, Apache AGE, TimescaleDB
  • Dragonfly - High-performance Redis-compatible cache
  • MinIO - Object storage for files/media

Infrastructure Layer

  • K3s - Lightweight Kubernetes
  • Argo CD - GitOps deployment
  • NATS - Event messaging
  • Zitadel - Identity and access management
  • Infisical - Secrets management