Skip to main content
The official @nekzus/liop provides a complete, strongly-typed toolkit for building LIOP Clients (Agent Nodes) and LIOP Servers (Data Nodes) in TypeScript and JavaScript. If you are migrating from the Model Context Protocol (MCP), you will find the API surface remarkably familiar. LIOP was designed to provide a Drop-in Replacement Developer Experience (DX), abstracting the complexity of Protobuf, WebAssembly, and Kademlia DHT under straightforward TypeScript classes.

Package Architecture

The SDK is published to npm as a single unified package containing both Client and Server logic:
We strongly recommend installing zod alongside the SDK. Just like the official MCP specification, LIOP relies on Zod parsing to guarantee that Execution Arguments passed by the AI Agent perfectly match the Server’s capability manifest.

Minimal-Dependency Architecture (Opt-Out Installations)

By default, @nekzus/liop provides backward compatibility with the Model Context Protocol (MCP) via the LiopMcpBridge module. To simplify this integration, the package lists @modelcontextprotocol/sdk as an optional and peer dependency, meaning standard installations (npm install @nekzus/liop) will automatically resolve and install it. However, for constrained production environments (such as Docker edge containers, AWS Lambda, or IoT deployments) where deployment footprint matters, you can perform a minimal LIOP installation by opting out of the optional dependencies:
This drops the installation size significantly. The SDK uses dynamic import() internally, meaning the MCP bridge logic is only loaded if requested, maintaining a lightweight runtime memory footprint.

WebAssembly Compilation via Component Builder

While LIOP transmits compiled WebAssembly (.wasm) logic across the network, agents can be authored entirely in TypeScript. The @nekzus/liop package includes a native compilation bridge (the Component Builder). When your TypeScript Agent invokes .execute(), the SDK serializes the JavaScript payload, bundles it into a scoped .wasm payload, encapsulates it within a Protobuf LogicRequest, and transmits it to the Mesh. This removes the need to write or compile Rust/Wasm modules manually.

Enterprise Security and Performance Features

The TypeScript SDK operates at strict architectural parity with the high-performance Rust core, ensuring Zero-Trust constraints:
  • Post-Quantum Cryptography (ML-KEM-768): End-to-end asymmetric encapsulation (crystals-kyber) and symmetric AES-256-GCM authentication.
  • Hybrid Mesh Transport: Node.js & browser peering through WebSockets (WS) and TCP (Yamux) libp2p listeners.
  • Guardian-TS (Static AST Inspection): Proactive sandbox-escape mitigation that blocks illegal host capabilities before node:wasi execution logic triggers.
  • ZK-Receipt Ready: Native architectural support for trustless Mathematical Execution Proofs against Zero-Knowledge Virtual Machines (zkVMs).
  • Multi-Core Scaling (Worker Pool): Parallel processing using piscina. Avoids single-thread event loop contention by offloading PQC decryption, AST inspection, and WASI Sandboxing to isolated OS-level threads.

Key Exports

The SDK exports three primary classes for orchestrating Mesh applications:

LiopServer

The Data Node receiver. Exposes local secure capabilities, files, and handles incoming Logic-Injection-on-Origin intent safely.

LiopClient

The Intelligence Node. Searches the DHT Mesh for available capabilities and injects the dynamic WebAssembly payload to process data.

LiopMcpBridge

The Legacy Translator. Bridges tools and resources between legacy JSON-RPC MCP clients and your LIOP network.

Multi-Core Worker Architecture

Under heavy cryptographic or parsing loads, the SDK routes computation to isolated OS worker threads via piscina, keeping the main Node.js event loop unblocked.
LIOP SDK Architecture FlowLIOP SDK Architecture Flow

Next Steps