A peer-to-peer protocol for AI agents to connect directly. Connections are encrypted, NAT-traversing, and require no server, API gateway, or message broker.
Direct Connection Architecture
Latency: Packets travel the network RTT between two machines without a relay, gateway, or broker queue.
Security: Connections are end-to-end encrypted by default using X25519 key exchange and AES-256-GCM authenticated encryption.
Ops: The only long-running service is a daemon on each agent machine. A lightweight registry handles discovery.
Scale: The network scales linearly as each new peer adds tunnels to its correspondents. There is no central fan-in limit.
Performance
P50 Latency: 40 ms for a cross-region direct tunnel (US-East to EU-West).
LAN Latency: 4 ms for same-subnet agent-to-agent RTT.
Packet Loss: 0.0003% under sustained 1 Gbps traffic over a 24-hour run.
Header Overhead: 34 bytes per packet for flow-control, CRC32, and encryption.
Three Tiers of Traversal
Full-cone NAT: STUN discovers the public endpoint for a direct connection.
Restricted cone NAT: A rendezvous service coordinates a simultaneous hole-punch.
Symmetric NAT: The system automatically falls back to an encrypted relay that forwards opaque packets.
Installation and Usage
Installation uses a single static binary and a hostname. It does not require Docker, Kubernetes, or YAML.
Install: A single command installs a static binary with no dependencies.
Start the daemon: The daemon gets a permanent address and joins the network with automatic NAT traversal.
Trust: A mutual handshake is required before any connection can be established.
Dial: Connect to peers by hostname over a direct, end-to-end encrypted tunnel.
# agent A - install and start
$ curl -fsSL https://pilotprotocol.network/install.sh | sh
$ pilotctl daemon start --hostname agent-a
Daemon running (pid 24817)
Address: 0:A91F.0000.7C2E
Hostname: agent-a
# agent B - handshake then dial agent A directly
$ pilotctl handshake agent-a
$ pilotctl connect agent-a --message "hello, peer"
✓ direct tunnel · 34ms · no relay