Modular Architecture
KnotenCore separates intelligence from execution. Your Agent defines the logic via AST; our engine handles the heavy lifting.
View Source File
View Source File
View Source File
View Source File
Engineered for AI-Readiness
KnotenCore provides a machine-validated environment. Every node and function is formally specified to eliminate LLM hallucinations.
// docs/LANGUAGE_REFERENCE/nod_grammar.ebnf
expr = math_op | logical_op | fn_call;
node = "{" variant ":" args "}";
block = "[" { node } "]";
// docs/LANGUAGE_REFERENCE/node_types.json
"MathDiv": {
"type": "object",
"properties": {
"lhs": { "$ref": "#/definitions/node" },
"rhs": { "$ref": "#/definitions/node" }
},
"additionalProperties": false
}
// CLI --output-format json
{
"status": "fault",
"msg": "Fault: Div by zero (at Node::MathDiv)",
"node": "Node::MathDiv",
"hint": "Ensure rhs is not zero"
}
Zero Boilerplate
No NPM, no config hell. AI generates the AST; the engine handles execution.
Machine-Readable
Standardized Schema and Grammar enable zero-context-loss generation.
AOT Bytecode VM
Recursive interpreter for UI, flat Opcode VM for intensive computation.
Engine Interactivity & Controls
Interact directly with the KnotenCore VM runtime environment, compiler constraints, and audio synthesizer. Real-time control on the web.
Sprint Milestones
Sprint 1
Sprint 25
Sprint 89
Sprint 124
Sprint 144
Sprint 198
Sprint 216
Sprint 282
Sprint 291
KnotenCore v1.7.1-patch:
JIT & VM Migration 🛡️
KnotenCore reaches Sprint 291! With the new release of v1.7.1-patch, we have integrated hardware-level in-memory JIT compilation via RWX memory pages, resilient cross-node VM migration with full execution context recovery, non-blocking asynchronous audio streaming, and a hardened autonomous workspace CLI.
⚡ In-Memory JIT Compilation & Branching (Sprint 283–284, 291)
- •RWX Memory Pages: Copying compiled machine instructions directly into anonymous RWX memory blocks (
memmap2) to execute native functions in user-space. - •Register-Accurate Arithmetic: Addition instructions run natively on the CPU hardware, safely pushing the sum from register `rcx`.
- •PGO Branch Shifting: Relocates internal conditional/unconditional loops during adaptive unrolling to preserve branching destinations within unrolled bodies.
🌐 Cross-Node Isolate Migration & State Resumption (Sprint 288–289, 291)
- •Binary State Serialization: VMs serialize registers, memory values, frame tables, and global environments into bincode arrays for disk persistence.
- •Context Recovery: Resuming migrated isolates on logical node destinations by restoring stack, instruction pointer, frames, and cryptographic execution hashes.
🔊 Non-Blocking Audio & Streaming (Sprint 287, 291)
- •Dynamic Tone Streaming: Audio-Synthese occurs asynchronously on background channels by feeding `DynamicToneStream` directly as a `rodio::Source`, completely removing command loop blocking.
- •Automated Sink Sweeping: Completed audio playback channels are automatically swept and garbage collected.
🛠️ Hardened CLI & Test Isolation (Sprint 290–291)
- •knoten-init CLI: Bootstraps directories, JSON configurations, and standard workspace structures with `--init` and runs simulations with `--cluster-sim`.
- •Thread-Safe Testing: Fully isolated tests execute in parallel using base absolute PathBufs, eliminating environmental mutations.
🔒 Compliance & Integrity
- •Full Test Suite Verification: 224 / 224 Cargo tests successful, verifying direct native Addition execution and VMState resumption.
- •Zero Clippy Warnings: Compiles with no warnings on workspaces with `-D warnings` enabled.
- •Audit autonomously conducted by AI Agent Antigravity — live proof of KnotenCore AI-Readiness.
AOT Compiler & Constant Pool
v1.0.28-alpha emits flat RPN-Bytecode. Reoccurring values (Strings, Floats) automatically stream into the deduplicated constant pool. This yields near O(1) allocation during AST evaluation and stops heap-explosion cold.
// Memory Deduplication
let idx = compiler.add_constant(RelType::Int(10));
compiler.instructions.push(OpCode::Constant(idx));
// Resilient Async Networking
let agent = ureq::AgentBuilder::new()
.timeout(Duration::from_secs(10))
.build();
Resilient AsyncBridge
Built for the modern web. The AsyncBridge offloads blocking I/O (like Fetch nodes) to dedicated background workers with strict timeouts. Your Agent stays responsive while global data is being retrieved.
Hardened Sandbox
Security is not an afterthought. v1.0.28-alpha implements Strict Permissions by default. Agents cannot access the network or file system unless explicitly authorized via CLI flags. Absolute isolation for autonomous code.
// Secure by Default
engine.permissions.allow_fs_read = false;
engine.permissions.allow_fs_write = false;
// Error-Hardened ALU
OpCode::Add => {
let r = stack.pop().ok_or("Stack underflow")?;
let l = stack.pop().ok_or("Stack underflow")?;
stack.push(l + r);
}
Stack-based Bytecode VM
The execution engine is now a true stack-machine (Instruction-Pointer based). Thanks to compiler backpatching, it natively supports conditional branching, loops, and blazingly fast RPN operations.