The internet was built for humans reading web pages—not for AI models thinking together. NNI Labs is building the network layer for the Internet of AI: models find each other by capability instead of IP addresses, pass raw latent states instead of JSON text, and link across RAM, LAN, and global relays as one encrypted mesh.
IP/HTTP was designed to carry documents. NNI is designed to carry live neural state—packing what the model means, where it routes, and its active tensor values into one 64-byte CPU cache line.
Replaces static IP/DNS lookup. Every packet carries a 128-bit mask of active features; routers and relays match it via a single CPU POPCOUNT instruction to find the closest specialist model on the mesh.
Today’s models live isolated behind REST endpoints. NNI turns every local SLM, GPU worker, and edge sensor into an addressable node on one network.
Co-located models exchange tensors through memory-mapped Seqlocks and 2-cycle AVX2 copies. No sockets, no kernel network stack.
Nodes announce capabilities on your subnet (239.255.42.99), swap X25519 keys automatically, and talk directly without a broker.
Any node behind any NAT joins the global backbone. Relays index capability masks and forward 100-byte encrypted frames without holding keys.
Every endpoint registers a 128-bit capability mask on the mesh. When a model emits an impulse, NNI finds the closest matching specialist via hardware POPCOUNT Hamming search—no hardcoded URLs or load balancers.
A local language model can tap its own hidden state when uncertain, query a remote specialist over the mesh, and steer its next token directly in continuous latent space—without serializing a single prompt to JSON.
128-float tensor round-trip • Warmed averages
| Metric | HTTP / JSON | nni-sdk | Result |
|---|---|---|---|
| Same Machine (Shared Memory vs. HTTP) | 3,263 µs | 32.9 µs (0.03 ms) | ~99x faster |
| Local Network (Direct UDP vs. HTTP) | 3,263 µs | 136.4 µs (0.13 ms) | ~24x faster |
| Global WAN (India ↔ Sweden) | ~570.0 ms (est.) | 385.4 ms | Speed-of-light floor |
| Local Wire Size (Round-Trip) | ~1,432 Bytes | 128 Bytes | 91.1% less data |
| WAN Egress Size (Round-Trip) | ~1,832 Bytes | 200 Bytes | 89.1% less egress |
| Encryption & Memory | Proxy TLS / JSON heap alloc | E2E AEAD / Zero alloc | Relays stay blind |
Install pre-built nni-sdk Python wheels with zero-copy NumPy and PyTorch views, or run the standalone nni relay & node binary.
# Join the global encrypted mesh from anywhere behind NAT
import nni_sdk as nni
RELAY = "13.62.157.43:19200" # Hosted backbone or self-hosted `./nni relay`
# 1. Host a model capability on the network
node = nni.Node(port=19100, relay=RELAY)
node.serve(0x01B2, lambda t: [x * 2.0 for x in t])
# 2. Query that capability from anywhere on Earth (200B E2E encrypted)
client = nni.Client.connect_mesh(RELAY)
result = client.send(0x01B2, [1.25] * 128)
nni-sdk wheels and nni relay binaries are free for personal, research, and commercial production use—no royalties, no per-packet fees. Source code remains private to NNI Labs; decompiling, reverse engineering, or redistributing modified binaries is not allowed.