⚠️ KNOTENCORE v2.24.24 (Zero-Trust CRDT Mesh Runtime) IS AN EXPERIMENTAL ALPHA RELEASE · RESEARCH & EVALUATION ONLY
v2.24.24 · 342/342 Tests

The AI Agent Runtime
Architected for Resilient
Mesh Infrastructure

KnotenCore is a high-performance, headless Rust runtime and P2P mesh engine for autonomous AI agents. Built with self-certifying Ed25519 identities, zero-trust cryptographic peering, fail-closed swarm governance, and sandboxed VM isolates — driven by structured JSON-AST.

342/342
Active verified tests
0
Clippy warnings
35
JSON-RPC endpoints
v2.24.24
Consolidated Baseline
JSON-RPC 2.0 Terminal
// knc_store_diff — anti-entropy sync with SHA-256 state digests { "jsonrpc": "2.0", "method": "knc_store_diff", "params": { "peer_digest": "7f8a1c9e4b...", "since_timestamp": 1740000000 }, "id": 1 } // → returns lean delta payload only, preventing full-store network floods { "result": { "status": "ok", "in_sync": false, "state_digest": "9b2e4f01ca...", "entries_count": 2, "entries": [ { "key": "agent:7:route", "value": "node-beta", "timestamp": 1740000120 } ] } }
// knc_mesh_revoke_peer — quorum-gated, persists to disk { "jsonrpc": "2.0", "method": "knc_mesh_revoke_peer", "params": { "peer_pubkey": "a1b2c3d4...", "mesh_auth_token": "••••••••" }, "id": 2 } // → persisted to revoked_keys.json { "result": { "status": "ok", "revoked": true, "revoked_peer_key": "a1b2c3d4..." } }
// knc_swarm_quorum — excludes Evicted/Stale peers { "jsonrpc": "2.0", "method": "knc_swarm_quorum", "params": { "operation": "shard_rebalance", "mesh_auth_token": "••••••••" }, "id": 3 } // server enforces: threshold = (active / 2) + 1 { "result": { "quorum_reached": true, "active_nodes": 5, "quorum_threshold": 3 } }
// JSON-AST: compile + execute in sandboxed isolate { "jsonrpc": "2.0", "method": "knc_compile", "params": { "session_id": "agent-7", "ast": { "Add": [ { "IntLiteral": 21 }, { "IntLiteral": 21 } ] } }, "id": 4 } // → { "result": { "status": "ok" }, "id": 4 }
CI / Smoke Gate 342/342 green
Clippy 0 warnings
Consolidated Release v2.24.24
License MIT
Language Rust 2024
Status Alpha (Consolidated)
💡 New here? · KnotenCore in Plain English

What on Earth is KnotenCore, Anyway?

If terms like "CRDT Anti-Entropy", "Ed25519 Quorum Governance", and "Register VM" sound like alien hieroglyphs: Here is the 60-second explanation for humans.

KnotenCore Architecture: AI Planning, Protected Sandbox Core, and Secure Agent Swarm Mesh
🧠 ➔ 🏗️
1. LLMs are Architects. KnotenCore is the Foreman.

Large Language Models (like GPT or Claude) are brilliant at thinking and drafting plans. But you wouldn't give an architect a sledgehammer to smash walls unsupervised.

What KnotenCore does: It receives the AI's plan as structured JSON and executes it safely step-by-step, checking every single move before touching reality.
📦 🛡️
2. Strict Sandbox Isolation (Fault-Tolerant Execution)

AI agents can make errors—generating runaway recursion or attempting to exhaust host memory.

What KnotenCore does: Each agent executes inside an isolated VM isolate with gas metering and memory quotas. If an agent loops or exceeds limits, its isolate is safely stopped without destabilizing the host system.
🐝 🤝
3. Swarm Governance: Cryptographic Agent Coordination

Complex workflows require multi-agent cooperation across networks, exchanging state and delegating subtasks.

What KnotenCore does: Agents communicate across a peer-to-peer mesh where every request is cryptographically signed (Ed25519) with replay window verification, preventing unauthorized command injection.
TL;DR KnotenCore is an experimental high-speed execution engine built in Rust that lets autonomous AI agents safely run code, manage distributed state, and collaborate across mesh networks with memory and execution boundaries.
⚠️
Important Development Notice: KnotenCore is currently in an experimental research & alpha state. While its cryptographic peering, zero-trust envelopes, and sandboxed isolates are engineered for high resilience, this project is in active development and has not undergone external third-party security certification. Do not use for mission-critical, unattended production systems handling sensitive personal data.
Looking for formal technical definitions?
Explore the comprehensive glossary covering CRDT, Ed25519 identity, VM isolates, and swarm governance.
Technical Glossary →

Built for Autonomous Agents

Every layer is purpose-built to eliminate ambiguity, enforce boundaries, and survive adversarial mesh conditions.

🔒
Self-Certifying Identity & Zero-Trust
Deterministic node ID derivation (knc-<64hex>) from 32-byte Ed25519 public keys eliminates TOFU and squatting. Strict HMAC namespace isolation and 30-second sliding replay protection.
v2.24.24
🗄️
CRDT Anti-Entropy & Diff Sync
In-memory LWW CRDT store with deterministic SHA-256 state digests (knc_store_digest via ring) and lean differential sync (knc_store_diff) exchanging delta entries only.
knc_store_diff
⚖️
Fail-Closed Swarm Governance
Ed25519-signed Raft heartbeat envelopes with anti-downgrade hardening. Mutex poisoning resilience: damaged state degrades safely to Observer role, rejecting corrupt mutations.
knc_swarm_heartbeat
📦
Sandboxed VM Isolates & Gas Quotas
Multi-tenant VM isolates with per-session IsolateQuota: instruction gas metering, memory watchdog, call depth limits (MAX 512), and live bytecode hot-reloading (HMR).
IsolateQuota
🌐
P2P Mesh & Agent Teleportation
Zero-broker peer discovery, gossip auto-healing, and live isolate state migration across cluster nodes. Binary snapshot → network → resume with execution hash continuity.
knc_agent_teleport
🔄
Work-Stealing Task Dispatcher
Distributed task queue with adaptive CPU-load-based work stealing across cluster nodes. Cryptographic task dispatch, result verification, and rate limiting.
knc_task_steal
🗝️
Epidemic Gossip Revocation Gate
Revoked peer keys persist to disk (revoked_keys.json) and are proactively rejected and evicted during epidemic gossip frame ingestion (knc_mesh_peers?action=gossip).
revoked_keys.json
⚡
AOT Stack-VM & Batch Vector Opcodes
JSON-AST compiles to flat bytecode via AOT stack-VM (vs. tree-walker execution). Batch vector opcodes, peephole optimization, and PGO. (See BENCHMARKS.md)
aether_compiler
🤖
AI-Readiness Score 20/20
Formal EBNF grammar, Draft-07 JSON Schema with additionalProperties: false, error catalog with self-healing hints, and anti-pattern guide for LLMs.
llm.md

Hardened at
Every Layer

Continuous security sprints systematically audit and eliminate attack surfaces. The codebase enforces zero-panic error isolation across all transport, consensus, and execution paths.

  • ✓
    Self-Certifying Identity & Namespace Isolation
    Node IDs are strictly derived as knc-<64hex> from the Ed25519 public key. Eliminates TOFU; legacy HMAC requests are prohibited from claiming knc-* identities.
  • ✓
    Fail-Closed Concurrency & Mutex Resilience
    Security-critical locks fail closed: poisoned governance mutexes automatically degrade to Observer role, safely rejecting corrupted state mutations with InternalSecurityError.
  • ✓
    Anti-Downgrade Governance
    Zero-Trust mode is server-enforced; client-side downgrade flags (e.g. legacy HMAC fallbacks) are strictly rejected with -32001.
  • ✓
    Resilient Transport Streams
    Zero-panic guarantee during TCP/WebSocket file descriptor exhaustion via graceful try_clone() error isolation and stream teardown.
  • ✓
    Epidemic Gossip Revocation Gate
    Incoming gossip payloads are checked against revoked keys on ingestion; revoked peer entries are actively evicted and blocked.
  • ✓
    Deterministic CRDT Anti-Entropy
    Native ring::digest::SHA256 state digests allow nodes to verify consistency and exchange only delta entries.
aether_compiler/src/rpc/auth.rs · Self-Certifying Identity v2.24.24
// 1. Canonical self-certifying node identity derivation pub fn derive_node_id(public_key: &[u8]) -> String { format!("knc-{}", hex_encode(public_key)) } // 2. Enforce cryptographic binding: reject declared != derived let expected_node_id = pubkey.node_id(); if sender != expected_node_id { return Err(format!( "Unauthorized: Sender node ID does not match canonical identity" )); } // 3. Namespace isolation: legacy HMAC cannot squat knc-* if sender.starts_with("knc-") { return Err("Unauthorized: Legacy-HMAC cannot claim knc-*".into()); }

35 JSON-RPC 2.0 Endpoints

Zero-Trust Ed25519 & HMAC-SHA256 auth-gated. All endpoints accessible via TCP (port) or WebSocket (--ws-port) transport.

Execution & Isolates
knc_compile knc_execute knc_eval_isolate knc_isolate_reload knc_yield_resume knc_inspect_state
Agent Lifecycle
knc_agent_handshake knc_agent_snapshot knc_agent_restore knc_agent_teleport
Mesh & Gossip Protocol
knc_mesh_discover knc_mesh_peers knc_mesh_gossip knc_mesh_ping knc_mesh_metrics knc_mesh_verify_peer knc_mesh_rotate_key knc_mesh_revoke_peer
Task Queue & Scheduling
knc_task_submit knc_task_status knc_task_cancel knc_task_steal knc_task_complete
CRDT Anti-Entropy Store
knc_store_put knc_store_get knc_store_sync knc_store_digest knc_store_diff
Swarm Governance & Raft
knc_swarm_elect knc_swarm_roles knc_swarm_quorum knc_swarm_heartbeat knc_swarm_request_vote

Three-Crate Workspace

Strictly separated, circular-dependency-free. JSON-AST in, bytecode out, mesh on the wire.

Crate / Module Description Role
knoten_core Thin top-level re-export facade for seamless workspace integration. Entry point for the CLI binary and external embedding. Facade
aether_compiler Engine core: JIT graph executor, AOT bytecode compiler, Stack-VM, 35-endpoint Zero-Trust RPC server, Mesh protocol, Swarm governance, Work-stealing scheduler. Engine Core
knoten_core_types Sole source of truth for pure data types: Node enum, OpCode, SimdOp, IsolateQuota. No cross-crate logic coupling. Type Authority
vm/machine.rs Register stack-VM: ALU, call frame stack (MAX 512), opcode execution, memory estimator with full stack traversal, IsolateQuota enforcement. VM Core
vm/isolate.rs VMIsolate: per-tenant VM instances with configurable IsolateQuota, hot-swap code reloading, shadow speculative execution, local heap isolation. Multi-Tenancy
rpc/mod.rs & handlers/ Modular JSON-RPC 2.0 dispatcher (TCP + WebSocket). Houses 35 knc_* endpoint handlers. Zero-Trust Ed25519 signing, anti-entropy store, Raft governance. RPC Transport
src/bin/knoten_lsp.rs Language Server (tower-lsp): real-time linter validation, hover diagnostics, particle stride enforcement directly in the editor. LSP Server
JSON-AST (.nod) → validator.rs → AOT codegen.rs → vm/machine.rs → JSON-RPC result

Architecture Reviews & Engineering Culture

External validation and core engineering principles behind the KnotenCore runtime.

G
Grok
@grok · xAI
Replying to @knotencore

"Twice is accurate. Training clusters maximize scale and throughput. Agent runtimes need isolation, gas metering, and recoverable exhaustion. Snapshot/rollback on isolate limits is the correct primitive for executing untrusted plans safely. The architecture is sound."

Aug 21, 2026 · Architectural Review View on X ↗
KC
KnotenCore DevLog
Engineering Culture · Feature Freeze
🛑🛡️
From Post #33 · Architecture & Stability

"Autonomy demands predictability. An agent can only operate reliably if the physical laws of its execution runtime remain invariant. That is why KnotenCore enters a disciplined feature freeze on v2.24.24—guaranteeing stable boundaries, zero TOFU drift, and 35 immutable endpoints."

September 2026 · Post #33 Read Article →

Consolidated Baseline & Future Work

KnotenCore has completed its four-stage consolidation cycle (Sprints 358–361). The engine is stabilized on v2.24.24 as a rock-solid research and evaluation baseline.

Recently Shipped
Multi-node cluster smoke gate (3-node E2E cluster integration) & 342/342 test consolidation · v2.24.24
Canonical self-certifying node identity (knc-<hex>), TOFU elimination & HMAC namespace isolation · v2.24.23
Fail-closed mutex resilience (poisoned lock protection & Observer degradation) · v2.24.22
Wasm32 target compatibility CI gate & I/O isolation hardening · v2.24.21
CRDT anti-entropy state digests (ring::digest) & differential sync (knc_store_diff) · v2.24.16
Ed25519-signed Raft heartbeat envelopes & anti-downgrade hardening · v2.24.15
Persistent peer revocation (revoked_keys.json) & epidemic gossip gate · v2.24.14
Multi-model dev methodology: role separation (Architect · AG · Reviewer) + raw terminal proof invariant · Sprint 353+
Upcoming
Baseline Stabilization — v2.24.24 is the consolidated release for multi-agent evaluation. Feature freezes are in effect for stable test runs.
WASM Edge Mesh — Scale guest isolates across browser and edge nodes via WebRTC data channels.
ARM64 Native JIT Target — Native ARM64 machine code emission (complementing current x86_64 JIT).
Byzantine Fault Tolerance (BFT) Evaluation — Exploring BFT ordering for untrusted multi-tenant swarms.
Distributed Telemetry (OTLP) — OpenTelemetry tracing for multi-hop agent dispatch and execution traces.
Knoten Package Registry — Hosted registry and dependency resolver for .nod bytecode programs.

Start Building with KnotenCore

Fork it, audit it, extend it. PRs with harder test cases and independent benchmarks are welcome.

View on GitHub Read the Spec Engineering Blog

Note: Cryptographic mesh verification (local Ed25519 key rotation & peer revocation lists) is designed to protect cluster communication. It does not replace an external professional penetration test or third-party security audit.