Zero-Config security gateway for desktop AI applications
The LIOP Agent is a pre-compiled, production-ready CLI utility included with the @nekzus/liop package. It acts as a bridge between standard AI interfaces (like Claude Desktop or Cursor) and the decentralized Logic-Injection-on-Origin Protocol.Instead of writing a custom server, users can simply run the agent to instantly gain “Logic-Injection-on-Origin” capabilities.
The agent only communicates via STDIO. It prints status logs and discovery events strictly to stderr, ensuring that the stdout channel remains clean for valid JSON-RPC 2.0 messages required by the LLM client.
The agent automatically exposes a local diagnostic tool called LiopMeshStatus. When an LLM calls this tool, the agent intercepts it locally instead of routing it over the P2P network. It instantly returns a rich, human-readable report detailing:
Connected Bootstrappers and Peer IDs
Active Nodes (Vault, Bank, Oracle)
Tool routing tables and Kademlia DHT state
Token consumption and telemetry estimates
This allows AI clients to autonomously diagnose connection drops or verify which tools are available without burning bandwidth or duplicating diagnostic requests across multiple nodes.
The agent behavior can be customized via the following environment variables:
Variable
Default
Description
LIOP_NEXUS_URL
(none)
URL of the Nexus node for Auto-Discovery. The agent resolves the PeerID and multiaddr from the /health endpoint automatically
LIOP_LOG_LEVEL
info
Controls log verbosity (silent, info, debug). Set to silent to suppress all stderr output
LIOP_EXPECTED_PROVIDERS
1
Number of mesh providers to wait for during initial warm-up. The adaptive DHT polling continues discovering additional providers in the background
LIOP_INITIAL_DISCOVERY_TIMEOUT_MS
8000
Maximum time (ms) to wait for the initial mesh discovery phase before proceeding
LIOP_MCP_COMPACT_TOOL_DESCRIPTIONS
true
Strips verbose protocol metadata from tool descriptions, reducing token consumption by ~500 tokens per tool. Set to 0 to opt-out
LIOP_GRPC_PORT
50051
Override the default gRPC port for the internal RPC server
LIOP_WORKER_MAX_HEAP_MB
64
Maximum V8 heap size per worker thread (Heap Bomb defense)
LIOP_DOCKER_MAP
false
Force translation of Docker-internal container IPs (172.x.x.x) to the host loopback (127.0.0.1), mapping target gRPC services to host-published ports for running containerized mesh nodes in local environments
LIOP_DEV_MODE
false
Enables development heuristics, which automatically activates Docker port mapping if the Nexus URL points to local demo ports (13000/13001)
LIOP_DATASET_SCALE
1
Scaling factor used by test and demo nodes to dynamically scale synthetic record generation size (e.g., bank transactions, health records)
LIOP_BOOTSTRAP_FILE is deprecated since v2.0.0-alpha. Use LIOP_NEXUS_URL instead. The agent will log a warning if this variable is detected.
If you encounter connection issues, check for the 🛡️ icon in the console or ask the LLM to call LiopMeshStatus.