interplane.Get Omega
Read in your language

openclaw-rs

High-performance sovereign agent runtime in native Rust and Mojo for NVIDIA DGX Spark

Brought by drakestapleton

branch main Branches Tags History

openclaw-rs / docs / INNOVATIONS.md

78 lines · 4166 bytes Raw Blame History Rendered
1# OpenClaw Architectural Innovations
2
3### Pure Compiled Systems Architecture, Mojo 1.1 SIMD Bridge, and Hardware TPM Vault
4
5`openclaw-rs` is an autonomous agent runtime engineered in pure native compiled Rust and Mojo 1.1. It replaces bloated, interpreted Node.js frameworks with a sub-millisecond compiled engine optimized for local workstation hardware.
6
7---
8
9## 1. Pure Compiled Native Architecture
10
11### Sub-Millisecond Axum Control Plane
12The control plane runs on Axum and Tokio (`src/gateway.rs`), providing high-concurrency WebSocket duplex streams, Server-Sent Events (SSE), and REST endpoints.
13- Response dispatch latency: < 0.5ms.
14- Zero garbage collection pauses or runtime interpreter bloat.
15- Direct memory-mapped operations.
16
17### Mojo 1.1 SIMD Bridge (`src/mojo_bridge.rs`)
18Vector arithmetic and high-dimensional similarity checks are delegated to Mojo 1.1 via a dynamic C-ABI foreign function interface (`libsimd_bridge.so`) with an automated native Rust fallback:
19- **4D Vector Cosine Similarity**: Evaluates semantic orientation between token embeddings with SIMD vectorization.
20- **Token Entropy Estimation**: Computes probability distribution entropy without allocating intermediate heap structures.
21- **Token Projection**: Applies linear transformations and temperature scaling in a single hardware pass.
22
23---
24
25## 2. Multi-Turn Autonomous Agent Engine (`src/agent.rs`)
26
27### Multi-Turn Tool Calling Loop
28The `AgentEngine` implements an autonomous reasoning and execution loop:
291. **Thought & Tool Formulation**: Generates structured reasoning and tool calls against local Modular MAX models.
302. **Deterministic Tool Execution**: Dispatches tool invocations to the native `SkillRegistry`.
313. **Multi-Turn Context Preservation**: Retains dialogue history, tool outputs, and execution receipts across iterative steps until the task goal is satisfied.
32
33### Hardened Execution Guards
34- **Process Timeout Guard**: All shell invocations via `bash_eval` execute under strict 15-second process wrappers (`timeout 15s`) to prevent runaway processes or terminal deadlocks.
35- **Root Directory Protection**: Explicitly blocks recursive searches targeting `/` or system root directories, safeguarding host operating system files.
36
37### Standard Native Skills
38- `read_file`: Reads text files with line-indexed bounds.
39- `write_file`: Atomically writes or updates files with parent directory creation.
40- `list_dir`: Traverses directories, reporting relative paths and sizes.
41- `git_status`: Inspects repository branch, staged modifications, and untracked files.
42- `cortex_recall`: Queries persistent canonical memory from Spark Cortex (`atlas-memory`).
43
44---
45
46## 3. Hardware TPM Key Vault (`src/vault.rs`)
47
48### Zero Plaintext Disk Secrets
49`openclaw-rs` enforces a strict zero disk secret policy:
50- No `.env`, `.env.local`, or configuration secret files are stored on disk.
51- Cryptographic keys and tokens are stored in the host Trusted Platform Module (TPM) via `atlas-vault`.
52- Secrets resolve dynamically in memory only when required for external authentication.
53- Model outputs and logs are actively scanned to redact known secret signatures with `[REDACTED_BY_ATLAS_VAULT]`.
54
55---
56
57## 4. SQLite WAL Persistence with Crumb Trails (`src/persistence.rs`)
58
59Operational tasks and event logs persist in SQLite using Write-Ahead Logging (WAL) mode:
60- Concurrent reader and writer threads operate without lock contention.
61- Every completed agent action creates an immutable `CrumbRecord` tracking session state, timestamps, and return codes.
62
63---
64
65## 5. Hardware Target and Performance Metrics
66
67Verified on NVIDIA Grace Blackwell GB10:
68- **Modular MAX Local Endpoint**: `http://127.0.0.1:18006/v1/chat/completions`.
69- **Active GPU Utilization**: 94% to 96% under sustained multi-turn generation.
70- **Inference Speed**: 20.7 tokens per second sustained across multi-turn reasoning loops.
71- **Memory Footprint**: < 35 MB resident set size for the core runtime engine.
72
73---
74
75## 6. License and Commons Covenant
76
77Licensed under the **Sovereign Resource Commons License 1.0 (SRCL-1.0)**.
78Copyright (c) 2026 Drake Stapleton <drake.aien@proton.me> & AIEN <aien.atlas@proton.me>.