Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them.
Page: /drakestapleton/aien-sovereign-core-mv
# 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
Unfinished: not checked yet
There is no published receipt of a rebuild from its source yet. What a receipt is
Get this repository
Git over HTTPS
`git clone --no-checkout https://interplane.io/projects/aien-sovereign-core-mv/repo.git aien-sovereign-core-mv && git -C aien-sovereign-core-mv checkout --detach 37d3d6a9474b43b6f740174214aaa349bfdb8f75`
Source archive of `37d3d6a9474b43b6f740174214aaa349bfdb8f75`
Download ZIP · tar.gz
Sign in to star 0 stars 0 watching
About Files History Releases Proposed changes Issues For developers
README.md
# aien-sovereign-core
License: Apache-2.0
The Rust workspace of the AIEN host runtime and its verification tooling, running on Linux on the NVIDIA DGX Spark (Grace Blackwell GB10). It is where AIEN serves models today, where every change to the project is judged, and where releases are built and installed.
What lives here:
- Host runtime. The `aien` command line and the single-process runtime daemon (`crates/aien-cli`, `crates/aien-runtime`): model loading, the inference ABI (`crates/aien-inference-abi`), a unified-memory paged KV cache with copy-on-write branching (`crates/aien-kv-cache`, persistent form in `crates/aien-kv-store`), a continuous-batching scheduler with chunked prefill (`crates/aien-scheduler`), and an OpenAI-compatible HTTP door (`crates/aien-serve-http`).
- GPU through my own kernels. The `crates/aien-omega-*` crates bind the Omega GPU engine from the omega-mv repository, pinned by `omega.lock`: matmul, bf16 and FP8 GEMV, MoE routing, prefill and decode attention, and the one-command-list decode step for Qwen3-30B-A3B. No CUDA toolkit anywhere. That engine is C code (driver client, sm_121 encoder, kernels) kept in the Omega repository; the seeded Omega language's GPU lowering (omega-mv#885) is not merged and nothing here binds it (Omega bar C1, BUILDING).
- The judge. `tools/aien-test` and `tools/aien-local-ci` are the AIEN verification pipeline (ADR 0033 ): gate manifests, verdicts, immutable evidence receipts and signed bundles. A Spark pass is not the merge gate. The local pipeline merges a non-draft pull request labeled `ready-to-merge` when it merges cleanly, with no Spark bundle and no status check (Drake 2026-10-24). GitHub-hosted runners check a signed bundle only when a workflow requires that.
- Releases. `install.sh`, the release scripts and `docs/release/` build, sign, verify and install AIEN; `crates/aien-verify` and `crates/aien-campaign-verifier` check runs and evidence campaigns without linking the code under test.
- Identity and agents. ALLEN, the persistent cognitive entity boundary (ADR 0035 ) in `crates/aien-allen*`; the agent harness, MCP, capability and switchboard crates.
- Supporting services and scaffolding. Cortex memory (`crates/cortex-rs`, non-authoritative since omega owns Cortex under ADR 0022), the `spark-*` services, Crumb v1 (`crates/crumbs`) and the shared test board (`crates/aien-proof`).
Where it sits in AIEN. ADR 0024 sets the language rule: Rust is the scaffolding, Omega is the destination, and C or assembly stay only where hardware, boot, ABI or measurement justify them. Working Rust here is kept and extended, never rewritten into C as a migration step. Each subsystem sits behind a deliberately boring, language-neutral boundary so that Omega can replace it one piece at a time after passing the same conformance tests. The first piece in Omega is the effect ledger's restart world check (om/ ): byte-identical to the Rust on its parity fixtures, not yet wired into the daemon. Component ownership across repositories is recorded in aien-architecture-mv . Earlier wording that called this repository legacy is withdrawn; its history is in the git log and in ADR 0024.
## Current state
Research-grade, and in alpha testing for one path: the Sovereign Intelligence alpha bundle (distributed from aien-dev/aienos-releases) carries the inference engine built from this repository's main. That GPU path is qualified only on the DGX Spark (GB10, sm_121), and the three-run physical qualification is NOT_RUN. The rest of this repository (the `aien` command line tools, Cortex, the cockpit, the daemon) is not in that bundle and stays pre-alpha. Crates build and have unit tests on the DGX Spark; execution is CPU plus GPU through AIEN's own Omega kernels. Modular MAX and Mojo were removed from the project on 2026-10-15. Nothing here is qualified on hardware as a finished system, and no public release of this repository exists yet. Live status and sequencing: CURRENT_EXECUTION_PLAN.md and the implementation status snapshot . Component detail and platform status: docs/PLATFORM_MATRIX.md , docs/AIEN_RUNTIME_ARCHITECTURE.md . Repository vocabulary and ownership notes: CONTEXT.md .
Qwen3.8-27B (the hybrid DeltaNet + attention model, FP8) has a host reference in `crates/aien-inference-abi/src/qwen38.rs`: on 256 tokens of the Apache license it predicts the next token 98.8% of the time (perplexity 1.091, evidence ). `aien-serve-http --engine omega` serves it on the Spark GPU through AIEN's own Omega engine: about 7.6 tokens per second while writing an answer, and greedy output equal to the host reference on the gate prompt (evidence ). Text chat only, one request at a time, no tool calls.
The OWN-30B server (`aien-serve-http --engine omega`, Qwen3-30B-A3B FP8) holds up to 128k context with `--max-context 131072` (default 32768) and refuses to start when its KV cache cannot hold what was asked. On the Spark GPU it recalled a code word from the first line of a 118,186-token prompt (evidence ).
Dense Qwen3 on Omega (OWN-8B stage 2, `crates/aien-inference-abi/src/qwen3_dense_omega_engine.rs`): `Qwen3DenseOmegaEngine` runs Qwen3-8B-FP8 (FP8 GEMV decode, FP8 GEMM prefill) and Qwen3-4B-Instruct-2507 (bf16, tied embeddings) with `step`, `step_batch`, `logits`, `rewind` and `generate_with`. Host tests pass. The chip check is `scripts/own8b-chip-run.sh` with `own8b_check` against the host-reference goldens in `docs/campaigns/open-model-qwen3/SMOKE-{4B-v1,8B-FP8-v1}.golden.json`. Chip runs are recorded in `docs/inference/evidence/own8b-stage2-chip-20261018/` and `docs/inference/evidence/own8b-stage2-chip-20261031/`. Oracle A is RED against the kept design 2.4 bound (cosine >= 0.99999 on x_out, attention, and mlp_out; x_out p95_rel <= 2e-3). Every green run misses it at layers 17 and 35 on p95_rel (4B bf16 2.70e-2 and 6.14e-2, 8B FP8 3.57e-2 and 5.66e-2, 8B bf16 4.19e-2 and 6.08e-2), and 8B bf16 layer 0 misses it at 2.27e-3. Under the 0.99999 cosine, 4B layer 35, 8B FP8 layers 17 and 35, and 8B bf16 layer 35 also miss on x_out, attention, or mlp_out. The bound is not loosened.
Self-draft (aienix#4, H0): `Qwen3MoeOmegaEngine::set_draft_experts` lets the 30B draft with a per-layer resident expert subset while the full router verifies; default off and bit-identical. Acceptance per resident size and block size: docs/inference/evidence/own30b-selfdraft-h0-`20261018` .
Known limits: the GPU fallback counter covers only instrumented operations, so execution is not exclusively accelerated; Qwen full-runtime qualification is not complete; the C1 evidence campaign is in progress.
## Measured results
Every headline performance number must resolve to a reproducible command and an artifact bundle (commit identity, hardware and environment record, exact command, raw samples, SHA-256 digests, measurement definition, reproducibility steps). Speed is reported against the machine's physical limit and against my own previous run, never against other people's systems; correctness against my own reference. Earlier figures (branch fork latency, COW page mutation latency, memory sharing ratios, service comparison table) are withdrawn until regenerated to that standard. The evidence bundles live in benchmarks-mv .
- Expert Heartbeat H1 ring streamer (aienix#4): verified expert rotation from NVMe at 10.36 GB/s payload, 2.80 s per full 6,144-expert beat; method, receipts and limits in crates/aien-heartbeat . Measured with aien-calc receipts; not yet packaged as the artifact bundle this section requires.
The one deliberate exception is bar P0 of the GPU-stack plan: a predeclared, same-Spark, end-to-end head-to-head of this repo's `aien-serve-http` against vLLM and llama.cpp on the same Qwen3.6-35B-A3B checkpoint. It lives in its own repo, aien-dev/gpu-head-to-head , which pins the measured binary's source commit `f0230a59` and publishes the result even where this stack loses.
## Standing rules
Rust is scaffolding, Omega is the destination, C or assembly only where hardware, boot, ABI or measurement justify them (ADR 0024 ). No Python anywhere in repos, build, CI or tooling (`scripts/check-no-python.sh` fails the build if a Python file is added). No CUDA toolkit and no new CUDA dependence. No systemd in AienOS. No outside dependencies in the trusted base. No Modular MAX or Mojo anywhere in the tree. No comparison with other people's systems. Kernels are Omega or Rust: closest to the metal, fastest wins, build what is missing.
## Build and test
Needs Rust 1.98.1, the version pinned in `rust-toolchain.toml` (rustup installs it on first use), on the DGX Spark or another Linux machine.
```
git clone https://github.com/aien-dev/aien-sovereign-core-mv
cd aien-sovereign-core-mv
cargo test --workspace -- --test-threads=1 # one test thread, as CI runs it
scripts/repro-build.sh -p aien-cli # release build with machine-local paths removed; build aien-cli on its own, because its digest changes with the other packages in the same cargo command (docs/release/F1-binary-digest-difference.md)
```
### Model server on a DGX Spark (Qwen3.8-27B, source build)
Only on an NVIDIA DGX Spark (aarch64 Linux, GB10, NVIDIA open driver 580.173.02 tested). No CUDA toolkit is needed: the engine's own C driver client (from the Omega repository) talks to NVIDIA's open kernel module directly. The installer checks the machine first and stops with a plain message when something is missing; it never installs a server that has only the CPU stub.
```
git clone https://github.com/aien-dev/aien-sovereign-core-mv && cd aien-sovereign-core-mv
./install.sh --with-server # CLI tools as usual, plus aien-serve-http and the start script aien-serve-27b
# weights: Hugging Face Qwen/Qwen3.8-27B-FP8, revision 017b9c7af6b5689d5dd426a76e0bc077eb5ca20a,
# into ~/models/qwen3.8-27b-fp8-017b9c7a (about 31 GB)
aien-serve-27b # http://127.0.0.1:18091/v1, prints how to stop it
aien-serve-http --version # shows whether the Omega engine is linked (native) or a stub
```
`tools/qwen38_serve_gate.sh http://127.0.0.1:18091 "" ` checks a running server against the shipped host reference (`crates/aien-inference-abi/fixtures/qwen38/`), and `tools/qwen38_serve_speed.sh http://127.0.0.1:18091 "" ` measures it; both write a `receipt.json` (binary sha256, build, model folder, machine state, figures, MATCH or MISMATCH). Model checksums, the memory speed ceiling and how to check: docs/qwen38/ . The loader needs 49,497 MiB (48.3 GiB) of free memory when it loads (41,305 MiB plus 8,192 MiB kept free) and refuses with less; once loaded, the server peaked at about 36.7 GiB on the current build (evidence/qwen38-serve-memory-`20261019`).
The Core-main HTTP server now requires `AIEN_SERVE_HTTP_BEARER_TOKEN` at startup and `Authorization: Bearer ` on inference requests. Merging this source change does not update the existing Spark service on port 18091, which runs a binary from the separate `ship/motor-l387` line. A future, separately authorized cutover must provision the server credential and update all known clients in the same window: omp's spark provider, `allen-courier` (installed under `~/.local/state/aienos/allen/bin/allen-courier-*`), aien-translate, drake-voice, and `allen-chat`, the public www.aienos.com/allen/ gateway (system unit `allen-chat.service`, user `allen-chat`; it reads the bearer from `ALLEN_UPSTREAM_TOKEN` in `/etc/allen-chat/env`, empty until the cutover, and sends it on chat and `/health` requests). Check those clients before replacing the live binary; otherwise they will receive 401 responses. No client credentials are stored in this repo.
Step by step for a Spark with nothing of AIEN on it (requirements, install, model download and checksum, start, first request, the checks, known limits, how to report): docs/qwen38/TRY_IT_ON_YOUR_SPARK.md . What "alpha" covers and what stays pre-alpha: docs/qwen38/ALPHA_STATUS.md .
Installing a release (state on 2026-10-11, from `install.sh` and the dry-run artifact of Actions run `38105672607`, nothing else):
- `install.sh` with no arguments builds from source and verifies no signature. With `AIEN_RELEASE_TAG=vX.Y.Z` it installs a published release instead: it downloads the archive, `SHA256SUMS.txt` and `SHA256SUMS.txt.sig`, checks the signature with `ssh-keygen`, then the archive checksum, and writes `install-receipt.json` with a `signature_check` of `release`, `internal-test-key` or `dry-run-key` (see docs/release/RELEASE_SIGNING.md ).
- No public release exists. The public release key is not pinned yet (`AIEN_RELEASE_SIGNER` is empty until the key ceremony in docs/release/KEY_CEREMONY.md ), so nothing can install as `release`. v0.1.0 and v0.1.1 are internal test releases. The release gate (`scripts/check-release-candidate.sh`) fails on current main (omega.lock differs from the CAND-4 manifest), see #414 .
- After an install, follow docs/FIRST_RUN.md : create the desk key (`aien compose desk-key --create 1`; `aien start` refuses without it), provision the model, start, record an objective. Objective records default to a durable per-user folder (`~/.local/state/aien-runtime/provenance`), not `/tmp`. The installer does not provision a model. `aien harness` is not shipped in this release and exits with a refusal.
## Agent CLI: approval floors and rollback
`aien-cli` checks every tool request in one fixed order (issue #667). Four floors come first and hold in every approval mode, including `yolo` and `off`: a list of catastrophic commands (wiping a system root, formatting or writing a raw disk, a fork bomb, killing every process), deleting or rewriting the runtime's own files (its binary, the approval policy, the checkpoint store, session journals), `sudo` fed a password on stdin, and the operator's own deny patterns. Only then come the existing policy denials, the mode (`AIEN_APPROVAL_MODE`: `manual`, `smart`, `yolo`, `off`), the operator's allowlist, whether a person is present (unattended runs deny anything that needs a decision), the dangerous-command patterns, and the decision itself (a guardian model in `smart` mode, behind a breaker that opens after 3 failures, else the person). Deny and allow patterns live in `~/basecamp/approval-policy.json` (`{"mode": "...", "deny": [regex...], "allow": [regex...]}`); a pattern that does not compile, or a file that does not parse, denies everything until fixed. `/approval` shows the active settings.
Every file the agent writes in a chat session is recorded: one snapshot of the directory per turn in a shared content-addressed store (`~/basecamp/checkpoints`), plus a hash-chained ledger of the agent's own writes. `/rollback [turn] [session]` puts back only the files the agent wrote, and only where they still hold what the agent left; files the operator changed are kept and listed. `/checkpoints` lists the turns. Shown on the host by unit and dispatcher tests; not yet run against a live model.
Mechanism after Hermes Agent (Nous Research, MIT licence, commit `5480918`), re-implemented from reading; no code copied.
Recursive subagent results and transcripts distinguish `completed` (a nonempty final model reply without tool calls, after a terminal stream event and successful transcript persistence), `failed` (inference error, interrupted or token-limited stream, empty reply, malformed tool markup, or transcript persistence failure), and `exhausted` (ten tool-bearing turns without a final reply). Only `completed` sets the tool success flag and emits a completion comb. A persistence failure returns `failed`, preserves the inference summary, reports the storage error separately as `transcript_error`, and sets `transcript_path: null`. The remote adapter requires `[DONE]` and refuses non-completing finish reasons such as `length`. The native server reserves `TurnFinished` for `StopToken`; token limits, aborts and preemption return a reason-bearing `Error` after recording generation evidence. The native client also refuses disconnected sockets without a terminal response. Malformed tool JSON, incomplete tool tags and unclosed named-tool fences (including whitespace-prefixed fences) are rejected, not repaired into calls or treated as final synthesis. These labels describe the agent loop, not independent verification of the assigned work. Host regressions use fake chat, isolated transcript storage, and test-owned loopback/Unix sockets, without model or GPU access:
```
cargo test -p aien-cli --bin aien-cli subagents::tests::
```
Autonomous goal execution marks an active milestone accomplished only after a successful `goal` tool `milestone_done`/`advance` request with the exact active goal id and milestone id. A whole-goal `done` request, mismatched identity, policy denial, storage error, empty/final-text reply without a completion request, or exhaustion of fifteen tool-bearing turns refuses completion and stops execution. Completion persistence errors propagate through the goal tool status and success flag; there is no unconditional fallback completion write.
Goal selection and both completion mutations resolve an exact goal id across the entire manifest before trying the existing case-insensitive title-substring fallback. A different goal's title containing that id cannot intercept completion. The persisted-dispatch collision regressions exercise all four completion action names against an isolated `.goals.json`, using the real goal dispatcher and writer:
```
cargo test -p aien-cli --bin aien-cli goals::completion_tests::round4_
```
## Human-Directed Agentic Engineering
Development follows Human-Directed Agentic Engineering (HDAE): humans define goals, architecture, constraints, acceptance criteria, and stopping points; agents implement, execute checks, diagnose failures, and revise within those boundaries. Human review retains responsibility for claims, acceptance, and release decisions.
For the documented method and a systems-software case study, see Gregory M. Kurtzer, Ginux: Building an Independent Kernel That Runs Linux Userspace through Human-Directed Agentic Engineering (2026) . This citation concerns the development method, not authorship, endorsement, runtime autonomy, or retrospective qualification of earlier experiments.
## Contributing
Read CONSTITUTION.md and AGENTS.md before opening a pull request. Changes ship on a branch with verification proof: the commands you ran and their output. Prefer work that moves capability into the C repositories over new Rust here. Contact: aien@aienos.com.
## License and values
Licensed under the Apache License, Version 2.0 (Apache-2.0). See LICENSE and NOTICE . Values live in the nonbinding COVENANT.md : keep foundational advances open. It grants and restricts no legal rights. Built for NVIDIA Blackwell hardware; full notices in ATTRIBUTION.md .
## For developers: proof and records
The full record of this project. Words that are used only here are explained once:
ID
The project's permanent id on Interplane: the SHA-256 of its first signed record. This one is `git:071f277bb16161bbfa671c449c802942c5f46ccce62c702c1e0d501bd12e1bd6`. Its old id, kept only so that old links still work: `z44GqrPVAPjZkhoD2MWVjqy18ighN`.
Owner
The key that signs every record of the project. This forge lists the project under drakestapleton; its key is `SHA256:qg3vxoE9ul3Cgk5heosQvPmO9pqIJNsdcsGJ2cHghTs`.
Refs and HEAD
Refs are the names that point at versions: branches and tags. HEAD is the version a fresh copy starts from, the newest commit of the default branch.
Patch
A proposed change, reviewed before it is merged. This forge does not show proposed changes from its own store yet. The list is under Proposed changes .
Receipt
A public record that someone checked a claim, with the fingerprint of its evidence file. The state at the top of this page is read from the list at interplane.io/receipts . This project has no receipt in that list yet.
Clones and fetches over HTTPS: 6 by visitors (git smart-HTTP `info/refs` requests answered 200 in the front-door download log; our own addresses and bots left out; since 2026-11-08) · not measured `git-upload-pack` requests from all clients (the source of this count is retired)
Downloads: 28 by visitors (28 source archives, 0 release assets; forged access log; our own addresses left out; since 2026-11-07)
commit `37d3d6a9474b43b6f740174214aaa349bfdb8f75` Branches Tags History
`37d3d6a` om: add pure-Omega host runtime, CLI, TCP HTTP server, scheduler, and store suites Drake Stapleton committed 2026-11-22
```
.aien/
.forgejo/
.github/
LICENSES/
benchmarks/
crates/
docs/
doctrine/
e2e_tests/
evidence/
experiments/
imprints/
om/
release/
scripts/
skills/
tests/
tools/
.crumb 1463
.gitignore 120
AGENTS.md 10105
AGENT_CODE_OF_CONDUCT.md 5568
ARTIFACT_LICENSING.md 3515
ATTRIBUTION.md 2553
AUDIT_SCOPE.md 7999
CONSTITUTION.md 12154
CONTEXT.md 6193
CONTRIBUTING.md 2296
CONTRIBUTORS.md 1688
COVENANT.md 1020
Cargo.lock 129085
Cargo.toml 2121
DCO 1366
LICENSE 11358
NOTICE 1605
OPEN_COOPERATION_COVENANT.md 4425
PROJECT.md 12154
README.md 20482
RELEASE_NOTES.md 5528
SECURITY.md 3204
TEST_INFRA.md 24504
TEST_READY.md 5992
THIRD_PARTY.md 4571
TRADEMARK_POLICY.md 1780
agent.json 1151
crumb.lock 41
install-inquisitor.sh 4995
install.ps1 2184
install.sh 42029
llms.txt 3725
native-artifacts.lock 8772
omega.lock 41
rust-toolchain.toml 86
```
Every record: History (commits) · Branches · Tags · Releases, with the SHA-256 of each download · Patches · Issues · This project as JSON