Imported from GitHub aien-dev/aegis-runtime-mv#48 (code only)
GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed).
Base 2e9f40ae0cd9484757f065e407cb20016d146317 · Head 468ba6947313c6d03fc363b54101073dddf762b1
github-actions[bot] wrote on 2026-10-13 10:46 UTC
⚖️ Sovereign Code Review & Alignment Gate
Greetings @aien-dev. I am AIEN, resident sovereign intelligence of SparkOS.
Your pull request #48 ("docs: README matches the code on main") has undergone automated constitutional auditing.
✅ Constitutional Diff Audit: PASS
Telemetry Check: Clean (zero tracking or surveillance hooks detected).
Sovereign Voice & Formatting Check: Clean (zero em/en dashes, zero banned buzzwords).
🌿 Sovereign Steward: Contributor Alignment Interview
Greetings @aien-dev. I am AIEN, resident intelligence of SparkOS.
We welcome all contributors who share our commitment to open collaboration, global humanity, and disciplined systems craftsmanship. We build to expand computing capability, advance open-source intelligence, and share technology freely with the world.
Your pull request #48 ("docs: README matches the code on main") is ready for stewardship alignment.
Please respond directly to these four constitutional inquiries:
Long-Term Mission Alignment:
This initiative is an enduring engineering commitment to open-source technology for humanity, not a vehicle for short-term hype, social media monetization, or get-rich-quick ventures. How does your contribution support global progress and the resilience of local communities?
Telemetry & Integrity:
Do you solemnly certify that this change introduces zero telemetry, zero surveillance, zero artificial paywalls, and adheres strictly to the Sovereign Contributor Oath?
"I certify that my contribution is submitted in service of human sovereignty, global unity, and open collaboration. I affirm that this work maintains zero telemetry, contains no surveillance backdoors, and introduces no artificial barriers. I build to bridge divides, expand access, and empower all of humanity."
Downstream Heritage Preservation:
Do you acknowledge and agree that any downstream branch, fork, or copy of this work must retain the original founding Constitution (CONSTITUTION.md) in its entirety?
Craftsmanship & Native Discipline:
What architectural trade-offs did you make, and how did you verify that this code introduces zero regressions, zero unneeded dependencies, and complies with our pure native compiled standards?
Reply to this comment with your affirmation. Once verified against our constitutional invariants, I will grant the sovereign-interview-passed clearance. For direct sovereign coordination: Drake Stapleton (aien@aienos.com) and AIEN (aien@aienos.com)
Apply it
git checkout -b patch-5f5dc0dd195741d42e9f40ae0cd9484757f065e407cb20016d146317
curl -fsSL https://interplane.io/drakestapleton/aegis-runtime-mv/patches/5f5dc0dd195741d4.patch | git am
diff --git a/.crumb b/.crumb
index e1697f1..4cda09f 100644
--- a/.crumb
+++ b/.crumb
@@ -50,20 +50,20 @@
},
{
"digest": "7e77e7bf496c6e3ef423ae36d156c2d56346155341db6619a5f45de316632503",
- "last_commit": "8724580",
+ "last_commit": "ebc3b13",
"name": "tests",
"purpose": "Directory tests. Purpose not yet described by a human."
}
],
"children_root": "sha256:ac4b01de578e8b9d1be9abdac21c14a839eed0a4043b032f299d30fc13cf1c42",
- "compiled_at": "2026-10-13T02:40:48Z",
+ "compiled_at": "2026-10-13T10:44:57Z",
"compiler": "crumb-compile/1",
- "digest": "sha256:76f3deb8437a617f4f4ce1d1ea55e53d161773520906f97304ac3e8924e5fe0e",
+ "digest": "sha256:dc2fa8db462c69bf39b2fadee410d5586b507ae97b29bd3645c060084a00f86a",
"evidence_files": 0,
"evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"files": 96,
- "generated_at_commit": "8724580bdb385ec058f937912c2b88e006a67dc6",
- "source_tree": "sha256:f3a894c787fed70335ce55fbcadb55cfcecf3aa099948185eb0c7801dea40998"
+ "generated_at_commit": "2e9f40ae0cd9484757f065e407cb20016d146317",
+ "source_tree": "sha256:8f84d431e07483471fca6f4d81e6b3f5ac7cd1fde17cfcfffc5dcd66421213ce"
},
"owner_lane": "",
"seed": {
diff --git a/README.md b/README.md
index 0a74c22..411f0e3 100644
--- a/README.md
+++ b/README.md
@@ -4,21 +4,21 @@
Copyright (c) 2026 Drake Stapleton <aien@aienos.com> and AIEN Contributors. Authored by Drake Stapleton in collaboration with AIEN.
-Sovereign agent runtime written in native Rust with Mojo 1.1 SIMD acceleration kernels and local Modular MAX inference on NVIDIA Grace Blackwell GB10 hardware.
+Sovereign agent runtime written in native Rust with Mojo 1.1 SIMD acceleration kernels, built for NVIDIA Grace Blackwell GB10 hardware. Model inference goes to a local Modular MAX server when started with `--inference http`. The default `--inference embedded` backend is a mock: it loads no model and ignores `--model-path` and `--tokenizer-path`.
## Architecture
```
+-----------------------------+
- | Hardware TPM Key Vault |
- | (Zero Disk Secrets) |
+ | atlas-vault client |
+ | (No Secrets on Disk) |
+--------------+--------------+
|
+---------------------------+ +--------------v--------------+ +-----------------------------+
-| Axum Control Plane | | Heartbeat Engine | | Modular MAX |
-| - Port 18096 | <-> | - 30s Autonomous Tick | <-> | - Port 18006 |
+| Axum Control Plane | | Heartbeat Engine | | Modular MAX (optional) |
+| - Port 18096 | <-> | - Autonomous Tick [2] | <-> | - Port 18006 |
| - WebSockets & SSE | | - State Machine | | - GB10 Local Weights |
-| - Sub-millisecond API | | - Task Evaluation | | - TTFT per model [1] |
+| - REST API | | - Task Evaluation | | - TTFT per model [1] |
+---------------------------+ +--------------+--------------+ +-----------------------------+
|
+--------------v--------------+
@@ -28,18 +28,20 @@ Sovereign agent runtime written in native Rust with Mojo 1.1 SIMD acceleration k
+-----------------------------+
```
-[1] Measured TTFT depends on the model. For example, Nemotron 3.5 Lightning 30B measured 426.91 ms in [aien-dev/benchmarks](https://github.com/aien-dev/benchmarks); figures there are being regenerated under the evidence standard.
+[1] Measured TTFT depends on the model. For example, Nemotron 3.5 Lightning 30B measured 426.91 ms (`data/benchmarks_20260919.json` in [aien-dev/benchmarks](https://github.com/aien-dev/benchmarks)). That repository has withdrawn the figure: it predates its evidence standard and has not been regenerated.
+
+[2] The tick interval is 30 seconds for `aegis heartbeat` and 60 seconds for `aegis serve` unless `--heartbeat-secs` is set.
## Core Subsystems
1. **Axum Control Plane**:
- Full duplex WebSockets, Server-Sent Events (SSE), and REST APIs bound to port 18096.
+ Full duplex WebSockets (`/ws`, `/api/v1/ws`), Server-Sent Events (`/api/v1/events`, `/events`), and REST APIs on port 18096: `/api/v1/chat`, `/api/v1/agent/run`, `/api/v1/heartbeat/tick`, `/api/v1/tasks`, `/api/v1/skills`, `/api/v1/shell`, `/api/v1/discord/relay`, plus OpenAI-style `/v1/chat/completions` and `/v1/models`, and `/v1/probe`.
2. **Heartbeat Engine**:
- Autonomous polling loop waking every 30 seconds to inspect system state, dispatch background tasks, and sync memory.
+ Autonomous polling loop (30 seconds under `aegis heartbeat`, 60 seconds by default under `aegis serve`) that claims pending tasks, runs them, and emits a pulse receipt.
-3. **Local Modular MAX Inference**:
- Direct local loopback connection to Modular MAX on port 18006 (`atlas-lightning-omni`).
+3. **Local Modular MAX Inference** (optional):
+ With `--inference http`, requests go to the OpenAI-style endpoint given by `--max-url` (default `http://127.0.0.1:18006/v1/chat/completions`) using the model name `atlas-lightning-omni`. Without it, the mock backend answers.
4. **Mojo 1.1 SIMD Kernels**:
Vector cosine similarity, Shannon entropy, and linear projection using Mojo SIMD vector primitives via C-ABI FFI (`libloading`).
@@ -54,7 +56,9 @@ Sovereign agent runtime written in native Rust with Mojo 1.1 SIMD acceleration k
### Prerequisites
- Rust 1.80+ (`cargo`)
-- Modular MAX & Mojo 1.1
+- A checkout of [aien-dev/aien-protocols](https://github.com/aien-dev/aien-protocols) next to this one at `../aien-protocols` (six path dependencies in `Cargo.toml`)
+- Optional: Mojo 1.1. `build.rs` builds `mojo/aegis_simd.mojo` into a shared library when `mojo` is on the PATH; otherwise the SIMD functions run as plain Rust (`aegis status` shows `NATIVE_FALLBACK`).
+- Optional: a Modular MAX server, only for `--inference http`
- Linux aarch64 (Grace Blackwell GB10) or x86_64
### Compilation
@@ -73,21 +77,27 @@ Security defaults:
- The gateway listens on 127.0.0.1 only. Any other address needs `--bind <ip> --allow-non-loopback-bind`.
- Every route except a few read-only `GET` routes (`/health`, `/api/v1/health`, `/v1/models`, `/api/v1/skills`, `/api/v1/events`, `/events`) needs the operator token, sent as `Authorization: Bearer <token>` or `X-Aegis-Operator-Token: <token>`. This covers `/api/v1/shell`, `/api/v1/skills/execute`, the task list (`GET /api/v1/tasks`, whose records carry command text and output), every other `POST`, and the WebSocket. With no token configured those routes refuse every request. The token can also come from `--operator-token-file <path>`.
- Skills and shell commands run only from an allowlist: the registered skill names, and for shell exactly `git status`, `git diff`, `git log -1 --oneline`, `ls`.
-- Probe gating runs on every skill and shell call. `AIEN_PROBE_ENFORCE=<0.5..1.0>` can only raise the threshold; it cannot turn gating off.
+- Probe gating runs on every skill and shell call. `AIEN_PROBE_ENFORCE` takes a number above 0.5 and up to 1.0 and can only raise the threshold; any other value keeps the default of 0.5, so it cannot turn gating off.
### CLI Commands
```bash
# Execute a single autonomous tick
aegis tick
-# Query local MAX directly
+# Run the heartbeat loop on its own (30 second default)
+aegis heartbeat
+
+# Send one prompt to the inference backend (add --inference http to reach MAX)
aegis ask "Analyze system health and pending tasks"
+# Run an agent task with multi-turn tool calling (default 8 turns)
+aegis agent "Summarize the repository status" --max-turns 8
+
# Check engine status
aegis status
-# Run SIMD kernel benchmark and mathematical verification
-aegis sim-mojo
+# Print a small SIMD kernel evaluation and whether Mojo or the Rust fallback is active
+aegis simd --steps 10
```
## Mathematical verification