⚠️ KNOTENCORE v2.24.16 (Zero-Trust CRDT Mesh Runtime) IS AN EXPERIMENTAL ALPHA RELEASE · RESEARCH & EVALUATION ONLY
v2.24.16 · 290/290 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 zero-trust cryptographic peering, quorum-gated governance, and sandboxed VM isolates — driven by structured JSON-AST.

290/290
Active verified tests
0
Clippy warnings
27+
JSON-RPC endpoints
v2.24.16
Zero-Trust Protocol
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 / Quality Gates All green
Clippy 0 warnings
Internal Security Sprint v2.24.16
License MIT
Language Rust 2024
Status Alpha
💡 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.

Built for Autonomous Agents

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

🔒
Zero-Trust Mesh
Ed25519 envelope signing, 30-second replay window, and anti-downgrade governance across all RPC endpoints. Strictly auth-gated when Zero-Trust or mesh token is configured.
v2.24.16
🗄️
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) minimizing network overhead.
knc_store_diff
⚖️
Zero-Trust Raft Swarm
Ed25519-signed heartbeat envelopes with 30-second replay protection and server-enforced anti-downgrade invariants. Quorum-gated leader failover.
knc_swarm_heartbeat
🗝️
Gossip Revocation Gate
Revoked peer keys persist to disk and are proactively rejected and evicted during epidemic gossip frame ingestion (knc_mesh_peers?action=gossip).
v2.24.14+
📦
Sandboxed VM Isolates
Multi-tenant VM isolates with per-session IsolateQuota: instruction gas metering, memory watchdog, call depth limits, and live isolate hot-reloading.
IsolateQuota
🌐
P2P Mesh & 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
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
🔄
Work-Stealing Scheduler
Distributed task queue with adaptive CPU-load-based work stealing across cluster nodes. Cryptographic task dispatch and result verification.
knc_task_steal
🤖
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.

  • 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.
  • End-to-End Cryptographic Chain
    Ed25519 signatures protect all guest isolate invocations, epidemic gossip frames, and Raft governance heartbeat envelopes.
  • 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/handlers/store.rs · compute_state_digest() v2.24.16
pub fn compute_state_digest(&self) -> String { let store = self.entries.lock().unwrap(); let mut keys: Vec<_> = store.keys().collect(); keys.sort(); let mut ctx = Context::new(&SHA256); for key in keys { let entry = &store[key]; let val_hash = digest(&SHA256, entry.value.to_string().as_bytes()); ctx.update(format!("{}:{}:{}:{}\n", key, hex::encode(val_hash), entry.timestamp, entry.writer_id).as_bytes()); } hex::encode(ctx.finish()) } // Deterministic anti-entropy state digest using ring::digest. // Enables instant differential mesh synchronization.

27+ 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, 27+ 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 27+ 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 · Multi-LLM
🦀🤖
From Post #32 · Quality Invariants

"This separation is more than a division of labor — it is structural distrust with tangible value. An AI model reviewing its own code frequently shares the blind spots that created it. The value of an independent second model is believing nothing that cannot be verified directly in the source tree."

August 2026 · Post #32 Read Article →

What's Next

KnotenCore ships incrementally. Each sprint is audited, tested, and pushed — no big-bang releases.

Recently Shipped
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
Hot-Module-Replacement (HMR) & live isolate hot-reloading · v2.23.0
Formal comparative benchmark suite (docs/BENCHMARKS.md) · v2.24.0
Multi-model dev methodology: role separation (Architect · AG · Reviewer) + raw terminal proof invariant · Sprint 353+
Upcoming
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.