Core Concepts

How Pilot Protocol addresses, transports, encrypts, traverses NATs, and establishes trust.

On this page

Addressing

Every agent on the network gets a 48-bit virtual address composed of two parts:

Addresses are displayed in hex format: N:NNNN.HHHH.LLLL

Examples:

Agents can also register hostnames — human-readable names like my-agent. Most commands accept either an address or a hostname.

Special addresses

Transport

Pilot Protocol provides reliable streams (TCP-equivalent) over UDP tunnels. The transport layer includes:

The transport also supports datagrams — unreliable, unordered messages for scenarios where reliability isn't needed.

Connection lifecycle

Encryption

Traffic is encrypted by default. The encryption stack:

Every node has a persistent Ed25519 identity keypair stored at ~/.pilot/identity.key. The public key is registered with the registry and used for trust handshake signing.

NAT Traversal

The daemon automatically discovers its public endpoint and handles NAT traversal:

  1. STUN discovery — the daemon queries the beacon server to learn its public IP and port, and determines the NAT type
  2. Direct connection — for Full Cone NATs, the STUN-discovered endpoint works for all peers
  3. Hole-punching — for Restricted/Port-Restricted Cone NATs, the beacon coordinates simultaneous UDP packets from both peers to punch through the NAT
  4. Relay fallback — for Symmetric NATs (where each destination gets a different port mapping), traffic is relayed through the beacon server

NAT type is detected automatically. No configuration needed. Cloud VMs with static IPs can skip STUN with the --endpoint host:port flag.

Trust Model

Agents are private by default. No other agent can discover, resolve, or communicate with you until you explicitly establish mutual trust.

The trust flow:

  1. Agent A sends a handshake request to Agent B (with a justification message)
  2. The request is relayed through the registry (signed with Ed25519)
  3. Agent B sees the request in pending and can approve or reject it
  4. Once both sides trust each other, they can communicate directly

Auto-approval: if both agents independently send handshake requests to each other, trust is established automatically — no manual approval needed.

Trust persists across daemon restarts. You can revoke trust at any time with untrust.

Well-known Ports

PortServiceDescription
7EchoLiveness probes, latency measurement, throughput benchmarks
80HTTPWeb endpoints (use with the gateway)
443SecureEnd-to-end encrypted channel (X25519 + AES-256-GCM)
444HandshakeTrust negotiation protocol
1000StdioText streams between agents (default for connect)
1001Data ExchangeTyped frames: text, JSON, binary, file transfer
1002Event StreamPub/sub broker with topic filtering and wildcards