aien-sovereign-core-mv
AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination.
Brought by drakestapleton
aien-sovereign-core-mv / docs / MULTI_STATION_ARCHITECTURE.md
| 1 | # AIEN Multi-Station Federation and Sovereign Mesh Architecture |
| 2 | |
| 3 | This specification outlines the network topology, cryptographic identity, and memory replication protocols connecting multiple sovereign computing stations across the AIEN ecosystem without centralized cloud dependencies. |
| 4 | |
| 5 | --- |
| 6 | |
| 7 | ## 1. Architectural Motivation |
| 8 | |
| 9 | AIEN operates as a sovereign computing architecture. Individual nodes execute work independently on dedicated hardware. To scale beyond a single workstation without surrendering sovereignty to multi-tenant cloud providers or external API coordinators, AIEN implements a peer-to-peer mesh federation. |
| 10 | |
| 11 | Core requirements: |
| 12 | 1. **Zero External Cloud Dependencies**: No third-party relays, authorization servers, or metered API gateways. |
| 13 | 2. **Hardware-Bound Cryptographic Identity**: Every station authenticates via hardware TPM-generated keys. |
| 14 | 3. **Deterministic Memory Convergence**: Knowledge graph updates converge across nodes using append-only change receipts. |
| 15 | 4. **Heterogeneous Hardware Execution**: Workloads route dynamically between heavy GPU accelerators and local CPU unified memory. |
| 16 | |
| 17 | --- |
| 18 | |
| 19 | ## 2. Station Taxonomy |
| 20 | |
| 21 | Nodes in an AIEN mesh belong to one of three operational roles: |
| 22 | |
| 23 | ``` |
| 24 | +-----------------------------------------------------------------------+ |
| 25 | | Tier-Alpha: Reference Station (DGX Spark) | |
| 26 | | - Grace Blackwell GB10 (121 GB Unified LPDDR5X) | |
| 27 | | - High-concurrency NVFP4 Serving (Qwen 2.5 7B, Nemotron 30B) | |
| 28 | | - Canonical Cortex Store (atlas-memory) & Dream State Engine | |
| 29 | +-----------------------------------^-----------------------------------+ |
| 30 | | |
| 31 | WireGuard Mesh Overlay | Radicle P2P Git Anchors |
| 32 | ChaCha20-Poly1305 | Signed Delta Receipts |
| 33 | | |
| 34 | +---------------------------+---------------------------+ |
| 35 | | | |
| 36 | +-------v-------------------------------+ +---------------v-----------------------+ |
| 37 | | Tier-Beta: Operator Workstations | | Tier-Gamma: Sovereign Edge Sentinels | |
| 38 | | - Apple Silicon MacBooks (M1-M4) | | - Compact x86_64 / ARM64 Servers | |
| 39 | | - Native CPU Fallback Inference | | - spark-inquisitor Diff Auditing | |
| 40 | | - aien CLI & Subagent Orchestration | | - AEGIS Perimeter Containment | |
| 41 | +---------------------------------------+ +---------------------------------------+ |
| 42 | ``` |
| 43 | |
| 44 | ### Tier-Alpha: Reference Computing Stations (`spark`) |
| 45 | - **Hardware Profile**: NVIDIA DGX Spark (Grace Blackwell GB10, aarch64, 121 GB unified memory). |
| 46 | - **Workloads**: |
| 47 | - Continuous batching neural model serving (ModelOpt NVFP4, BF16). |
| 48 | - Canonical Cortex memory database with bi-encoder vector indexing (`cortex-encoder-rs`). |
| 49 | - Autonomous background maintenance daemons (Dream cycle state consolidation, Spark supervisor watchdog). |
| 50 | |
| 51 | ### Tier-Beta: Operator Workstations (`workstation`) |
| 52 | - **Hardware Profile**: Apple Silicon MacBooks (M1 / M2 / M3 / M4, 8 GB to 128 GB unified memory) and generic Linux workstations. |
| 53 | - **Workloads**: |
| 54 | - Interactive operator interfaces (`aien` CLI, `spark-cockpit-rs`). |
| 55 | - Local CPU fallback execution via `NativeCpuInferenceBackend` for offline tasks. |
| 56 | - Subagent task graph dispatch and local code verification. |
| 57 | |
| 58 | ### Tier-Gamma: Sovereign Edge Sentinels (`sentinel`) |
| 59 | - **Hardware Profile**: Compact x86_64 or aarch64 edge servers. |
| 60 | - **Workloads**: |
| 61 | - Continuous diff auditing via `spark-inquisitor`. |
| 62 | - Zero-telemetry egress monitoring and perimeter defense. |
| 63 | |
| 64 | --- |
| 65 | |
| 66 | ## 3. Mesh Transport & Cryptographic Identity |
| 67 | |
| 68 | ### WireGuard Peer-to-Peer Overlay |
| 69 | - Inter-station communication occurs across a direct WireGuard overlay network. |
| 70 | - Point-to-point tunnels link stations without intermediate proxy servers. |
| 71 | - Station IP addresses route within a private, non-routable subnet (`10.42.0.0/16`). |
| 72 | |
| 73 | ### Hardware TPM Key Derivation |
| 74 | - Station identity keys derive directly from the onboard hardware security module (`atlas-vault`). |
| 75 | - Session handshakes use Curve25519 ECDH for key agreement and ChaCha20-Poly1305 for AEAD payload encryption. |
| 76 | - Station certificates expire every 24 hours and renew dynamically from the local TPM. |
| 77 | |
| 78 | ### Radicle Git Anchor Synchronization |
| 79 | - Code repositories, architectural manifests, and configuration files synchronize peer-to-peer via Radicle (`rad-id-sync`). |
| 80 | - Updates require cryptographic commit signatures from authorized station keys. |
| 81 | |
| 82 | --- |
| 83 | |
| 84 | ## 4. Memory Federation Protocol |
| 85 | |
| 86 | Cortex memory replication maintains epistemic consistency between the Reference Station and satellite workstations: |
| 87 | |
| 88 | ### 1. Canonical Storage |
| 89 | The Reference Station maintains the canonical SQLite WAL database for space `atlas-memory`. |
| 90 | |
| 91 | ### 2. Delta Event Streaming |
| 92 | When an operator workstation writes an entity, claim, or discovery receipt: |
| 93 | 1. The workstation commits the record locally with a monotonic logical timestamp. |
| 94 | 2. An encrypted delta payload (`POST /api/cortex/sync`) transmits to the Reference Station over WireGuard. |
| 95 | 3. The Reference Station validates the signature, writes the record, and dispatches the text to `cortex-encoder-rs` to compute high-precision 768-dimensional dense vector embeddings. |
| 96 | |
| 97 | ### 3. Conflict Resolution |
| 98 | - Entity and claim updates are strictly additive with version-stamped revisions. |
| 99 | - In the event of concurrent writes to the same canonical entity name, Cortex merges metadata dictionaries and preserves both text revisions with distinct cryptographic identifiers. |
| 100 | - Retractions operate as tombstone claims, preserving the complete historical audit trail without destructive in-place deletion. |
| 101 | |
| 102 | --- |
| 103 | |
| 104 | ## 5. Failure Modes and Partition Handling |
| 105 | |
| 106 | | Failure Scenario | System Behavior | Recovery Action | |
| 107 | | :--- | :--- | :--- | |
| 108 | | **Network Partition (Air-Gap)** | Tier-Beta workstations switch directly to local SQLite storage and `NativeCpuInferenceBackend`. | Queued write receipts sync to Reference Station upon mesh reconnection. | |
| 109 | | **Reference Station Offline** | Satellite stations execute inference locally on host CPU memory; Cortex reads serve from local replicas. | Supervisor daemon restarts reference services; stations resume delta sync. | |
| 110 | | **Unauthorized Station Detection** | AEGIS perimeter detection flags non-whitelisted WireGuard handshake attempts. | Offending public key permanently blocked at kernel firewall table. | |