A High-Performance, Fully Native C++26 Self-Hosted AI Workspace
Copyright (c) 2026 Veridian Zenith
Licensed under the Open Software License version 3.0 (OSL-3.0) or later
Zenith Workspace is a complete, bottom-up recreation of the Odysseus workspace. While Odysseus represents a capable self-hosted workspace, its reliance on a mixed environment of Python backends and web/TypeScript frontends introduces significant overhead, virtualization issues, deployment complexity, and memory bloating.
Zenith is engineered to deliver the exact same capability set—Chat, Agents, Deep Research, Documents, Email, Notes, Tasks, Calendar, and Creative Canvas—using a fully compiled, native, zero-virtualization C++26 codebase.
By transitioning to a pure native C++26 implementation, Zenith achieves:
- Zero Interpreter Bloat: No Python interpreter, no Node.js runtime, and no V8/Electron framework overhead.
- Unmatched Efficiency: Sub-100ms cold startup, <50MB baseline memory footprint (versus 800MB+ for Odysseus' Docker/Electron combo), and near-zero idle CPU usage.
- Streamlined Deployment: Compiled to a single statically-linked binary per platform. No Docker, no Python dependencies, no npm setup, and no complex runtime troubleshooting.
- Deep Hardware Integration: Direct hardware-accelerated bindings (Metal, CUDA, Vulkan, ROCm) for LLM and Whisper serving without high-level wrapper layers.
Zenith is designed to utilize the latest features of C++26 and modern native engineering practices.
| Layer | Technology | Justification |
|---|---|---|
| Language Standard | C++26 (via GCC 14+, Clang 19+, MSVC 2022) |
Access to modern concurrent, monadic, and metaprogramming paradigms. |
| Build System | CMake 3.30+ + vcpkg |
Cross-platform orchestration, static-linking target optimization. |
| Frontend Options | Qt 6 (QML) or Slint |
Fully compiled declarative UI, GPU hardware acceleration, native look-and-feel. |
| Local Inference | llama.cpp & whisper.cpp (C/C++ Libraries) |
Direct linking to execution backends for native GGUF parsing and tokenization. |
| Storage Engine | SQLite 3 + SQLite-vec |
Zero-admin local storage, embedded relational data, and vector-similarity index. |
| Networking & Async IO | Asio (Standalone) + libcurl |
Asynchronous non-blocking sockets, multi-interface HTTP/HTTPS crawling. |
| Cryptography / TLS | OpenSSL 3.3+ |
Industry standard secure transport, hashing, and credentials security. |
- Standard Library Modules (
import std;): Eliminates classic preprocessor headers, speeding up compilation and ensuring clear namespace boundaries. - Monadic Operations (
std::optional&std::expected): Utilized extensively in network and parser code to avoid exception overhead and construct clean, linear error-handling pipelines. - Structured Binding with Extensions: Cleaner unpacking of multi-value returns in data parsers and database queries.
- Asynchronous Coroutines (
std::coroutine): Employed for light-weight cooperative scheduling of multi-agent tasks, IMAP email syncing, and web-crawler routines. - Modern Concurrency (
std::jthread& RAII locks): Automatic thread joining and cancellation token mechanisms prevent orphaned background workers in the Deep Research and serving engines.
Zenith uses an offline-first, client-server/modular architecture where the entire system can be run as a unified desktop application or split into a native server daemon and a native client interface.
┌────────────────────────────────────────────────────────────────────────┐
│ Zenith Native GUI (Qt6/Slint) │
├────────────────────────────────┬───────────────────────────────────────┤
│ • Hardware Accelerated Canvas │ • Multi-tab Chat / Agent Interface │
│ • Writing-First Document Editor │ • Mail / Calendar / Tasks View │
└────────────────────────────────┴───────────────────────────────────────┘
│ Inter-Thread (In-Proc) / Unix Domain Sockets
▼
┌────────────────────────────────────────────────────────────────────────┐
│ Zenith Core Engine (C++26) │
├────────────────────────────────────────────────────────────────────────┤
│ ┌──────────────────────────┐ ┌───────────────────────────┐ │
│ │ Local Inference (LLM) │◄─────────►│ Agent Execution Context │ │
│ │ - llama.cpp GPU Runner │ │ - C++ MCP Implementation │ │
│ │ - whisper.cpp Engine │ │ - Sandboxed Native Tools │ │
│ └──────────────────────────┘ └─────────────┬─────────────┘ │
│ │ │
│ ┌──────────────────────────┐ ┌─────────────▼─────────────┐ │
│ │ Deep Research Engine │◄─────────►│ Vector & Relational Store │ │
│ │ - Asio Multi-Crawler │ │ - SQLite 3 (SQLCipher) │ │
│ │ - Native HTML5 Parser │ │ - HNSW Vector Similarity │ │
│ └──────────────────────────┘ └───────────────────────────┘ │
│ ▲ │
│ ┌──────────────────────────┐ │ │
│ │ Communications Suite ├─────────────────────────┘ │
│ │ - IMAP/SMTP C++ Sync │ │
│ │ - CalDAV / CardDAV Sync │ │
│ └──────────────────────────┘ │
└────────────────────────────────────────────────────────────────────────┘
The LocalInferenceEngine directly compiles against the core static libraries of llama.cpp and whisper.cpp.
- Hardware Autodetect: On application boot, Zenith interrogates the runtime environment (checking CUDA compute capabilities, Metal API presence, Vulkan drivers, or ROCm runtimes) and maps execution to the highest-performing hardware path.
- Dynamic Context Management: Implements memory-mapped GGUF files (
mmap) for immediate loading, context-shifting (reusing common prompt prefixes to avoid prompt processing delay), and native speculative decoding. - Audio Pipeline: Real-time microphone capture via PortAudio or native system audio APIs (CoreAudio, WASAPI, ALSA), piped straight to a dedicated
whisper.cppworker thread for instant STT (Speech-to-Text).
To run agents and execute powerful local tools safely, Zenith implements a native C++ Model Context Protocol framework.
- MCP C++ Core: Replaces JSON-RPC Node libraries with a highly optimized, JSON-Schema validated C++ parser built around
nlohmann/jsonorsimdjson. - Native Sandbox: Tool execution uses native OS process isolation:
- Linux:
clone()with namespaces (CLONE_NEWPID, CLONE_NEWNET, CLONE_NEWNS) andseccomp-bpffilters. - macOS:
sandbox_initprofiles. - Windows: Low integrity level AppContainers.
- Linux:
- Skills Loader: Dynamic library loading via
dlopen/LoadLibrary. Advanced safe tools can be distributed as compiled shared libraries (.so/.dll) exposing a standard C interface, or written in embedded Lua/WASM for sandboxed, rapid iteration without performance regression.
The Deep Research engine executes multi-step web queries, retrieves source materials, synthesizes content, and produces detailed reports.
- Async libcurl Multi-Scheduler: Coordinates up to 128 concurrent HTTP connections using
libcurland a non-blockingAsioevent loop. - Native Tokenization & Scraping: Avoids heavy headless browsers (like Playwright) unless absolutely necessary. Standard HTML parsing is done via an ultra-fast C++ HTML5 tokenizer (e.g., Lexbor/Gumbo or custom fast-parser), extracting clean text and structural markers in microseconds.
- Source Filtering: Custom heuristic classifiers run on the native text stream to score search-result relevance before feeding content to the Vector Index.
Zenith combines structured relational storage and unstructured semantic indices into a single, highly optimized binary database.
- Relational Data: SQLite 3 configured with WAL (Write-Ahead Log) mode, synchronous = NORMAL, and optimized page sizes to guarantee atomic operations under parallel access.
- Vector Embeddings Index: Uses the
SQLite-vecvirtual table extension or a custom, high-performance C++ Header-only HNSW (Hierarchical Navigable Small World) graph engine to index agent memories, notes, and PDF/Document snippets. - Atomics: Integrates the robust
atomic_iopattern from Odysseus to guarantee that user configuration changes and SQLite backups are performed atomically without corrupting active sessions.
The communications stack provides an offline-first email, task, and calendar experience.
- Asynchronous IMAP/SMTP Client: Built natively with OpenSSL 3.3 and libcurl, implementing a streaming MIME parser that processes email bodies and attachments on-the-fly, cataloging metadata straight to SQLite.
- CalDAV/CardDAV Sync Manager: Fully standards-compliant XML (WebDAV) client executing incremental synchronization loops with external groupware servers (Nextcloud, Fastmail, iCloud) using standard C++ coroutines to maintain responsive background task queues.
Zenith prioritizes complete user data sovereignty:
- Local Encryption: Optional database-level encryption via SQLCipher using AES-256-GCM, derived from a master key protected by the OS-native credential manager (macOS Keychain, Windows Credential Manager, Linux Secret Service API).
- Network Isolation: Strict firewall controls block unauthorized outbound traffic. Dynamic sandboxing enforces zero-network permissions on untrusted agent tools.
- No External Dependencies: Zero telemetry, zero cloud check-ins, and zero reporting. All AI processing, tokenization, and synthesis occur within the bounds of the local memory space.
zenith/
├── CMakeLists.txt # Unified multi-platform build definition
├── LICENSE # Open Software License v3.0 (OSL-3.0)
├── README.md # System Architecture & Design Specification
├── docs/ # Architectural sub-specifications
│ ├── database.md # Schema, atomicity, vector index specifications
│ └── ui_ux.md # Desktop UI, layout, canvas, editor specifications
├── src/
│ ├── main.cpp # Application Entry Point & Lifecycle Orchestrator
│ ├── core/ # C++26 Engine Architecture
│ │ ├── runtime.hpp # Coroutine scheduler, thread pools, service manager
│ │ ├── database.hpp # SQLite & SQLCipher wrapper with WAL optimizations
│ │ └── atomic_io.hpp # Crash-safe file-writing implementations
│ ├── inference/ # Local Model Serving Module
│ │ ├── model_runner.hpp # llama.cpp direct loader and context manager
│ │ └── speech_engine.hpp # whisper.cpp audio ingestion pipelines
│ ├── agents/ # Intelligent Agent Engine
│ │ ├── agent_context.hpp # Agent loop, planning models, and tool registry
│ │ └── mcp_server.hpp # C++26 Model Context Protocol server
│ ├── research/ # Deep Research Subsystem
│ │ ├── crawler.hpp # Asio-driven libcurl multi-crawler
│ │ └── html_parser.hpp # Dynamic HTML tokenization and text synthesis
│ ├── communications/ # Mail and Calendar Sync Suite
│ │ ├── mail_client.hpp # IMAP/SMTP stream-parser
│ │ └── caldav_sync.hpp # WebDAV coroutine synchronization engine
│ └── gui/ # UI Layouts & Rendering Systems
│ ├─- main_window.qml # Declarative QtQuick dashboard
│ └── creative_canvas.cpp # Custom hardware-accelerated QQuickItem canvas
└── third_party/ # Statically-linked library submodules
├── llama.cpp/ # Submodule: LLM inference library
├── whisper.cpp/ # Submodule: STT audio transcriber
└── sqlite_vec/ # Submodule: Vector Similarity Extension
To compile Zenith Workspace:
# 1. Clone repository recursively with submodules
git clone --recursive https://github.com/veridian-zenith/zenith-workspace.git
cd zenith-workspace
# 2. Configure build system with static optimizations
cmake -B build -DCMAKE_BUILD_TYPE=Release -DENABLE_NATIVE_TUNING=ON
# 3. Compile native executable
cmake --build build --config Release -j$(nproc)The resulting unified binary compiles and runs in standard OS user spaces without external runtimes, containers, or virtualization dependencies.