Architecture
Arkhein is built on a Deep over Shallow design philosophy. We hide immense cognitive complexity behind minimalist, stable APIs to ensure a seamless desktop experience.
Core Services
Arkhein encapsulates all complex reasoning and data-integrity behaviors in dedicated service layers:
- CognitiveArbiter: The reasoning engine that orchestrates the 7-level pipeline. It handles intent classification, decomposition, and critique.
- SiloIntegrityService: The self-healing brain. It manages disk signatures, drift detection, and shadow rebuilds to ensure memory remains accurate.
- MemoryService: The bridge between SQLite SSOT and the Vektor acceleration index. It owns indexing, chunking, and binary sync.
- EnvironmentScanner: The grounding engine that generates Silo Semantic Maps and detects folder purposes.
- PromptService: The single source of truth for all engineered prompts, stored in a versioned registry.
Sovereign Coordinator
The Sovereign Coordinator is a specialized execution layer that bypasses SLM hallucinations. It provides direct, deterministic access to the database (via InventoryTool) and ensures mathematical and logical tasks are performed in the Scratchpad workspace rather than directly in the LLM's context.
Architectural Invariants
- Managed Boundaries: All operations are restricted to user-authorized managed folders.
- Physical Reasoning: All complex actions must occur within a physical on-disk workspace for audit and recovery.
- Zero-Config Models: Uses smart model matching to resolve local LLMs (e.g.,
mistral:latest) without manual configuration. - Thin Orchestration: UI controllers and background jobs act as simple coordinators, delegating all domain logic to the service layer.