1. Network Discovery (Kademlia DHT)
In traditional Client-Server architectures, the Client must know the exact IP address or Domain Name System (DNS) entry of the server it wishes to query (e.g.,https://api.internal.corp/).
Agent Nodes in LIOP operate in a decentralized peer-to-peer topology:
- Every Agent and Data Node generates a cryptographic Ed25519 Peer ID upon startup.
- Nodes connect to a peer-to-peer bootstrap network and form a Kademlia Distributed Hash Table (DHT).
- When an Agent needs to access a specific capability (e.g.,
Company_SQL_Database), it queries the peer network: “Which Peer ID currently holds this capability?” - The DHT algorithm calculates the routing path to the target node, resolving its dynamic IP automatically behind NATs and firewalls without a central registry.
2. Elicitation & Trust Handshakes
Because the Mesh is decentralized, trust cannot be derived from standard centralized Certificate Authorities (CAs) used in traditional mTLS. When an Agent Node locates a Data Node, it initiates a Zero-Trust Handshake (Elicitation) before any logic is executed.- LIOP uses the Noise Protocol Framework, encrypting connections natively at the transport layer (QUIC) using symmetric keys derived from peer identity.
- Post-Quantum Cryptography (PQC): LIOP Client Elicitations encapsulate session keys using ML-KEM-768. This prevents adversary capture of encrypted traffic for retrospective decryption by future quantum hardware (Harvest Now, Decrypt Later).
3. Logic Injection (The Payload)
Once the secure channel is established, the Client executes its core function: Logic Injection. Instead of dispatching sequential JSON commands to retrieve raw text, the Agent relies on local logic compilation orchestrated by the TypeScript SDK:- Compilation: The Agent translates its high-level logic (JavaScript, Python) into a compact WebAssembly module.
- Client AST Sentinel (
GuardianTS): Before transmission, static AST rules verify that the.wasmbinary does not contain unauthorized host syscall imports. - Payload Sealing (
Crypto Module): The Client encapsulates the session usingML-KEM-768(Kyber768) and encrypts the payload withAES-256-GCM. - Streaming (
MeshNode): The Client multiplexes the connection viaYamuxalong withNoiseand transmits the encrypted binary to the target peer. - ZK-Verification: Upon result retrieval via libp2p ingress, the Agent verifies the ZK-Receipt to validate execution integrity.
SDK Runtime Architecture (Node.js)
The Node.js Host orchestrates this pipeline using asynchronous worker pools. The LIOP SDK executes cryptographic operations and verification tasks off the Main Event Loop, maintaining responsiveness under high query volumes.@nekzus/liop:
1. Agent App (LLM Logic Emitter)
The origin application layer (such as an analytical agent or internal orchestration service) that defines the query intent and provides the initial logic to be dispatched to the Mesh.2. GuardianTS (AST Heuristics)
Prior to network transmission,GuardianTS validates module safety. Utilizing V8’s native compilation pipeline as a static validation step, it scans the generated .wasm binary for unauthorized host imports outside wasi_snapshot_preview1. Payloads failing validation are discarded immediately.
3. Worker Pool (Piscina Cryptography)
To keep the Node.js event loop free of computational bottlenecks, cryptographic operations run inside a nativepiscina Worker Pool.
- Egress (Outbound): Worker threads encrypt the validated
.wasmmodule with ML-KEM-768 and seal it inside anAES-256-GCMenvelope. - Ingress (Return): When the resulting payload and ZK-Receipt return, the Worker Pool decrypts and verifies the cryptographic proof concurrently, preventing main-thread blocking.
4. MeshNode (Yamux/Noise Multiplexing)
The network boundary interface.MeshNode maintains a libp2p gateway to the decentralized network, encapsulating traffic in a Noise protocol tunnel and multiplexing streams via Yamux. This enables a single connection to support concurrent Logic-on-Origin executions with minimal framing overhead.